How can I run FEniCSx in parallel using Singularity and openmpi?

I want to run FEniCSx on a HPC cluster using singularity. The cluster has openmpi/4.1.1 and singularity/3.11.3.

I cannot use docker://dolfinx/dolfinx:stable because the mpi4py inside is build with MPICH, but my cluster only has openmpi, right?

That’s why I try to use the openmpi container at dolfinx/dev-env

singularity pull docker://dolfinx/dev-env:current-openmpi-amd64

I want to test this

singularity exec dev-env_current-openmpi-amd64.sif python3 -c "import dolfinx"

but it fails with

File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'dolfinx'

I think I am missing something, because I am very new to using containers. Any help is welcome.

The dev-env doesn’t have ufl, ffcx, basix and dolfinx installed. You would have to install those within the docker env, see:

1 Like

Thank you for your help!