FEniCS using only one node on HPC machine. How do I use more than one?

Got it running with singularity (3.6.0). First made an image straight from Docker:
singularity build fenics.sif docker://quay.io/fenicsproject/stable:latest
Then ran it with an mpich module. This was the cause of the error above. I’ve always used openmpi and didn’t even think that may have been the issue until running into these posts (1,2). The resulting batch script, assuming the file is in the working directory:

#!/bin/bash

#SBATCH -p debug_queue
#SBATCH -N 2
#SBATCH --ntasks-per-node=44
#SBATCH --time=0-00:10:00 
#SBATCH --job-name=fenics_mpi_test

echo "Loading mpich and singularity"
module load mvapich2_2.3a/gcc_4.8.5
module load singularity/3.6.0

echo "Starting fenics simulation."
mpirun -n 88 singularity exec -B $PWD fenics.sif python3 par_test.py

Thanks for the suggestion to use singularity; it’s working out so far!

1 Like