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

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

  • $\begingroup$ 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 $\endgroup$ Nov 2 '20 at 16:25
  • $\begingroup$ @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. $\endgroup$
    – Devon Ryan
    Nov 3 '20 at 21:14
  • $\begingroup$ This was a great answer fra! We have a few unanswered GROMACS questions here, are you able to help us out at all with those? I'm trying to help take care of the unanswered queue. $\endgroup$ Jul 17 '21 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.