Running MPICH

From BCCD 3.0

Jump to: navigation, search


To check if MPICH is your default environment, issue the command:

which mpiexec

If it comes back saying:


then that means you are good to go and can skip to the next part! But if you received any other result, you must read on.

If not...


  module list

and look for a different MPI:

 Currently Loaded Modulefiles:
 1) modules                 7) gromacs/3.3.3_openmpi
 2) PSC_DX/04.3.3000        8) intelcc/11.0.074
 3) cuda/0.2.1221           9) jre/1.6.0_07
 4) dreamm/4.1.6           10) mcell/3.1
 5) fftw/3.1.2             11) mpe/1.9.1
 6) openmpi/1.2.6    12) xmpi/2.2.3b8

Unload that MPI and load MPICH:

  module unload openmpi && module load mpich2

You should now see the correct mpirun with which mpirun. You can ensure that this happens at login by changing this line in ~/.bash_profile

  module load PSC_DX cuda dreamm fftw openmpi gromacs intelcc jre mcell mpe xmpi


  module load PSC_DX cuda dreamm fftw mpich2 gromacs intelcc jre mcell mpe xmpi

Compiling and Running an MPI Program

Now that your environment is set, click on Compiling and Running to learn how to run a sample MPI program. Or, take a look at some MPICH debuggers, such as Debugging with MPE or Debugging with Upshot. Remember, all the example MPICH programs are in the directory ~/mpich/examples/, and are ready to be run after a simple make command!

Personal tools