Gromacs install with conda but can't run on GPU

GROMACS version:2024.4
GROMACS modification: Yes/No
Here post your question
I installed gromacs-2024.4 and cudatoolkit=11.8 through conda, but when I tried to specify the GPU running instruction gmx mdrun, I was told it could not run:

This is not directly related to GPUs. I think it will run when you at the option -ntmpi N where N is the number of GPUs you want to run on.

But it shows me this:
Please consider rebuilding gmx mdrun with the GMX_USE_RDTSCP=ON CMake option?
And the ‘-ntmpi’ seems not work well on GPU

That note is not relevant to the problem.

The problem then might be that your build does not support OpenMP. Can you run gmx -version and report the output here?

Of course. Here are the output:


You do have OpenMP support. What do you mean with “-ntmpi does not work well on GPU”? Please provide error messages instead of such generic statements.

I wrote that you should set the number -ntmpi to the number of GPUs you want to use, which I guess is 1. And why did you add the -gpu_id option?

I have tried the command,the same error:


And if I run with CPU,it can run but show me these problem:

Not exactly the same error.

You do have a GPU in the machine? If so, then there is likely a driver and/or runtime compatibility issue.

  1. The full log file (Roq1-XopQ_nvt.log in your case) contains the hardware report section at the top, which lists all detected GPUs and whether they are compatible or not. It is usually a good idea to look at it when you have any issues with hardware.
  2. OpenCL is not compatible with recent NVIDIA GPUs, starting with Volta.
  3. Even on hardware supported by OpenCL, CUDA backend will likely provide a much better performance, so consider installing nompi_cuda version of the package.

Ah, I missed that the GPU is from Nvidia.

Hello,thanks for your reply. And here are the ouputs of my *_nvt.log:


“GPU Detection failed” means that GROMACS has troubles finding NVIDIA OpenCL library. Does clinfo show the GPU?

P.S.: I repeat the recommendation to switch to CUDA unless you’re absolutely sure you want OpenCL.

It show me this when i run nvidia-smi:

Hi! If you are using GROMACS with OpenCL, you need to check the output of clinfo; just because nvidia-smi detects the GPU does not mean all the OpenCL libraries are installed.

Thanks for your advice,so i tried clinfo to show the information of the OpenCL, it shows me:“Number of platforms 0”

This means you don’t have NVIDIA OpenCL libraries installed. However, please refer to my previous post: OpenCL backend in GROMACS does not support GPUs newer than Volta/Turing (and you have Ada, which is newer). So, even if you install NVIDIA OpenCL libraries, your installation of GROMACS will still be unable to use your GPUs. You need to install GROMACS with CUDA backend.

Hello, when i try to run:
gmx mdrun -deffnm *_ie -rerun *_md.xtc -nb gpu
it show me this:


However everything work well on:
gmx grompp -f md.mdp -c *_npt.gro -t *_npt.cpt -p topol.top -o *_md.tpr?

Hi!

I suspect you’re trying to use energy groups. GROMACS does not support energy groups on GPUs.

The -rerun functionality allows you to run the full simulation (computationally-expensive) on the GPU without energy groups, and then “replay” it (much cheaper) with energy groups on the CPU. But during the rerun you still can’t use GPUs with energy groups.