I run coupling with two participants in a parallel-explicit scheme on an HPC cluster at LRZ using Slurm. I use the method suggested in the documentation (SLURM sessions | preCICE - The Coupling Library) to partition the allocated nodes to the two solvers. I’m using OpenMPI and
(
mpirun -n <ntasks1> --hostfile <hostfile1> solver1 &
mpirun -n <ntasks2> --hostfile <hostfile2> solver2 &
wait
)
For load balancing in parallel coupling, I would like to distribute tasks so that both solvers take roughly the same time for one coupling window. However, if I set ntasks1
and ntasks2
such that the two solvers both have some of their tasks on the same node (e.g. allocate 3 nodes of 80 tasks each, give 100 tasks to solver 1 and 140 tasks to solver 2), only one solver is running. The other is blocked completely, doesn’t even start. I can see that the host files contain the expected entries.
When the solvers cleanly divide the nodes (e.g. 80 for solver1, 160 for solver2) they both start and run in parallel as expected.
Is this a known limitation of Slurm or could this be solved with configuration of Slurm? I haven’t found any info on this, probably since it is a niche use case.