Error compiling GROMACS 2021

GROMACS version: 2021 (with GPU support)
GROMACS modification: No

I am trying to compile the latest release GROMACS 2021 (Downloads — GROMACS 2021 documentation) on a university cluster. Unfortunately, I am getting a string of errors that begin with:

/opt/rh/devtoolset-9/root/usr/include/c++/9/limits: In static member function ‘static constexpr long double std::numeric_limits<long double>::denorm_min()’:
/opt/rh/devtoolset-9/root/usr/include/c++/9/limits:1865:65: error: expected ‘)’ before numeric constant
 1865 |       denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; }
      |                                                             ~   ^~~

The install script and log file for the full compilation output is attached. (571 Bytes) log_install_gromacs.txt.log (1.0 MB)

Please let me know if you have any suggestions.

Best regards,

Hi Dan,

This looks like a CUDA and your C++ standard library compatibility issue. I assume you have an otherwise functional C++ gcc 9 toolchain installation, can build with with GPU support turned off?
If so, please please file an issue on Issues · GROMACS / GROMACS · GitLab and attach the files you shared here.

As a workaround, you could try gcc 8 instead of 9 (CUDA 11.2 instead of 11.1)?


I can confirm that the code properly compiles without GPU support. I have opened a ticket here: Error compiling GROMACS 2021 with GPU support (#3905) · Issues · GROMACS / GROMACS · GitLab

Have you tried a different gcc or CUDA version?

I have tried different gcc versions, but I don’t have access to CUDA 11.2 unfortunately. I am working with the managers of the university cluster to get it installed. Nothing I have tried works with GPU support at CUDA 11.1.

OK, thanks, can you please update your gitlab report to reflect the exact software environment (compiler versions) you tried?

I’ve updated the gitlab report. I assume we can continue the discussion there.