Skip to content

OpenMPI

An MPI Implementation for Parallel Computing


OpenMPI requires an environment module

In order to use OpenMPI, you must first load the appropriate environment module:

module load gnu openmpi

OpenMPI is one of several implementations of the Message Passing Interface (MPI) model of parallel computing for distributed systems. OpenMPI is an open-source implementation of this model with a wide range of powerful features.

Using OpenMPI on RCC resources#

Notice

OpenMPI 4.1.6 will only work with GNU GCC 8.5.0 and Intel 21 compilers or newer.

Notice

OpenMPI is not availbale on the NVIDIA NVHPC (formerly PGI) compilers. If you need to use OpenMPI with the NVHPC compilers, please let us know.

OpenMPI available on the HPC for the GNU and Intel platforms.

Intel:

1
2
3
4
5
# Load default environment module (currently Intel 21 and OpenMPI 4.1.0)
$ module load intel openmpi

# Load alternative OpenMPI version
$ module load intel openmpi/4.1.6

GNU GCC:

1
2
3
4
5
# Load default environment module (currently GNU 8.5.0 and OpenMPI 4.1.0)
$ module load gnu openmpi

# Load alternative OpenMPI version
$ module load gnu openmpi/4.1.6

Running OpenMPI programs#

Regardless of which platform compiler your MPI program executes on, the syntax is the same:

srun -n N program.x # This will run a program with N processors using OpenMPI

This would typically go in a Slurm submit script.