4.5. Running Parallel Applications

Parallel VSIPL++ applications are run depends on the particular communication library used.

For most MPI libraries, parallel applications are run with the mpirun command. For example, to run a VSIPL++ application on two processors:

> mpirun -np 2 ./example1

This may require that your MPI library has been first initialized on the system by starting a daemon process. Please consult your MPI library documentation for more details.

For PAS, it is necessary to pass extra command line options to VSIPL++. -pas_size nproc> indicates the total number of processors in the PAS set. -pas_rank rank indicates the rank of the particular process in the set.

For example, to run a parallel VSIPL++ application with MCOE PAS with four CEs, 2, 3, 4 and 5:

> sysmc -ce 2 -bcs=0 init 3-5
> runmc -ce 3 ./example1.ppc -pas_size 4 -pas_rank 1 &
> runmc -ce 4 ./example1.ppc -pas_size 4 -pas_rank 2 &
> runmc -ce 5 ./example1.ppc -pas_size 4 -pas_rank 3 &
> runmc -ce 2 ./example1.ppc -pas_size 4 -pas_rank 0
> sysmc -ce 2 reset

For example, to run a parallel VSIPL++ application with PAS for Linux Clusters on compute nodes c1, c2, c3, c4:

> rsh -n c1 example1 -pas_size 4 -pas_rank 0 &
> rsh -n c2 example1 -pas_size 4 -pas_rank 1 &
> rsh -n c3 example1 -pas_size 4 -pas_rank 2 &
> rsh -n c4 example1 -pas_size 4 -pas_rank 3 &
> wait

Please consult your PAS library documentation for more details on starting PAS and running PAS programs.