Gromacs compilation: Could NOT find CUDA

Natalia Chesnokova
Wed, 15 Jan 2025 14:45:14 +0000
Usage

Hi everyone!

When I compile Gromacs with GPU acceleration from source code, I get a message “Could NOT find CUDA (missing: CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS
CUDA_CUDART_LIBRARY)” when running the Cmake command.
My Cmake command:

cmake .. -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda

My error massage:

CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find CUDA (missing: CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS
  CUDA_CUDART_LIBRARY) (Required is at least version "11.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindCUDA.cmake:1291 (find_package_handle_standard_args)
  cmake/gmxManageCuda.cmake:45 (find_package)
  CMakeLists.txt:700 (include)

I’ve tried to solve my problem with cuda shell export CUDA_VISIBLE_DEVICES=0,1, but it didn’t help.
Please help to fix this error.

1 post - 1 participant