Installation of gromacs w/ CUDA & MPI

GROMACS version: 2021.3
GROMACS modification: No

Hi, I am installing gromacs on the GPUed HPC, I managed to install a GPU version w/o any problems, but thought to also do GPU with MPI

my commands are:

cmake .. -DMPI_C_COMPILER=mpicc  -DGMX_GPU=CUDA -DGMX_MPI=ON -DGMX_BUILD_MDRUN_ONLY=on  -DGMX_BUILD_OWN_FFTW=ON  -DBUILD_SHARED_LIBS
=yes  -DCMAKE_INSTALL_PREFIX=$(pwd)/..  

and upon make -j 8 I get the following error:

[ 97%] Linking CXX executable ../../bin/mdrun_mpi

../../lib/libgromacs_mdrun_mpi.so.6.0.0: undefined reference to `gmx::PmePpCommGpu::PmePpCommGpu(int, int, DeviceContext const&, DeviceStream const&)'

../../lib/libgromacs_mdrun_mpi.so.6.0.0: undefined reference to `gmx::GpuHaloExchange::GpuHaloExchange(gmx_domdec_t*, int, int, DeviceContext const&, DeviceStream const&, DeviceStream const&, int, gmx_wallcycle*)'

collect2: error: ld returned 1 exit status

make[2]: *** [src/programs/CMakeFiles/mdrun.dir/build.make:113: bin/mdrun_mpi] Error 1

make[1]: *** [CMakeFiles/Makefile2:4578: src/programs/CMakeFiles/mdrun.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

I am not sure what this means - any tips would be amazing!

Some amendments:

  • I should have BUILD_SHARED_LIBS=off so changed
  • I am getting the message ‘-- The mdrun-only build is deprecated’ which confuses me (I guess I am old school) how would one get mdrun with mpi then?

More general Q:
If I have HPC with 4 GPUs per node, I would not really ever want to run across more than that, does ot get managed by OpenMP? i.e. do I even need MPI installation?

Thank you!

Edit to add, same error still:

[ 97%] Linking CXX executable ../../bin/mdrun_mpi
../../lib/libgromacs_mdrun_mpi.a(domdec.cpp.o): In function `constructGpuHaloExchange(gmx::MDLogger const&, t_commrec const&, gmx::DeviceStreamManager const&, gmx_wallcycle*)':
domdec.cpp:(.text+0xb878): undefined reference to `gmx::GpuHaloExchange::GpuHaloExchange(gmx_domdec_t*, int, int, DeviceContext const&, DeviceStream const&, DeviceStream const&, int, gmx_wallcycle*)'
../../lib/libgromacs_mdrun_mpi.a(runner.cpp.o): In function `gmx::Mdrunner::mdrunner()':
runner.cpp:(.text+0x8af8): undefined reference to `gmx::PmePpCommGpu::PmePpCommGpu(int, int, DeviceContext const&, DeviceStream const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/programs/CMakeFiles/mdrun.dir/build.make:118: bin/mdrun_mpi] Error 1
make[1]: *** [CMakeFiles/Makefile2:4618: src/programs/CMakeFiles/mdrun.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....