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 intel 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.

Notice

OpenMPI is no longer available for the PGI (now NVIDIA) compilers. If you need to use OpenMPI with the PGI libraries, please let us know.

There are two different implementations of OpenMPI available on the HPC. One is compiled for Intel and the other for GNU GCC:

Intel:

1
2
3
4
5
6
# Load default environment module
$ module load intel openmpi

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

GNU GCC:

1
2
3
4
5
6
# Load default environment module
$ module load gnu openmpi

# Load alternative OpenMPI version
$ module load gnu openmpi/2.1.0
$ 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.