Gromacs on gpu problem

Hi
I tried running cmake command to get compiled gromacs GPU but I get the following error
vboxuser@mbox:~/Downloads/gromacs-2024.1/build$ cmake --version
cmake version 3.29.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).
vboxuser@mbox:~/Downloads/gromacs-2024.1/build$ cmake … -DGMX_GPU=CUDA -DGMX_MPI=ON -DCMAKE_INSTALL_PREFIX=/home/marydoe/programs
– The C compiler identification is GNU 9.4.0
– The CXX compiler identification is GNU 9.4.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Python3: /usr/bin/python3.8 (found suitable version “3.8.10”, minimum required is “3.7”) found components: Interpreter Development Development.Module Development.Embed
– Selected GPU FFT library - cuFFT
– Found OpenMP_C: -fopenmp (found version “4.5”)
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”)
– Performing Test CFLAGS_WARN_NO_MISSING_FIELD_INITIALIZERS
– Performing Test CFLAGS_WARN_NO_MISSING_FIELD_INITIALIZERS - Success
– Performing Test CFLAGS_EXCESS_PREC
– Performing Test CFLAGS_EXCESS_PREC - Success
– Performing Test CFLAGS_COPT
– Performing Test CFLAGS_COPT - Success
– Performing Test CFLAGS_NOINLINE
– Performing Test CFLAGS_NOINLINE - Success
– Performing Test CXXFLAGS_WARN_NO_MISSING_FIELD_INITIALIZERS
– Performing Test CXXFLAGS_WARN_NO_MISSING_FIELD_INITIALIZERS - Success
– Performing Test CXXFLAGS_EXCESS_PREC
– Performing Test CXXFLAGS_EXCESS_PREC - Success
– Performing Test CXXFLAGS_COPT
– Performing Test CXXFLAGS_COPT - Success
– Performing Test CXXFLAGS_NOINLINE
– Performing Test CXXFLAGS_NOINLINE - Success
– Looking for include file unistd.h
– Looking for include file unistd.h - found
– Looking for include file pwd.h
– Looking for include file pwd.h - found
– Looking for include file dirent.h
– Looking for include file dirent.h - found
– Looking for include file time.h
– Looking for include file time.h - found
– Looking for include file sys/time.h
– Looking for include file sys/time.h - found
– Looking for include file io.h
– Looking for include file io.h - not found
– Looking for include file sched.h
– Looking for include file sched.h - found
– Looking for include file xmmintrin.h
– Looking for include file xmmintrin.h - found
– Looking for gettimeofday
– Looking for gettimeofday - found
– Looking for sysconf
– Looking for sysconf - found
– Looking for nice
– Looking for nice - found
– Looking for fsync
– Looking for fsync - found
– Looking for _fileno
– Looking for _fileno - not found
– Looking for fileno
– Looking for fileno - found
– Looking for _commit
– Looking for _commit - not found
– Looking for sigaction
– Looking for sigaction - found
– Performing Test HAVE_BUILTIN_CLZ
– Performing Test HAVE_BUILTIN_CLZ - Success
– Performing Test HAVE_BUILTIN_CLZLL
– Performing Test HAVE_BUILTIN_CLZLL - Success
– Looking for clock_gettime in rt
– Looking for clock_gettime in rt - found
– Looking for feenableexcept in m
– Looking for feenableexcept in m - found
– Looking for fedisableexcept in m
– Looking for fedisableexcept in m - found
– Checking for sched.h GNU affinity API
– Performing Test sched_affinity_compile
– Performing Test sched_affinity_compile - Success
– Looking for include file mm_malloc.h
– Looking for include file mm_malloc.h - found
– Looking for include file malloc.h
– Looking for include file malloc.h - found
– Checking for _mm_malloc()
– Checking for _mm_malloc() - supported
– Looking for posix_memalign
– Looking for posix_memalign - found
– Looking for memalign
– Looking for memalign - not found
– MPI is not compatible with thread-MPI. Disabling thread-MPI.
– Checking for module ‘mpi-cxx’
– No package ‘mpi-cxx’ found
– Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
– Could NOT find MPI (missing: MPI_CXX_FOUND CXX)
CMake Error at cmake/gmxManageMPI.cmake:87 (message):
MPI support requested, but no suitable MPI compiler found. Either set the
MPI_CXX_COMPILER to the MPI compiler wrapper (often called mpicxx or
mpic++), set CMAKE_CXX_COMPILER to a default-MPI-enabled compiler, or set
the variables reported missing for MPI_CXX above.
Call Stack (most recent call first):
CMakeLists.txt:552 (include)

– Configuring incomplete, errors occurred!

either you dont have MPI installed or couldnt detect it, so direc the location of MPI

I installed Mpi and now I get the following error

now your cuda is missing, you need to point the cuda direction if it is installed

thank you
How to do that? Could you give me command example or something like that? I installed cuda toolkit from gromacs installation guide, compiled it.

please check nvcc --version , also paste your compilation flags, Did the compilation detected any GPU?

export PATH=*path to cuda exe:$PATH
export LD_LIBRARY_PATH=/*pathto library:$LD_LIBRARY_PATH

Ok nvcc version is nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
and are these commands ready to paste into terminal?
I stopped at 5th step of this guide https://manual.gromacs.org/documentation/current/install-guide/index.html
tar xfz gromacs-2024.1.tar.gz
cd gromacs-2024.1
mkdir build
cd build
cmake … -DGMX_GPU=CUDA -DGMX_MPI=ON -DCMAKE_INSTALL_PREFIX=

please check the requirement for the current version of gromacs here

NVIDIA CUDA toolkit with minimum version 11.0 is required

Okay thank you I will fix it