# Nonbonded interactions on the GPU

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

• I don't know gromacs but that would be normal for GPU in ML, CPU and GPU uses two different compilations.
– M__
Nov 2 '20 at 9:38
• 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. Nov 2 '20 at 11:19
• I've put a post on the Meta forum bioinformatics.meta.stackexchange.com/questions/251/…
– M__
Nov 3 '20 at 11:59
• Try here: mattermodeling.stackexchange.com. There's an entire GROMACS tag there with way more questions. Dec 7 '20 at 2:57

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
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)
• @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. Nov 3 '20 at 21:14