MPI is a standard library for performing parallel processing using a distributed memory model. The Ruby, Owens, and Pitzer clusters at OSC can use the OpenMPI implementation of the Message Passing Interface (MPI).
Availability and Restrictions
Installations are available for the Intel, PGI, and GNU compilers. The following versions of OpenMPI are available on OSC systems:
You can use
module spider openmpi to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.
OpenMPI is available to all OSC users. If you have any questions, please contact OSC Help.
Publisher/Vendor/Repository and License Type
https://www.open-mpi.org, Open source
Setup on OSC Clusters
To set up your environment for using the MPI libraries, you must load the appropriate module. On any OSC system, this is performed by:
module load openmpi
You will get the default version for the compiler you have loaded.
Building With MPI
To build a program that uses MPI, you should use the compiler wrappers provided on the system. They accept the same options as the underlying compiler. The commands are shown in the following table:
For example, to build the code my_prog.c using the -O2 option, you would use:
mpicc -o my_prog -O2 my_prog.c
In rare cases, you may be unable to use the wrappers. In that case, you should use the environment variables set by the module.
||Use during your compilation step for C programs.|
||Use during your compilation step for C++ programs.|
||Use during your compilation step for Fortran 77 programs.|
||Use during your compilation step for Fortran 90 programs.|
Programs built with MPI can only run in the batch environment at OSC. For information on starting MPI programs using the command srun see Job Scripts.
Be sure to load the same compiler and OpenMPI modules at execution time as at build time.
Run a MPI program
If you need to use
We recommand using
srun in any circumstances.
mpiexecand the job failed, please contact OSC Help.
- The Message Passing Interface (MPI) standard, http://www.mcs.anl.gov/research/projects/mpi/
- MPI Training Course