Installing GROMACS with CP2K on NVIDIA A100 GPU

GROMACS version: 2024.2
GROMACS modification: No
CP2K version: 2024.1

I’m trying to install GROMACS with CP2K on NVIDIA A100 GPU. Should I install CP2K with CUDA enabled first, or should I just configure it during the GROMACS compilation?

I attempted to install CP2K with CUDA enabled, but encountered an error while generating the arch files. The error message indicated that -lcudart was not found, although other libraries such as libnvrtc, libcuda, libcufft, and libcublas were detected without any issues.

Could anyone help me resolve this issue? Thank you!

==================== generating arch files ====================
arch files can be found in the /content/cp2k-2024.1/tools/toolchain/install/arch subdirectory
path to nvcc is /usr/local/cuda-12.2/bin/nvcc
libnvrtc is found in ld search path
libcuda is found in ld search path
libcufft is found in ld search path
libcublas is found in ld search path
ERROR: (./scripts/generate_arch_files.sh) ld cannot find -lcudart, please check if cuda is installed or in system search path
ERROR: (./scripts/generate_arch_files.sh, line 170) Non-zero exit code detected.