Skip to main content


Link to section 'Description' of 'openmpi' Description

An open source Message Passing Interface implementation.

Link to section 'Versions' of 'openmpi' Versions

  • Bell: 2.1.6, 3.1.6, 4.0.5, 4.1.3
  • Brown: 1.10.7, 2.1.6, 3.1.4
  • Scholar: 2.1.6, 3.1.6
  • Gilbreth: 3.1.6-gpu-cuda11
  • Negishi: 4.1.4
  • Anvil: 3.1.6, 4.0.6

Link to section 'Module' of 'openmpi' Module

You can load the modules by:

module load openmpi

Link to section 'Compile MPI Code' of 'openmpi' Compile MPI Code

The following table illustrates how to compile your MPI program. 
Language Command
Fortran 77
$ mpif77 program.f -o program
Fortran 90
$ mpif90 program.f90 -o program
Fortran 95
$ mpif90 program.f95 -o program
$ mpicc program.c -o program
$ mpiCC program.C -o program

Link to section 'Run MPI Executables' of 'openmpi' Run MPI Executables

Create a job submission file:


#SBATCH  --nodes=2
#SBATCH  --ntasks-per-node=128
#SBATCH  --time=00:01:00

srun -n 256 ./mpi_hello

SLURM can run an MPI program with the srun command. The number of processes is requested with the -n option. If you do not specify the -n option, it will default to the total number of processor cores you request from SLURM.

To run MPI executables, users can also use mpirun or mpiexec from openmpi. Note that mpiexec and mpirun are synonymous in openmpi.

mpirun -n number-of-processes [options] executable

Thanks for letting us know.

Please don't include any personal information in your comment. Maximum character limit is 250.
Characters left: 250
Thanks for your feedback.