Skip to content

GROMACS is a molecular dynamics package.

Documentation: https://manual.gromacs.org/documentation/current/install-guide/index.html

Picotte

CPU-only (non-CUDA) version with MPI

N.B. DO NOT follow the "quick and dirty cluster installation" instructions.

Modules:

  • cmake
  • intel/composerxe/2020u4
  • picotte-openmpi/intel/2020/4.1.0
  • hwloc/2.4.1

May need to install sphinx to generate documentation:

$ pip install --user sphinx

Single pass cmake with these options (or use ccmake to avoid having to edit long command lines):

  • REGRESSIONTEST_DOWNLOAD=ON
  • CMAKE_INSTALL_PREFIX=/ifs/somewhere/appropriate/2021.1
  • CMAKE_BUILD_TYPE=Release
  • GMX_FFT_LIBRARY=mkl
  • CMAKE_CXX_COMPILER=/ifs/opt/openmpi/intel/2020/4.1.0/bin/mpic++
  • CMAKE_C_COMPILER=/ifs/opt/openmpi/intel/2020/4.1.0/bin/mpicc
  • GMX_MPI=ON
  • GMX_THREAD_MPI=OFF
  • GMX_OPENMP=ON
  • GMX_HWLOC=ON
  • MPIEXEC_MAX_NUMPROCS=2048
  • HWLOC_DIR=/ifs/opt/hwloc/2.4.1
  • HWLOC_INFO=/ifs/opt/hwloc/2.4.1/bin/hwloc-info
  • HWLOC_hwloc.h_DIS=/ifs/opt/hwloc/2.4.1/include
  • HWLOC_hwloc_LIBRARY=/ifs/opt/hwloc/2.4.1/lib/libhwloc.so
  • PYTHON_EXECUTABLE=/ifs/opt/intel/2020/intelpython3/bin/python3.7 (Python is part of intel/composerxe/2020u4 and should be picked up automatically without having to specify to cmake)

CUDA version (update 2023 in progress)

C++ compiler needs C++17 support. Both available compilers on Picotte work (GCC 9.2.0, Intel Composer XE 2020).

Session on GPU node:

srun -p gpu --gpus=1 --cpus-per-gpu=12  --mem=40G --time=8:00:00 --pty /bin/bash

Modules

First, ensure Picotte CUDA modulefiles are available:

[juser@gpu003 ~]$ module use /ifs/opt_cuda/modulefiles

Load these modulefiles:

cmake
hwloc/cuda11.4
picotte-openmpi/cuda11.4
cuda11.4/blas
cuda11.4/fft
intel/mkl (??? MAYBE)
python/gcc/3.10
perl-threaded

Configure with Cmake

Download tar file and expand: gromacs-2023.tar.gz:

[juser@gpu003 ~]$ cd /ifs/groups/myrsrchGrp/Software/Src
[juser@gpu003 Src]$ wget https://ftp.gromacs.org/gromacs/gromacs-2023.tar.gz
[juser@gpu003 Src]$ tar -xf gromacs-2023.tar.gz

Make a build directory and configure; we use the terminal interface rather than writing a long cmake command with many options:

[juser@gpu003 Src]$ cd gromacs-2023
[juser@gpu003 gromacs-2023]$ mkdir BUILD
[juser@gpu003 gromacs-2023]$ cd BUILD
[juser@gpu003 BUILD]$ ccmake -DCMAKE_C_COMPILER=`which gcc` -DCMAKE_CXX_COMPILER=`which g++` -DPERL_EXECUTABLE=`which perl`

Then, hit “t” to toggle on advanced mode to see all variables/options.

  • Use the arrow keys to move around.
  • Hit “Enter” to start editing the values.
  • Some options are multiple choice; hit “Enter” or “Space” to switch between available options.

Set these; if not specified, leave at defaults:

  • CMAKE_INSTALL_PREFIX = /ifs/groups/myrsrchGrp/Software/Gromacs/2023
  • GMX_FFT_LIBRARY = fftpack (NOTE this will change when we turn on CUDA)
  • GMX_GPU = CUDA
  • GMX_HWLOC = ON (NOTE needs hwloc >= ??)
  • GMX_MPI = ON
  • GMX_THREAD_MPI = OFF
  • MPIEXEC_MAX_NUMPROCS = 2048

Then, hit “c” to configure. The selection of “GMX_GPU=CUDA” above will bring in more options. Check that these are set:

  • GMX_GPU_FFT_LIBRARY = cuFFT
  • HWLOC_hwloc.h_DIRS = /ifs/opt_cuda/hwloc/cuda11.4/2.9.0/include

Build and Install

make -j 12

and then

make install

References

[1] GROMACS Installation Guide

[2] Mellanox HPC-X™ Software Toolkit website