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

There are three different implementations of OpenMPI available on the HPC: Intel, GNU GCC, and NVHPC:

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

NVHPC:

# Load default environment module
$ module load nvhpc openmpi

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.