Gromacs 5.1.5 for LX with GPU support (gcc)

Webpage

http://www.gromacs.org/

Version

5.1.5

Build Environment

  • GCC 4.8.5
  • Intel MKL 2018 Update 2
  • Intel MPI 2017.3.196
  • FFTW 3.3.2 (SSE enabled)
  • cmake 2.8.12.2
  • CUDA 8.0.61

Files Required

  • gromacs-5.1.5.tar.gz
  • (regressiontests-5.1.5.tar.gz; testset)

Build Procedure

#!/bin/sh

VERSION=5.1.5

GROMACS_TARBALL=/home/users/${USER}/gromacs-${VERSION}.tar.gz
#REGRESSION=/home/users/${USER}/regressiontests-${VERSION} # unpacked

INSTALL_PREFIX=/local/apl/lx/gromacs515-gnu-CUDA
WORKDIR=/work/users/${USER}

#---------------------------------------------------------------------
umask 0022

cd ${WORKDIR}
if [ -d gromacs-${VERSION} ]; then
  mv gromacs-${VERSION} gromacs_erase
  rm -rf gromacs_erase &
fi

tar xzf ${GROMACS_TARBALL}
cd gromacs-${VERSION}

# single precision, no MPI
mkdir rccs-gnu-cuda
cd rccs-gnu-cuda
cmake .. \
    -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DGMX_MPI=OFF \
    -DGMX_GPU=ON \
    -DGMX_DOUBLE=OFF \
    -DGMX_THREAD_MPI=ON \
    -DGMX_FFT_LIBRARY=fftw3 \
    -DREGRESSIONTEST_DOWNLOAD=OFF
make -j12 && make install
cd ..

# compiler setting for MPI versions
export CC=mpicc
export CXX=mpicxx
export F77=mpif90
export F90=mpif90
export FC=mpif90

# single precision, with MPI
mkdir rccs-gnu-cuda-mpi
cd rccs-gnu-cuda-mpi
cmake .. \
    -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DGMX_MPI=ON \
    -DGMX_GPU=ON \
    -DGMX_DOUBLE=OFF \
    -DGMX_THREAD_MPI=OFF \
    -DGMX_FFT_LIBRARY=fftw3 \
    -DREGRESSIONTEST_DOWNLOAD=OFF
make -j12 && make install
cd ..