Compile MPI Program Using MPICH
While it is possible to compile and link manually through command line, it is a good idea to incorporate the above into a makefile.
- To run job interactively using MPICH:
tonka% example -np 4
- or
tonka% mpirun -np 4 example
- or
tonka% mpirun example -np 4
at prompt, type
mpirun -help
to get a list of allmpirun
options
On Boston University’s SGI systems, because SGI’s MPI implementation is the default MPI, the mpirun
run script is for executables created for the SGI MPI. An MPICH-compiled executable will fail using this script. There are a number of ways to get around this:
- not to use mpirun at all; use “example -np 4” aliasing
mpirun
to point to the MPICHmpirun
lego% alias mpirun /usr/local/mpi-1.2.0/IRIX64/ch_shmem/bin/mpirun - aliasing MPICH
mpirun
to, say,mpirun2
to ease typing as well as avoid confusion
lego% alias mpirun2 /usr/local/mpi-1.2.0/IRIX64/ch_shmem/bin/mpirun