Users of spack-based GROMACS installations beware of possible performance loss!

Hi,

It has recently come to our attention default Spack builds of GROMACS use RelWithDebInfo instead of Release which is the default in our build system. Due to the lower optimization levels in RelWithDebInfo such build will run up to 20% slower than release builds. Therefore, I strongly recommend to (re)install GROMACS with spack by explicitly specifying build_type=Relelease to avoid performance loss.

For users of HPC systems which use spack-based installation, I recommend checking that your GROMACS installations were build correctly: the compiler flags should contain -O3 rather than -O2. You can inspect the compiler flags used for building a GROMACS installation in the following way:

$ gmx_mpi --version | grep "compiler flags"
C compiler flags:   -mavx2 -mfma -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -pthread -O3 -DNDEBUG
C++ compiler flags: -mavx2 -mfma -pthread -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -pthread -fopenmp -O3 -DNDEBUG

The issue has been fixed in Spack and future releases will no longer need the workaround.

Cheers,
Szilárd