2020 cuda compile errors

GROMACS version: 2020.4
GROMACS modification: No
Here post your question

Hello, I’m unable to compile GPU enabled gromacs. The MPI version compiles fine, but when I enable the GPU compile with -GMX_GPU=ON , I fail compilation with many errors like this:

/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/basic_string.tcc(1067): error: a nonstatic member reference must be relative to a specific object

My loaded module set is the following:

  1. icc_19 2) icc_19-impi_2019 3) cmake/3.11.2 4) gcc/8.2.1 5) cuda/10.1.105_418.39

Any suggestions would be greatly appreciated.


Why are you loading ICC and gcc at the same time? Are you doing something funny with the standard libraries?

What’s your operating system? Depending on that, CUDA 10.1 may not be compatible with GCC 8 -
see table 1 at Installation Guide Linux :: CUDA Toolkit Documentation

I load gcc because the base g++ installed in the system is 4.8.5 and I need 5.1 or higher according to this error message:

CMake Error at cmake/FindLibStdCpp.cmake:119 (message):
Found g++ at /usr/bin/g++. Its version is 4.8.5. GROMACS requires at
least version 5.1. Please specify a different g++ using
Call Stack (most recent call first):

Loading both has always taken care of the of that error message for gmx on CPU. I guess the proper thing to do is get the sysadmin to upgrade the base/core gcc that is installed.

Thanks for the reference. My student simultaneously found the same issue I think we are making progress now.

The “base” gcc can’t really be upgraded, it’s pinned to the version of the operating system in most cases. Installed gcc/other compilers should work fine as long as Gromacs finds them correctly at configure time and the CUDA/OS/compiler version is compatible.

If your combination seems good and cmake says you’ve found the correct gcc version the problem persists I’d say to try (in order):

  • removing the icc load from the install
  • upgrading cuda