CUDA enabled Gromacs Cp2k installation error

GROMACS version:2023.2
GROMACS modification: No
CP2K version: 2023.2
Hello all,
I was trying to install gromacs with cp2k on nvidia GPU. I installed the psmp version of “local_cuda” cp2k. The cmake command I used is present is:

cmake ..  -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_GPU=CUDA -DGMX_CP2K=ON -DCP2K_DIR=/home/aka/Documents/cp2k-2023.2/lib/local_cuda/psmp -DCMAKE_PREFIX_PATH='/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/openblas-0.3.23;/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/scalapack-2.2.1' -DGMX_MPI=ON -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-cp2k-gpu/ -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -DGMX_EXTERNAL_BLAS=ON -DGMX_EXTERNAL_LAPACK=ON -DGPU_DEPLOYMENT_KIT_ROOT_DIR=/usr/share/cmake-3.16/Modules/FindCUDA/run_nvcc.cmake -DCP2K_LINKER_FLAGS="-Wl,--enable-new-dtags -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/openmpi-4.1.5/lib' -Wl,-rpath,'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/openmpi-4.1.5/lib'  -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/openblas-0.3.23/lib' -Wl,-rpath,'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/openblas-0.3.23/lib'  -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib' -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/lib' -Wl,-rpath,'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/lib' -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/lib' -Wl,-rpath,'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/lib' -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/scalapack-2.2.1/lib' -Wl,-rpath,'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/scalapack-2.2.1/lib' -L'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/nvidia/lib' -Wl,-rpath,'/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/nvidia/lib' -L'/lib/gcc/x86_64-linux-gnu/10/libgfortran.a' -L'/lib/gcc/x86_64-linux-gnu/10/libgfortran.so' -lelpa_openmp -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lgfortran -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi -lopenblas -lstdc++ -lcudart -lnvrtc -lcuda -lcufft -lcublas -lrt"

After running “make” I get the error that there is an undefined reference to mpi_*f08 such as in the
make_error.log (415.2 KB) file.

I didnt face this issue when installing the local psmp version.
Any hel is appreciated. Thank you

Specifying the mpicc path with -DMPI_C_COMPILER resolved the issue

Hi, I’m also trying to install GROMACS CP2K with CUDA enabled. My GPU version is NVIDIA A100 and CUDA version is 12.0. I encountered an error while compiling the CP2K on the step of generating arch files. It said that ‘-lcudart’ was not found. Dou you have any ideas how to solve the problem?

Thank you