Error: Choice of MPI ranks

GROMACS version:
GROMACS modification: No


I’ve always run simulations in my computer using for example the commands:

gmx grompp -f em.mdp -c solvated.gro -p -o em.tpr
gmx mdrun -v -deffnm em -ntmpi 18

For some reason now I keep getting:

Back Off! I just backed up em.log to ./#em.log.4#
Compiled SIMD: SSE4.1, but for this host/run AVX2_256 might be better (see
Reading file em.tpr, VERSION 2021.4-Ubuntu-2021.4-2 (single precision)
Using 18 MPI threads
Using 18 OpenMP threads per tMPI thread

Program: gmx mdrun, version 2021.4-Ubuntu-2021.4-2
Source file: src/gromacs/taskassignment/resourcedivision.cpp (line 642)
MPI rank: 16 (out of 18)

Fatal error:
Your choice of number of MPI ranks and amount of resources results in using 18
OpenMP threads per rank, which is most likely inefficient. The optimum is
usually between 1 and 6 threads per rank. If you want to run with this setup,
specify the -ntomp option. But we suggest to change the number of MPI ranks
(option -ntmpi).

It is strange because it never happened to me and I’m using exactly the same simulation method as always. Do you have any ideas what could possibly be causing this?


The easiest solution would be to just follow the very explicit error message and change the number of thread MPI ranks or OpenMP threads. If you are curious why this is happening, I would suggest checking if you have an environment variable set which specifies the number of omp threads, or perhaps making sure that you consistently get this error with the mdrun command you posted above, if you have not already done that.

Also note that you are loosing a lot of performance by using a binary with SSE4.1 SIMD instructions instead of AVX2_256. You will gain a lot performance by compiling your own binary.