Compile MPI Program Using SGI’s MPI Implementation
- For C program:
tonka% cc -o example example.c -lmpi
- For Fortran 77 program:
tonka% f77 -o example example.f -lmpi
- For Fortran 90 program:
tonka% f90 -o example example.f90 -lmpi
- To run job interactively using SGI’s MPI implementation:
tonka% mpirun -np 4 example
- To submit a multiprocessor batch job requiring 4 processors:
Tonka% bsub -q pca-mp4 " mpirun -np 4 example"
MPI programs compiled with SGI’s implementation must use thempirun
script to run jobs. Note however that there is more than one way to run MPICH-compiled executables.