(2026-01-13) Lab Notebook: Using OpenMPI versions >= 5.0.0 with srun

Warning

This is as a Lab Notebook which describes how to solve a specific problem at a specific time. Please keep this in mind as you read and use the content. Please pay close attention to the date, version information and other details.

In version 5.0.0 of OpenMPI, support for an underlying library, PMI, was replaced by a newer alternative, PMIx (see the changelog for details). In order to launch code using this version of OpenMPI with srun (which is recommended over other launchers like mpirun or mpiexec), an additional option needs to be provided:

srun --pmi=pmix ...

If you do not provide this option, you may see warnings like:

No PMIx server was reachable, but a PMI1/2 was detected.
If srun is being used to launch application,  x singletons will be started.

In this case, your code will not parallelize correctly, and the entire calculation will be repeatedly run by each individual task.