<p>As the error tells you: <code>the GROMACS binary has been built without GPU support</code>.
Did you install gromacs with <code>apt-get</code>? Usually these kind of programs are shipped with a <code>basic</code> built, with a lot of features disabled.
If you did built gromacs from source, then cuda was not found during configuration.
I would try building gromacs from source and:</p>
<ol>
<li>be sure cuda is in your path and check that <code>nvcc</code> and the drivers have a matching version</li>
<li>run cmake and check the output, to see if the video card is recognised</li>
<li>run cmake with <code>-DGMX_GPU=ON</code></li>
</ol>
<p>Note that it seems that gromacs doesn't support multiple gpu accelerations( e.g. it is either <code>openCL</code> or <code>cuda</code>, you can't have both)</p>

CC BY-SA 4.0
2020-11-02T16:25:46.607Z
thanks for helping . i did it already used this command -DGMX_GPU=ON but still got error . i'm now removing gromacs and will install it from scratch taking your answer in my consideration and will get back .. thanks again
user5520049
CC BY-SA 4.0
2020-11-03T21:14:05.440Z
@user5520049 When you have time, please note whether you were able to finish compiler with `-DGMX_GPU=ON`, noting that you would need to still copy the resulting recompiled binary to somewhere in your $PATH.
Devon Ryan
CC BY-SA 4.0
2021-07-17T18:46:20.967Z
This was a great answer fra! We have a [few unanswered GROMACS questions here](https://mattermodeling.stackexchange.com/questions/tagged/gromacs?tab=Unanswered), are you able to help us out at all with those? I'm trying to help take care of the unanswered queue.
user1271772
CC BY-SA 4.0
2020-11-02T09:46:57.173Z
2020-11-02T11:00:06.630Z
2020-11-02T11:00:06.630Z
fra
<p>i'm using this command</p>
<pre><code>gmx mdrun -deffnm nvt0 -nb gpu
</code></pre>
<p>but got</p>
<pre><code>Nonbonded interactions on the GPU were requested with -nb gpu, but the GROMACS
binary has been built without GPU support. Either run without selecting GPU
options or recompile GROMACS with GPU support enabled
</code></pre>
<p>I've Nvidia rtx2060 with cuda 11.1 on ubnutu 18.4.5</p>

CC BY-SA 4.0
2020-11-02T09:38:48.600Z
I don't know gromacs but that would be normal for GPU in ML, CPU and GPU uses two different compilations.
M__
CC BY-SA 4.0
2020-11-02T11:19:27.227Z
Someone (with the same GPU) asked the same question during the weekend that they have now deleted, where I said about CUDA and cmake with `-DGMX_GPU=ON`. If this was you, please do not do this as you are wasting volunteers' time —and I believe may get you blocked (maybe?). A lesser evil is to edit the Q to bump it.
Matteo Ferla
CC BY-SA 4.0
2020-11-03T11:59:11.600Z
I've put a post on the Meta forum https://bioinformatics.meta.stackexchange.com/questions/251/duplicate-ops-and-op-deletion-of-response-postings
M__
CC BY-SA 4.0
2020-12-07T02:57:26.520Z
Try here: https://mattermodeling.stackexchange.com/. There's an entire GROMACS tag there with way more questions.
user1271772
<python><gromacs>
Nonbonded interactions on the GPU
# Nonbonded interactions on the GPU

(Asked by: username_0 on 2020-11-02)

i'm using this command
gmx mdrun -deffnm nvt0 -nb gpu

but got
Nonbonded interactions on the GPU were requested with -nb gpu, but the GROMACS
binary has been built without GPU support. Either run without selecting GPU
options or recompile GROMACS with GPU support enabled

I've Nvidia rtx2060 with cuda 11.1 on ubnutu 18.4.5

**Tags:** python, gromacs
> **Comments:**
> **username_1**: I don't know gromacs but that would be normal for GPU in ML, CPU and GPU uses two different compilations.  
> **username_2**: Someone (with the same GPU) asked the same question during the weekend that they have now deleted, where I said about CUDA and cmake with `-DGMX_GPU=ON`. If this was you, please do not do this as you are wasting volunteers' time —and I believe may get you blocked (maybe?). A lesser evil is to edit the Q to bump it.  
> **username_1**: I've put a post on the Meta forum https://bioinformatics.meta.stackexchange.com/questions/251/duplicate-ops-and-op-deletion-of-response-postings  
> **username_3**: Try here: https://mattermodeling.stackexchange.com/. There's an entire GROMACS tag there with way more questions.  

---

## 1 answers

### Answer by username_4 on 2020-11-02. Score: 4

As the error tells you: `the GROMACS binary has been built without GPU support`.
Did you install gromacs with `apt-get`? Usually these kind of programs are shipped with a `basic` built, with a lot of features disabled.
If you did built gromacs from source, then cuda was not found during configuration.
I would try building gromacs from source and:

1. be sure cuda is in your path and check that `nvcc` and the drivers have a matching version
2. run cmake and check the output, to see if the video card is recognised
3. run cmake with `-DGMX_GPU=ON`

Note that it seems that gromacs doesn't support multiple gpu accelerations( e.g. it is either `openCL` or `cuda`, you can't have both)

> **Comments:**
> **username_0**: thanks for helping . i did it already used this command -DGMX_GPU=ON but still got error . i'm now removing gromacs and will install it from scratch taking your answer in my consideration and will get back .. thanks again  
> **username_5**: @user5520049 When you have time, please note whether you were able to finish compiler with `-DGMX_GPU=ON`, noting that you would need to still copy the resulting recompiled binary to somewhere in your $PATH.  
> **username_3**: This was a great answer fra! We have a [few unanswered GROMACS questions here](https://mattermodeling.stackexchange.com/questions/tagged/gromacs?tab=Unanswered), are you able to help us out at all with those? I'm trying to help take care of the unanswered queue.  

---

