# Gromacs 2018.8 compil error with

**URL:** <https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324>\
**Category:** User discussions\
**Created:** [February 13, 2024, 3:43am UTC](https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324 "2024-02-13T03:43:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![roozi](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@roozi](https://gromacs.bioexcel.eu/u/roozi)\
**Post date:** [February 13, 2024, 3:43am UTC](https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324/1 "2024-02-13T03:43:56Z")

</div>

GROMACS version:2018.8  
GROMACS modification: No

i m getting an error compiling gromacs2018.8 on my system with the following:  
cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DCMAKE\_INSTALL\_PREFIX=/usr/local/gromacs2022 -DCMAKE\_BUILD\_TYPE=Debug -DGMX\_GPU=CUDA -DGMXAPI=ON -

my cuda version is 12.0 and the gpu model: RTX-4060 .

The error complains about " Unsupported gpu architecture 'compute\_30"  
i tried adding DGMX\_CUDA\_TARGET\_COMPUTE=86 as an option to build but to no avail.  
i wonder what is the workaround? is that possible to compile this version with a cuda v12.0 ?

i tried to compile without DGMX\_CUDA option , but again i got the below msg:

> Blockquote  
> nvcc fatal : Unsupported gpu architecture ‘compute\_30’  
> CMake Error at libgromacs\_generated\_pme-3dfft.cu.o.Release.cmake:220 (message):  
> Error generating  
> /root/gromacs-2018.8/build/src/gromacs/CMakeFiles/libgromacs.dir/ewald/./libgromacs\_generated\_pme-3dfft.cu.o

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [February 13, 2024, 12:42pm UTC](https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324/2 "2024-02-13T12:42:12Z")

</div>

Hi!

GROMACS 2018 is quite old and does not support CUDA 12. The supported GROMACS versions now are 2024.0 and 2023.4, both should work with CUDA 12 just fine.

If, for whatever reason, you cannot use newer GROMACS, then you should **clear the build directory** , and run `cmake` with `-DGMX_CUDA_TARGET_SM=90` (in addition to whatever other flags you have). RTX-4060 has sm\_90 architecture, not sm\_86. And when compiling for a fixed device, it’s better to specify the real architecture (`GMX_CUDA_TARGET_SM`), not a virtual one (`GMX_CUDA_TARGET_COMPUTE`).

If you want to compile without GPU, you should either clear the build directory of explicitly say `-DGMX_GPU=OFF`. Your previous choice of `GMX_GPU=CUDA` is remembered otherwise.

---

<div class="post-metadata">

**Author:** ![roozi](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@roozi](https://gromacs.bioexcel.eu/u/roozi)\
**Post date:** [February 14, 2024, 3:52am UTC](https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324/3 "2024-02-14T03:52:04Z")

</div>

Hi,  
Then i shall also downgrade to lower version of CUDA? (and which version is ok?)  
thank you for the support.

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [February 14, 2024, 1:25pm UTC](https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324/4 "2024-02-14T13:25:07Z")

</div>

> [@roozi](#):
>
> Then i shall also downgrade to lower version of CUDA? (and which version is ok?)

None of the solutions I suggested require downgrading CUDA. GROMACS 2023/2024 will work fine with CUDA 12. And if you set the CMake flags right, older versions will likely work too, although they will lack the performance tuning for the RTX 40xx series and other improvements added in newer GROMACS versions, such as GPU-resident mode.

But, if you cannot use newer GROMACS _and_ cannot use any of the flags I suggested, then downgrading CUDA _could_ work. The latest version of CUDA supported by GROMACS 2018 is CUDA 10.

---

<div class="post-metadata">

**Author:** ![roozi](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@roozi](https://gromacs.bioexcel.eu/u/roozi)\
**Post date:** [February 14, 2024, 6:47pm UTC](https://gromacs.bioexcel.eu/t/gromacs-2018-8-compil-error-with/8324/5 "2024-02-14T18:47:53Z")

</div>

i need to use tabulated potential and hence can not go for the recent version. i applied the necessary flags as you suggested and it all went smoothly. thank you.
