In addition to using a hybrid approach, the mpi_hello_world application is compiled as part of the "post" section of the .def file using the command "make". This required modifying the "files" section to include the source (.c) and the makefile.
The correspond slurm script:
Notice that Open MPI gets installed directly into the container. The files 'mpi_hello_world.c', 'makefile', and hellompi_hybrid.def need to be in the current working directory. Because of the sudo requirement, you would need to create the container on a ScienceCloud virtual machine (we have images with singularity pre-installed) or on your own machine. Then the command to build the container image is: