# Error Building GROMACS 2023.3 with CUDA - NVCC/GCC Compatibility Issue

**URL:** <https://gromacs.bioexcel.eu/t/error-building-gromacs-2023-3-with-cuda-nvcc-gcc-compatibility-issue/8016>\
**Category:** User discussions\
**Tags:** installation, installation-error, cmake-error, make-error\
**Created:** [January 9, 2024, 6:18pm UTC](https://gromacs.bioexcel.eu/t/error-building-gromacs-2023-3-with-cuda-nvcc-gcc-compatibility-issue/8016 "2024-01-09T18:18:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poccia](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/poccia/32/1925_2.png) [@Poccia](https://gromacs.bioexcel.eu/u/Poccia)\
**Post date:** [January 9, 2024, 6:18pm UTC](https://gromacs.bioexcel.eu/t/error-building-gromacs-2023-3-with-cuda-nvcc-gcc-compatibility-issue/8016/1 "2024-01-09T18:18:00Z")

</div>

**System Information:**

- GROMACS version: 2023.3
- GROMACS modification: No
- OS: Pop!\_OS 22.04 LTS

**Issue Description:**

I’m attempting to install GROMACS 2023.3 with CUDA acceleration. Initially, I used the following cmake command:

```auto
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/cuda -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10

```

I had to specify `-DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10` because my NVCC version is 11.2, and GCC is 11.4. NVCC 11.2 is incompatible with GCC versions higher than 10. To resolve this, I installed GCC and G++ 10 and created a symbolic link to install Gromacs.

**Installation Process:**

- The `cmake` command executed successfully.
- The `make` command also completed without errors.
- However, the `make check` command encountered an error at 79%.

**Error Details:**

```auto
[79%] Building CXX object src/gromacs/fft/tests/CMakeFiles/fft-test.dir/fft.cpp.o
[79%] Building CXX object src/gromacs/fft/tests/CMakeFiles/fft-test.dir/ __/__ /__/testutils/unittest_main.cpp.o
[79%] Linking CXX executable ../../../../bin/fft-test
[79%] Built target fft-test
[79%] Building NVCC (Device) object src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utils-test.dir/gpu_utils-test_generated_typecasts_runner.cu.o
/usr/include/linux/types.h:12:27: error: expected initializer before ‘__s128’
   12 | typedef __signed__  __int128__ s128 __attribute__ ((aligned(16)));
      | ^ ~~~~~
CMake Error at gpu_utils-test_generated_typecasts_runner.cu.o.Release.cmake:280 (message):
  Error generating file
  /home/naiad/Downloads/gromacs-2023.3/build/src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utils-test.dir//./gpu_utils-test_generated_typecasts_runner.cu.o

make[3]: *** [src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utils-test.dir/build.make:84: src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utils-test.dir/gpu_utils-test_generated_typecasts_runner.cu.o] Erro 1
make[2]: *** [CMakeFiles/Makefile2:4927: src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utils-test.dir/all] Erro 2
make[1]: *** [CMakeFiles/Makefile2:3306: CMakeFiles/check.dir/rule] Erro 2
make: *** [Makefile:628: check] Erro 2

```

**Seeking Help:**

I have not found any related posts or links addressing this specific error. Does anyone have any insights or suggestions on how to resolve this issue?

---

<div class="post-metadata">

**Author:** ![Ramothy](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@Ramothy](https://gromacs.bioexcel.eu/u/Ramothy)\
**Post date:** [March 14, 2024, 9:55am UTC](https://gromacs.bioexcel.eu/t/error-building-gromacs-2023-3-with-cuda-nvcc-gcc-compatibility-issue/8016/2 "2024-03-14T09:55:49Z")

</div>

I get the same issue except with cuda toolkit 11.1 (im also on pop os and gcc-10) - any ideas?

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [March 14, 2024, 12:54pm UTC](https://gromacs.bioexcel.eu/t/error-building-gromacs-2023-3-with-cuda-nvcc-gcc-compatibility-issue/8016/3 "2024-03-14T12:54:30Z")

</div>

There seems to be problems with CUDA 11.x in the 2023.3, as you can see [here](https://manual.gromacs.org/2023.3/user-guide/known-issues.html#unable-to-compile-with-cuda-11-3). I don’t know specifically how to help you, but I am using GROMACS2023.2 in my workstation with CUDA12.30 and gcc/g++ 12.3.0. I have a RTX4080. I would say try to install CUDA12 to see if this solves the issue, as I remember having issues as well when I was trying to compile with CUDA11.X (I don’t remember the version). I never found the root of it but directly went for CUDA12. Hope this helps at least a bit!
