Running OpenMC with OpenMPI on HPC

I have been trying to run OpenMC on a remote cluster as a batch job. I need to run the jobs utilising OpenMPI else they take many days to complete. I am unable to install OpenMC from source on the remote cluster so have taken these steps;

  1. Pulled the ‘Ubuntu’ docker image
  2. Installed openmc from source (I think with OpenMPI support (help)) on this new docker image and commit these changes. Then pushed the docker image to dockerhub.
  3. Created a singularity image on the remote cluster based from this docker image.
  4. Run the command ‘mpirun -n 32 singularity exec $PATH-TO-IMAGE openmc’. However whilst this does run I get 32 independent instances on openmc running and in the preamble at the start of OpenMC it says OpenMPI: 1 Threads: 1.

Please could anyone help solve this conundrum. I am using the latest Ubuntu docker image and built the openmc source from the master branch.

Thanks.

I’m not familiar with singularity, but you might want to try the other way around, i.e., singularity exec $PATH-TO-IMAGE mpirun -n 32 openmc. Otherwise you’re starting up MPI outside of the docker image and then trying to run OpenMC from within it.