# Cannot run short-ranged nonbonded interactions on a GPU because no GPU is detected

**URL:** <https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682>\
**Category:** User discussions\
**Tags:** mdrun\
**Created:** [November 21, 2023, 1:05am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682 "2023-11-21T01:05:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yachika](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yachika/32/2659_2.png) [@yachika](https://gromacs.bioexcel.eu/u/yachika)\
**Post date:** [November 21, 2023, 1:05am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/1 "2023-11-21T01:05:48Z")

</div>

### Current Setting

CUDA version:11.3 (driver version, runtime version same)  
cmake : 3.26.5  
Graphic Card : GTX2080  
Graphic driver version : 465.19.01

GROMACS version: 2023  
GROMACS modification: No

### gmx --version shows

[![](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/b/b1942ee0f9203cf072adf76c4cb09515b45bd168.png)](https://ibb.co/t2tMH7L)

### I ran to build gromacs

cmake .. -DGMX\_GIT\_VERSION\_INFO=OFF -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DGMX\_GPU=CUDA DGMX\_CUDA\_TARGET\_SM=80 -DGMX\_CUDA\_TARGET\_COMPUTE=80

#### But When I run gmx,

##### Cannot run short-ranged nonbonded interactions on a GPU because no GPU is detected.

erorr occured…

Please helpppp.

---

<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:** [November 21, 2023, 9:52am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/2 "2023-11-21T09:52:43Z")

</div>

Hi!

You compiled GROMACS for sm\_80 GPUs (-DGMX\_CUDA\_TARGET\_SM=80), but [RTX2080 is sm\_75](https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/). You need to recompile GROMACS with the correct settings.

---

<div class="post-metadata">

**Author:** ![yachika](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yachika/32/2659_2.png) [@yachika](https://gromacs.bioexcel.eu/u/yachika)\
**Post date:** [November 22, 2023, 12:28am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/3 "2023-11-22T00:28:00Z")

</div>

Reallllllllly thanks for replying!!! I didn’t know RTX2080 is sm\_75

But when I run with  
`cmake … -DGMX_GIT_VERSION_INFO=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA DGMX_CUDA_TARGET_SM=75 -DGMX_CUDA_TARGET_COMPUTE=75`

and when I ran `make` command,

[![](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/d/d19c8aac550ea60be1abe7ac2f1798eef2a8fdf8.png)](https://ibb.co/DzkC9kW)

This Error Occured… I can’t know the reason why this error occurs…

only running with `-DGMX_CUDA_TARGET_SM=80` option doesn’t makes error when I run `make`.

Can I solve this issue? really really thanks!!!

---

<div class="post-metadata">

**Author:** ![yachika](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yachika/32/2659_2.png) [@yachika](https://gromacs.bioexcel.eu/u/yachika)\
**Post date:** [November 22, 2023, 12:46am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/4 "2023-11-22T00:46:47Z")

</div>

Additional)  
when I ran with that cmake,  
[![](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/5/5d5183c3015cecae7689274348a1c3543e959810.png)](https://ibb.co/R6Ddw37)

They say ““ignoring command line”” and could not find python3…

Do they can be another reason for that problem?

Really Thanksss!!!

---

<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:** [November 22, 2023, 11:11am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/5 "2023-11-22T11:11:37Z")

</div>

Hi!

> I didn’t know RTX2080 is sm\_75

But why did you decide to set `GMX_CUDA_TARGET_*`? If you don’t know the device architecture, it’s better to not set these flags at all (but if you decide to build without them now, you need first to remove CMakeCache.txt file from the build directory).

> `cmake … -DGMX_GIT_VERSION_INFO=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA DGMX_CUDA_TARGET_SM=75 -DGMX_CUDA_TARGET_COMPUTE=75`

You are missing `-` in front of `DGMX_CUDA_TARGET_SM`. That’s the reason for the “ignoring command line” error. It should be `-DGMX_CUDA_TARGET_SM=75`, not just `DGMX_CUDA_TARGET_SM=75`. This is likely the reason for the “unexpected operand” compilation error.

The Python error should not be a problem unless you plan to use GMXAPI. The `DOWNLOAD_EXTRACT_TIMESTAMP` warning is, as it says, a developer-facing warning, and can safely be ignored.

On a related note: it is usually a much better idea to always use the latest release, GROMACS 2023.3 currently, then any older version. There had been quite a few bugfixes and minor improvements since then (e.g., the harmless but annoying `DOWNLOAD_EXTRACT_TIMESTAMP` warning was fixed in 2023.2).

---

<div class="post-metadata">

**Author:** ![yachika](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yachika/32/2659_2.png) [@yachika](https://gromacs.bioexcel.eu/u/yachika)\
**Post date:** [November 23, 2023, 4:14am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/6 "2023-11-23T04:14:05Z")

</div>

Really Thanks for Replying!!!

I reallized that I miss “-”.

And I downloaded the latest GROMACS 2023.3 version and make install with them.

But when I tried

> [@](#):
>
> cmake … -DGMX\_GIT\_VERSION\_INFO=OFF -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DGMX\_GPU=CUDA -DGMX\_CUDA\_TARGET\_SM=75 -DGMX\_CUDA\_TARGET\_COMPUTE=75

Still, make error occured.   
  
 ![err7](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/3/32264cd85bfb776cb77334282e070c785f1a9d74.png)  
  
  
also, I removed CMakeCache.txt  
and tried without CUDA TARGET, like

> [@](#):
>
> cmake … -DGMX\_GIT\_VERSION\_INFO=OFF -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DGMX\_GPU=CUDA

but still error same as above occured…in the same progress percent(13%, same message) make error only doesn’t occur when I use with SM80

Can I solve this? Thankkkkkkkk you !!

+) My Question flagged as spam and was hidden…

---

<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:** [November 23, 2023, 11:14am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/7 "2023-11-23T11:14:01Z")

</div>

Could you please post error messages as a text? It’s quite hard to read poor-contrast red-on-black text from a JPEG, and it makes it harder for others to search for a similar error if they encounter a similar error. That will also avoid triggering the spam filter, since images raise the suspicion.

Also, which version of CUDA are you using. If I recall correctly, the error looks similar to what happens with CUDA 11.3, which is known to be broken, see the first entry in [https://manual.gromacs.org/current/user-guide/known-issues.html](https://manual.gromacs.org/current/user-guide/known-issues.html).

---

<div class="post-metadata">

**Author:** ![yachika](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yachika/32/2659_2.png) [@yachika](https://gromacs.bioexcel.eu/u/yachika)\
**Post date:** [November 24, 2023, 12:53am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/8 "2023-11-24T00:53:59Z")

</div>

Sorry I’m new to gromacs community and didn’t know how to use.

#### 1. The error message was

> [@](#):
>
> 13%] Building NVCC (Device) object src/gromacs/CMakeFiles/libgromacs.dir/ewald/libgromacs\_generated\_pme\_ather.cu.o  
> /usr/local/cuda/include/texture\_indirect\_functions.h(111): error: Internal Compiler Error (codegen): “unexected operand in tex/surf handler”
> 
> CMake Error at libgromacs\_generated\_pme\_gather.cu.o.Release.cmake:280 (message):  
> Error generating file  
> /home/user/GROMACS\_TEST/gromacs-2023.3/gromacs-2023.3/build/src/gromacs/CMakeFiles/libgromacs.dir/ewald//libgromacs\_generated\_pme\_gather.cu.o
> 
> src/gromacs/CMakeFiles/libgromacs.dir/build.make:1364: recipe for target ‘src/gromacs/CMakeFiles/libgromac.dir/ewald/libgromacs\_generated\_pme\_gather.cu.o’ failed  
> make[2]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/ewald/libgromacs\_generated\_pme\_gather.cu.o] Error 1  
> CMakeFiles/Makefile2:4208: recipe for target ‘src/gromacs/CMakeFiles/libgromacs.dir/all’ failed  
> make[1]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2  
> Makefile:165: recipe for target ‘all’ failed  
> make: \*\*\* [all] Error 2

#### 2.Cuda Version

I’m using Cuda 11.3, which is the latest version of CUDA which I can use in my OS(Ubuntu 16.04) and GPU(NVIDIA GeForce RTX 2080 Ti), driver version is 465

I can’t use CUDA which is upper than 11.3 in my condition..

If that CUDA version is broken, is it better to use CUDA 11.2 ? I read the document to latest CUDA as I can when I run gromacs.

Really Thanks!!!

---

<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:** [November 24, 2023, 7:30pm UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/9 "2023-11-24T19:30:51Z")

</div>

> [@yachika](#):
>
> If that CUDA version is broken, is it better to use CUDA 11.2 ? I read the document to latest CUDA as I can when I run gromacs.

Yes, using CUDA 11.2 could solve your problem.

It is indeed better to use the newest CUDA when possible, but not when it is broken :)

---

<div class="post-metadata">

**Author:** ![yachika](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/yachika/32/2659_2.png) [@yachika](https://gromacs.bioexcel.eu/u/yachika)\
**Post date:** [November 27, 2023, 1:49am UTC](https://gromacs.bioexcel.eu/t/cannot-run-short-ranged-nonbonded-interactions-on-a-gpu-because-no-gpu-is-detected/7682/10 "2023-11-27T01:49:20Z")

</div>

Thank you so much!!!

Downgrading CUDA to 11.2 solved the issue without changing nvidia driver and OS !!!

REALLY THANKS for your kind reply

You saved my life!
