Problems with installing GPU-supported Gromacs on a cluster and can't find cuda root

GROMACS version: 2022.4

Dear gromacs users:

Recently I’m trying to install a GPU-supported version on the login node of a cluster which doesn’t have a GPU hardware. And I don’t have sudo access.

From the topic discussed in Gromacs 2020.4 compilation with GPU-support on non-GPU nodes, I understand that compling a GPU version does not necessarily need a GPU hardware, but I didn’t know the details in installation.

In my case, I loaded cuda from module on the node and however I couldn’t find the cuda root. It’s not in the defalut root: /usr/local/cuda. So is there any suggestions to find the cuda root which could help me install, or should I install another cuda toolkit for myself in my own directory?

Try:
module show <cuda_module>

Thanks for your suggestions, I tried this command before, but I can’t find the indicated path:

(base) xia.m@hebe:~$ module load cuda
        CUDA runtime library path

(base) xia.m@hebe:~$ module show cuda
-------------------------------------------------------------------
/hosts/hebe/programs/modules/modulefiles/cuda:

module-whatis   {Sets runtime library path for CUDA executables}
prepend-path    LD_LIBRARY_PATH /usr/local/cuda/lib64
-------------------------------------------------------------------

(base) xia.m@hebe:~$ ls /usr/local/cuda
ls: cannot access '/usr/local/cuda': No such file or directory

Then it’s probably the wrong module. There’s got to be a module called “cuda_toolkit” or something like that. Use module spider cuda to find it, and after loading it, run which nvcc to get the path. “nvidia” might also be another keyword to search for.

Thanks a lot for your help! I’ll try these methods soon.