LAMMPS 16Mar18 (stable release) for LX with GPU support

Webpage

http://lammps.sandia.gov/

Version

16Mar18

Build Environment

  • Intel Compiler 2015.1.133
  • Intel MPI 5.0.2
  • Intel MKL 11.2.1
  • CUDA 8.0.61
  • libjpeg-turbo 1.2.90

Files Required

  • lammps-stable.tar.gz (16Mar18)
  • (some packages are downloaded during the installation; see the following script)

Build Procedure

#!/bin/sh

VERSION=16Mar18
INSTALL_PREFIX=/local/apl/lx/lammps16Mar18-CUDA8

BASEDIR=/home/users/${USER}/Software/LAMMPS/${VERSION}
LAMMPS_TARBALL=${BASEDIR}/lammps-stable.tar.gz
WORKDIR=/work/users/${USER}

PARALLEL=12

#-- libs

VMD_PLUGIN_INC=`echo /local/apl/lx/vmd193/lib/plugins/include | sed -e 's/\//\\\\\//g'` # molfile
VORO_VER=0.4.6 # voronoi
VORO=http://math.lbl.gov/voro++/download/dir/voro++-${VORO_VER}.tar.gz

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

. /local/apl/lx/intel2015update1/bin/compilervars.sh intel64

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

tar zxf ${LAMMPS_TARBALL}
cd lammps-${VERSION}

# setup makefiles, libraries, and external resources
## main
sed -e "/intel_cpu_intelmpi/s/.*/# rccs = USER-INTEL package, Intel MPI, MKL FFT/" src/MAKE/OPTIONS/Makefile.intel_cpu > src/MAKE/MINE/Makefile.rccs
## atc
( cd lib/atc && \
  sed -e s/icc/mpiicc/ -e s/lammps.installed/lammps.empty/ Makefile.icc > Makefile.rccs && \
  make -f Makefile.rccs -j ${PARALLEL} && \
  cd ../../ )
## awpmd
( cd lib/awpmd && \
  sed -e s/linalg/empty/ -e s/mpicxx/mpiicc/ Makefile.mpi > Makefile.rccs && \
  make -f Makefile.rccs -j ${PARALLEL} && \
  cd ../../ )
## colvars
( cd lib/colvars && \
  sed -e s/mpicxx/mpiicc/ -e s/-funroll-loops/-unroll/ Makefile.mpi > Makefile.rccs && \
  make -f Makefile.rccs -j ${PARALLEL} && \
  cd ../../ )
## gpu
( cd lib/gpu && \
  sed -e "/^CUDA_ARCH/s/arch=sm.*/arch=sm_60/" \
      -e "/^CUDA_LIB/s/$/ -L\$(CUDA_HOME)\/lib64\/stubs/" \
      -e "s/mpicxx/mpiicpc/" \
      Makefile.linux > Makefile.rccs && \
  make -f Makefile.rccs -j ${PARALLEL} && \
  sed -i -e "/^gpu_SYSPATH/s/$/ -L\$(CUDA_HOME)\/lib64\/stubs/" \
      Makefile.lammps &&
  cd ../../ )
## h5md
( cd lib/h5md && \
  make -f Makefile.mpi -j ${PARALLEL} && \
  cd ../../ )
## meam
( cd lib/meam && \
  sed -e s/mpifort/mpiifort/ -e s/mpicc/mpiicc/ -e s/mpicxx/mpiicpc/ Makefile.mpi > Makefile.rccs && \
  make -f Makefile.rccs -j ${PARALLEL} && \
  cd ../../ )
### molfile
( cd lib/molfile && \
  sed -i -e "s/molfile_SYSINC.*/molfile_SYSINC =-I$VMD_PLUGIN_INC/" Makefile.lammps && \
  cd ../../ )
## poems
( cd lib/poems && \
  make -f Makefile.icc -j ${PARALLEL} && \
  cd ../../ )
## reax
( cd lib/reax && \
  make -f Makefile.ifort -j ${PARALLEL} && \
  cd ../../ )
## voronoi
( cd lib/voronoi && \
  wget ${VORO} && \
  tar zxf voro++-${VORO_VER}.tar.gz && \
    cd voro++-${VORO_VER} && \
    sed -i -e "s/^CXX=.*/CXX=icpc/" -e "s/^CFLAGS=.*/CFLAGS=-Wall -O3 -fPIC/" config.mk && \
    make -j ${PARALLEL} && \
    cd ../ && \
  ln -s voro++-${VORO_VER}/src includelink && \
  ln -s voro++-${VORO_VER}/src liblink && \
  cd ../../ )

#----

# now make lammps
cd src
make yes-all no-ext
make no-KOKKOS \
     yes-GPU \
     no-LATTE \
     yes-VORONOI \
     yes-USER-H5MD \
     yes-USER-MOLFILE \
     yes-USER-NETCDF
make -j ${PARALLEL} rccs
make -j ${PARALLEL} rccs mode=shlib
cd ../

# mkdir and install files
mkdir -p ${INSTALL_PREFIX}/src
cp src/lmp_rccs src/liblammps_rccs.so src/*.h ${INSTALL_PREFIX}/src
ln -s ${INSTALL_PREFIX}/src/liblammps_rccs.so ${INSTALL_PREFIX}/src/liblammps.so
cp -r LICENSE \
      README \
      bench/ \
      doc/ \
      examples/ \
      potentials/ \
      python/ \
      tools/ \
   ${INSTALL_PREFIX}

List of Packages

ASPHERE, BODY, CLASS2, COLLOID, COMPRESS, CORESHELL, DIPOLE, GPU, GRANULAR
KSPACE, MANYBODY, MC, MEAM, MISC, MOLECULE, MPIIO, OPT, PERI, POEMS
PYTHON, QEQ, REAX, REPLICA, RIGID, SHOCK, SNAP, SRD, VORONOI

USER-ATC, USER-AWPMD, USER-CGDNA, USER-CGSDK, USER-COLVARS,
USER-DIFFRACTION, USER-DPD, USER-DRUDE, USER-EFF, USER-FEP,
USER-H5MD, USER-INTEL, USER-LB, USER-MANIFOLD, USER-MEAMC,
USER-MESO, USER-MGPT, USER-MISC, USER-MOLFILE, USER-NETCDF,
USER-OMP, USER-PHONON, USER-QTB, USER-REAXC, USER-SMTBQ,
USER-SPH, USER-TALLY, USER-UEF

Tests

  • Serial tests via "run_tests.py" passed (excluding legacy tests).
  • Parallel tests were performed with the same procedure as non-GPU version. (only compiler version is different)
    • Failed tests in GPU version were the completely the same as those in the non-GPU version.

Notices

  • Files installed in /local/apl/lx/lammps16Mar18-CUDA8/. (/local/apl/lx/lammps16Mar18-CUDA is a synbolic link to that dir)
  • Executable (lmp_rccs) and library are installed under src/. (Can be accessed via symbolic link bin/)
  • Sample job script is available in samples/ directory.
  • Python module files are copied to python/ directory.
  • LAMMPS header files in src/ directory are also copied in src/ directory.
  • latte didn't work in this build environment.
  • vmd molfile plugin files are available in /local/apl/lx/vmd193/lib/plugins/LINUXAMD64/molfile directory.