You are here

Gromacs 2019.4 with GPU for LX (intel)

Webpage

http://www.gromacs.org/

Version

2019.4

Build Environment

  • Intel Parallel Studio XE 2017 update 8
  • GCC 6.3.1 (Software Collections devtoolset-7)
  • CUDA 9.1
  • cmake 3.8.2

Files Required

  • gromacs-2019.4.tar.gz
  • regressiontests-2019.4.tar.gz
  • tests_CMakelists.patch

--- tests/CMakeLists.txt.org    2019-10-07 19:24:40.524863424 +0900
+++ tests/CMakeLists.txt        2019-10-07 19:25:13.736715189 +0900
@@ -125,6 +125,11 @@
         endif()
         #We should use MPIEXEC_NUMPROC_FLAG but gmxtest.pl doesn't let us pass it
     endif()
+    if(GMX_THREAD_MPI)
+        set(GMX_TEST_NUMBER_PROCS 8 CACHE STRING "Number of processors used for testing")
+        mark_as_advanced(GMX_TEST_NUMBER_PROCS)
+        list(APPEND ARGS -nt ${GMX_TEST_NUMBER_PROCS})
+    endif()
     if(GMX_BINARY_SUFFIX)
         list(APPEND ARGS -suffix ${GMX_BINARY_SUFFIX})
     endif()

(To avoid errors of regression tests of thread MPI version on 14-core CPUs (ccgpup).)

  • fftw-3.3.8.tar.gz (Build node ccgpup cannot directly download tarball of fftw.)

Build Procedure

#!/bin/sh

VERSION=2019.4
INSTALL_PREFIX=/local/apl/lx/gromacs${VERSION}-CUDA

BASEDIR=/home/users/${USER}/Software/Gromacs/${VERSION}/
GROMACS_TARBALL=${BASEDIR}/gromacs-${VERSION}.tar.gz
REGRESSION_TARBALL=${BASEDIR}/regressiontests-${VERSION}.tar.gz
WORKDIR=/work/users/${USER}
REGRESSION_PATH=${WORKDIR}/regressiontests-${VERSION}

FFTW_VER=3.3.8
FFTW_PATH=${BASEDIR}/fftw-${FFTW_VER}.tar.gz

PATCH_TEST=${BASEDIR}/tests_CMakelists.patch

PARALLEL=12

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

module purge
module load scl/devtoolset-6
module load intel_parallelstudio/2017update8
module load cuda/9.1
module load cmake/3.8.2

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

if [ -d regressiontests-${VERSION} ]; then
  mv regressiontests-${VERSION} regressiontests_erase
  rm -rf regressiontests_erase &
fi

tar xzf ${GROMACS_TARBALL}
tar xzf ${REGRESSION_TARBALL}
cd gromacs-${VERSION}
patch -p0 < ${PATCH_TEST}

# compiler setting
export CC=icc
export CXX=icpc
export F77=ifort
export F90=ifort
export FC=ifort

# single precision, no MPI
mkdir rccs-s
cd rccs-s
cmake .. \
   -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
   -DCMAKE_VERBOSE_MAKEFILE=ON \
   -DGMX_MPI=OFF \
   -DGMX_GPU=ON \
   -DGMX_DOUBLE=OFF \
   -DGMX_THREAD_MPI=ON \
   -DGMX_BUILD_OWN_FFTW=ON \
   -DGMX_BUILD_OWN_FFTW_URL=${FFTW_PATH} \
   -DREGRESSIONTEST_DOWNLOAD=OFF \
   -DREGRESSIONTEST_PATH=${REGRESSION_PATH}
make -j${PARALLEL} && make check && make install
cd ..

# compiler setting for MPI versions
export CC=mpiicc
export CXX=mpiicpc
export F77=mpiifort
export F90=mpiifort
export FC=mpiifort

# single precision, with MPI
mkdir rccs-mpi-s
cd rccs-mpi-s
cmake .. \
   -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
   -DCMAKE_VERBOSE_MAKEFILE=ON \
   -DGMX_MPI=ON \
   -DGMX_GPU=ON \
   -DGMX_DOUBLE=OFF \
   -DGMX_THREAD_MPI=OFF \
   -DGMX_BUILD_OWN_FFTW=ON \
   -DGMX_BUILD_OWN_FFTW_URL=${FFTW_PATH} \
   -DREGRESSIONTEST_DOWNLOAD=OFF \
   -DREGRESSIONTEST_PATH=${REGRESSION_PATH}
make -j${PARALLEL} && make check && make install
cd ..