GPU error during installation of Gromacs 2020.3

GROMACS version:2020.3
GROMACS modification: Yes/No
Here post your question
Hi guys, I’m having trouble installing GPU enabled gromacs on my computer (running ubuntu 20.04, GPU: NVIDIA GeForce RTX 2080). I got an error:
nvcc fatal : Unsupported gpu architecture 'compute_30'
Seems like the error is because Cuda (version 11) doesn’t support ‘compute_30’. After some searches, I tried passing following flags in CMake
However, none of them worked: the installation failed in one of the tests
12 - GpuUtilsUnitTests (Failed)
I’m wondering if someone has experienced a similar issue and might have any solution?

You’re right that it’s likely an incompatibility of Gromacs with CUDA 11 - it just came out, after all. I suggest downgrading to CUDA 10 if you can. I have access to a 2080 system with that OS so I’ll see if I can get it working and report back here if it’s an easy patch, but otherwise you might have to wait until the next Gromacs release.

1 Like

edit “gmxManageNvccConfig.cmake”

as like this

# Set the CUDA GPU architectures to compile for:
# - with CUDA >=9.0         CC 7.0 is supported and CC 2.0 is no longer supported
#     => compile sm_61, sm_70 SASS, and compute_70 PTX
# - with CUDA >=10.0        CC 7.5 is supported
#     => compile sm_61, sm_70, sm_75 SASS, and compute_75 PTX

# First add flags that trigger SASS (binary) code generation for physical arch
list (APPEND GMX_CUDA_NVCC_GENCODE_FLAGS "-gencode;arch=compute_61,code=sm_61")
list (APPEND GMX_CUDA_NVCC_GENCODE_FLAGS "-gencode;arch=compute_70,code=sm_70")

# Next add flags that trigger PTX code generation for the newest supported virtual arch
# that's useful to JIT to future architectures
list (APPEND GMX_CUDA_NVCC_GENCODE_FLAGS "-gencode;arch=compute_61,code=compute_61")
list (APPEND GMX_CUDA_NVCC_GENCODE_FLAGS "-gencode;arch=compute_70,code=compute_70")
    list (APPEND GMX_CUDA_NVCC_GENCODE_FLAGS "-gencode;arch=compute_75,code=compute_75")

It’s gonna force gromacs to use compute 6.1 or u can use compute 7.0 for RTX 2080

1 Like

The important part there is removing the sm_30 compilation flag from both sections, since it’s no longer supported in CUDA 11. Removing sm_35,37,50,52 is optional - it’ll give you a deprecation warning if you compile with it, but shouldn’t crash

1 Like

Thank you both for your responses. I edited the gmxManageNvccConfig.cmake file as suggested. But the installation still failed the Test #12: GpuUtilsUnitTests (3 failed, 70 passed) :

[ FAILED ] 3 tests, listed below:
[ FAILED ] HostAllocatorTestCopyable/0.ManualPinningOperationsWorkWithCuda, where TypeParam = int
[ FAILED ] HostAllocatorTestCopyable/1.ManualPinningOperationsWorkWithCuda, where TypeParam = float
[ FAILED ] HostAllocatorTestCopyable/2.ManualPinningOperationsWorkWithCuda, where TypeParam = gmx::BasicVector

Errors while running CTest
make[3]: *** [CMakeFiles/run-ctest-nophys.dir/build.make:58: CMakeFiles/run-ctest-nophys] Error 8
make[2]: *** [CMakeFiles/Makefile2:2486: CMakeFiles/run-ctest-nophys.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:2465: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:249: check] Error 2

I went ahead and installed the gromacs anyway but I got segmentation fault error during runtime.


CUDA 11 is now supported from the head of github master but isn’t available in a stable release yet. Do you have access to CUDA 10? It should be fine to have the CUDA 11 drivers on the device but build against CUDA 10.

1 Like

I downgraded to CUDA 10 and installed gromacs2020.3. However, there was an issue with the ‘renumbering of residue number to 1’. So I installed gromacs2019.6 instead and have been using it since. I will wait until new version comes out to upgrade. Thanks!

Hi All,

I am facing the same problem with Gromacs 2020.3 and CUDA 11 on Ubuntu 20.04 LTS.
Is there any workaround available yet?



please , did you solve it ?

No more workarounds are needed, just get the latest release (2020.4).

1 Like

thanks, i will try it now … but does it will be compitabele with nvidia rtx 2060 cuda 11.1 ?

finally, it is solved … Many thanks

I used GCC 7 and CUDA 10.2. The newer version of Gromacs 2020.4 seems to be CUDA 11 compatible but I didn’t give it a try yet.

Yes, the CUDA 11 compatibility issues have been addressed in the 2020.4 release.

The code was running with gpu and suddenly screen of ubuntu gave me log in … I tried to log in but couldn’t until I restart laptop and got
Starting authorization manager

I know it’s a problem of ubuntu … but I had two graphic card one is nvidia and another is intel … does that because of enforce gpu for working… can you help me because I was happy that code is running and afraid of deleting or doing something with make me stuck again

Appreciate you help