# Gromacs compilation: Could NOT find CUDA

**URL:** https://discourse.cmake.org/t/gromacs-compilation-could-not-find-cuda/13405
**Category:** Usage
**Tags:** os:linux, lang:cuda
**Created:** [January 15, 2025, 2:45pm UTC](https://discourse.cmake.org/t/gromacs-compilation-could-not-find-cuda/13405 "2025-01-15T14:45:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Natalia\_Chesnokova](https://discourse.cmake.org/user_avatar/discourse.cmake.org/natalia_chesnokova/32/5279_2.png) [@Natalia\_Chesnokova](https://discourse.cmake.org/u/Natalia_Chesnokova)
#### Post date: [January 15, 2025, 2:45pm UTC](https://discourse.cmake.org/t/gromacs-compilation-could-not-find-cuda/13405/1 "2025-01-15T14:45:14Z")

</div>

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:

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

```

My error massage:

```auto
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.
