MPI programming using mpich2 | |
Check the User's Guide for more details: http://www-unix.mcs.anl.gov/mpi/mpich2/index.htm#docs
NOTE: all MPI programs should be run using the N1 Grid Engine 6 scheduler.
To compile: The MPI libraries were configured using Absoft. If you want to compile a simple program simply type mpif90 myprog.f90If you want to use the IMSL or LAPACK, however, you will have to link to those libraries explicitly. I've created an alias mpiaf90that should take care of this for you. Type which mpiaf90to see exactly what it does. If something fails or you use other modules and libraries you may have to modify this compilation. Click here for a sample Makefile I use.
Simple Examples: mpicc mpihello.c mpiexec -n 2 a.outFORTRAN 90 - download hello.f90 and run: mpif90 hello.f90 mpiexec -n 2 a.outFor a rough estimate of how many flops courtney is capable of download flop.c
Further Refinement: machinefile: janelle:1 carrie:2will run the master process (of rank 0) on janelle and run the other two processes (of rank 1 and 2) on carrie. To execute with the machinefile type mpiexec -machinefile MF.dat -n 3 a.outTo see which machines are booted into the ring type mpdtraceTo see what MPI jobs are currently running type mpdlistjobsTo kill one of your own job numbers given in mpdlistjobs type mpdkilljob #To see a detailed status report (need Pless SSH to use this) of one or more nodes type getstat OR getstat nodename1 nodename2 etc... | |