With Singularity containers, MPI can be problematic / care must be taken to get usable and performant MPI use.
There are 2 main approaches as described in the Singularity / Apptainer documentation, either bind the systems MPI into the container, or the more popular hybrid approach of using a compatible MPI in the container as on the host system.
I.e. If using OpenMPI, use the same major (and minor) OpenMPI version as available centrally on Bede in the container. Load the relevant module and launch the container via mpirun -n X singularity exec .... The same applies for using a matching MPICH in and out of the container.
It may be worth completing #84 prior to this, as this will make it simpler to test such installations.
Definition files including building the relevant OpenMPI/MPICH from source might be a good addition / reference for this section.
With Singularity containers, MPI can be problematic / care must be taken to get usable and performant MPI use.
There are 2 main approaches as described in the Singularity / Apptainer documentation, either bind the systems MPI into the container, or the more popular hybrid approach of using a compatible MPI in the container as on the host system.
I.e. If using OpenMPI, use the same major (and minor) OpenMPI version as available centrally on Bede in the container. Load the relevant module and launch the container via
mpirun -n X singularity exec ...
. The same applies for using a matching MPICH in and out of the container.It may be worth completing #84 prior to this, as this will make it simpler to test such installations.
Definition files including building the relevant OpenMPI/MPICH from source might be a good addition / reference for this section.