Cmake error when trying to build GROMACS version 2022.3 on WSL Ubuntu

GROMACS version: 2022.3

Hello all!

I’m trying to install GROMACS on WSL2 using Ubuntu 22.04.1. Since I have an NVIDIA GeForce RTX 3060 GPU, CUDA enabled, I want to install GROMACS on the GPU.

However when I run this cmake command:

cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_MPI=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda

I get the following error:

CMake Error in /mnt/d/d/GROMACS stuff/gromacs-2022.3/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target “MPI::MPI_CXX” includes non-existent path

"/usr/lib/x86_64-linux-gnu/openmpi/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in /mnt/d/d/GROMACS stuff/gromacs-2022.3/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target “MPI::MPI_CXX” includes non-existent path

"/usr/lib/x86_64-linux-gnu/openmpi/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error at /usr/share/cmake-3.22/Modules/FindMPI.cmake:1264 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindMPI.cmake:1315 (_MPI_try_staged_settings)
/usr/share/cmake-3.22/Modules/FindMPI.cmake:1638 (_MPI_check_lang_works)
cmake/gmxManageMPI.cmake:65 (find_package)
CMakeLists.txt:426 (include)

– Configuring incomplete, errors occurred!
See also “/mnt/d/d/GROMACS stuff/gromacs-2022.3/build/CMakeFiles/CMakeOutput.log”.
See also “/mnt/d/d/GROMACS stuff/gromacs-2022.3/build/CMakeFiles/CMakeError.log”.

I have installed both openMPI and MPICH.
I have no idea why this error occurs and don’t know how to fix it since I am very new to MD simulation software and do not have a Computer Science background at all.

I would be very grateful for any and all help I can get here.

Thank You,
Sarthak

HI,

It may be that you have installed openMPI and MPICH in a location different that the one gromacs is looking at. You could check that your installation were properly terminated and that the location (PATH) corresponds to the one that GROMACS is looking.

\Alessandra

Hey Alessandra

Thanks for the reply.

Can you tell me how I can check the locations where I openMPI and MPICH have been installed?

Hi,
Probably in this case the best is to look back how you performed the installation. From the installation procedure, you might understand the location
\Alessandra