LAMMPS 29Sep21 with GPU support
Webpage
Version
29Sep21
Build Environment
- Intel Parallel Studio XE 2018 update 4
- gcc 7.3.1 (devtoolset-7)
- CUDA 11.1 Update 1
- cmake 3.16.3
Files Required
- lammps-stable_29Sep2021.tar.gz
- (some of files are obtained during the installation procedure)
Build Procedure
#!/bin/sh
VERSION=29Sep21
NAME=lammps-stable_29Sep2021
INSTALL_PREFIX=/local/apl/lx/lammps${VERSION}-CUDA
BASEDIR=/home/users/${USER}/Software/LAMMPS/${VERSION}
LAMMPS_TARBALL=${BASEDIR}/${NAME}.tar.gz
WORKDIR=/work/users/${USER}
LAMMPS_WORKDIR=${WORKDIR}/${NAME}
GPU_ARCH=sm_60
VMD_MOLFILE_INC=/local/apl/lx/vmd193/lib/plugins/include
PARALLEL=12
#------------------------------------------------------------------
umask 0022
export LANG=C
module purge
module load scl/devtoolset-7
module load intel_parallelstudio/2018update4
module load cuda/11.1
module load cmake/3.16.3
export CC=mpiicc
export CXX=mpiicpc
export FC=mpiifort
export MPICC=mpiicc
export MPICXX=mpiicpc
export MPIFC=mpiifort
export PYTHON_EXECUTABLE=/usr/bin/python3
cd ${WORKDIR}
if [ -d ${NAME} ]; then
mv ${NAME} lammps_erase
rm -rf lammps_erase &
fi
tar zxf ${LAMMPS_TARBALL}
cd ${NAME}
mkdir build && cd build
# Disabled PKGs:
# ADIOS, MDI, VTK: noavail
# MSCG: gsl too old
# MESSAGE: ZeroMQ support not enabled
# QUIP: failed to build
# ML-HDNNP: failed to build
# KIM: CDDL is imcompatible with GPL
# KOKKOS: disabled (due to CUDA-aware MPI requirement)
cmake ../cmake \
-DLAMMPS_MACHINE=rccs-cuda \
-DENABLE_TESTING=on \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_C_COMPILER=mpiicc \
-DCMAKE_CXX_COMPILER=mpiicpc \
-DCMAKE_Fortran_COMPILER=mpiifort \
-DCMAKE_MPI_C_COMPILER=mpiicc \
-DCMAKE_MPI_CXX_COMPILER=mpiicpc \
-DCMAKE_MPI_Fortran_COMPILER=mpiifort \
-DCMAKE_CXX_FLAGS_DEBUG="-Wall -Wextra -g" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-Wall -Wextra -g -O2 -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG" \
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -g" \
-DCMAKE_Fortran_FLAGS_RELWITHDEBINFO="-Wall -Wextra -g -O2 -DNDEBUG" \
-DCMAKE_Fortran_FLAGS_RELEASE="-O3 -DNDEBUG" \
-DCMAKE_C_FLAGS_DEBUG="-Wall -Wextra -g" \
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-Wall -Wextra -g -O2 -DNDEBUG" \
-DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG" \
-DBUILD_SHARED_LIBS=on \
-DBUILD_TOOLS=on \
-DBUILD_MPI=on \
-DBUILD_OMP=on \
-DFFT=MKL \
-DFFT_SINGLE=on \
-DFFT_MKL_THREADS=on \
-DWITH_JPEG=yes \
-DWITH_PNG=yes \
-DWITH_FFMPEG=yes \
-DFFMPEG_EXECUTABLE=/local/apl/lx/ffmpeg-4.4/bin/ffmpeg \
-DWITH_GZIP=yes \
-DPKG_ASPHERE=on \
-DPKG_ATC=on \
-DPKG_AWPMD=on \
-DPKG_BOCS=on \
-DPKG_BODY=on \
-DPKG_BROWNIAN=on \
-DPKG_CG-DNA=on \
-DPKG_CG-SDK=on \
-DPKG_CLASS2=on \
-DPKG_COLLOID=on \
-DPKG_COLVARS=on \
-DPKG_COMPRESS=on \
-DPKG_CORESHELL=on \
-DPKG_DIELECTRIC=on \
-DPKG_DIFFRACTION=on \
-DPKG_DIPOLE=on \
-DPKG_DPD-BASIC=on \
-DPKG_DPD-MESO=on \
-DPKG_DPD-REACT=on \
-DPKG_DPD-SMOOTH=on \
-DPKG_DRUDE=on \
-DPKG_EFF=on \
-DPKG_EXTRA-COMPUTE=on \
-DPKG_EXTRA-DUMP=on \
-DPKG_EXTRA-FIX=on \
-DPKG_EXTRA-MOLECULE=on \
-DPKG_EXTRA-PAIR=on \
-DPKG_FEP=on \
-DPKG_GPU=on \
-DGPU_API=cuda \
-DGPU_ARCH=sm_60 \
-DPKG_GRANULAR=on \
-DPKG_H5MD=on \
-DPKG_INTEL=on \
-DPKG_INTERLAYER=on \
-DPKG_KIM=off \
-DDOWNLOAD_KIM=no \
-DPKG_KOKKOS=off \
-DPKG_KSPACE=on \
-DPKG_LATBOLTZ=on \
-DPKG_LATTE=on \
-DDOWNLOAD_LATTE=on \
-DPKG_MACHDYN=on \
-DDOWNLOAD_EIGEN3=on \
-DPKG_MANIFOLD=on \
-DPKG_MANYBODY=on \
-DPKG_MC=on \
-DPKG_MDI=off \
-DPKG_MEAM=on \
-DPKG_MESONT=on \
-DPKG_MESSAGE=on \
-DPKG_MGPT=on \
-DPKG_MISC=on \
-DPKG_ML-HDNNP=off \
-DDOWNLOAD_N2P2=no \
-DPKG_ML-IAP=on \
-DPKG_ML-PACE=on \
-DPKG_ML-QUIP=off \
-DDOWNLOAD_QUIP=no \
-DPKG_ML-RANN=on \
-DPKG_ML-SNAP=on \
-DPKG_MOFFF=on \
-DPKG_MOLECULE=on \
-DPKG_MOLFILE=on \
-DMOLFILE_INCLUDE_DIR=${VMD_MOLFILE_INC} \
-DPKG_MPIIO=on \
-DPKG_MSCG=off \
-DPKG_NETCDF=on \
-DPKG_OPENMP=on \
-DPKG_OPT=on \
-DPKG_ORIENT=on \
-DPKG_PERI=on \
-DPKG_PHONON=on \
-DPKG_PLUGIN=on \
-DPKG_PLUMED=on \
-DDOWNLOAD_PLUMED=on \
-DPKG_POEMS=on \
-DPKG_PTM=on \
-DPKG_PYTHON=on \
-DPKG_QEQ=on \
-DPKG_QMMM=on \
-DPKG_QTB=on \
-DPKG_REACTION=on \
-DPKG_REAXFF=on \
-DPKG_REPLICA=on \
-DPKG_RIGID=on \
-DPKG_SCAFACOS=on \
-DDOWNLOAD_SCAFACOS=yes \
-DPKG_SHOCK=on \
-DPKG_SMTBQ=on \
-DPKG_SPH=on \
-DPKG_SPIN=on \
-DPKG_SRD=on \
-DPKG_TALLY=on \
-DPKG_UEF=on \
-DPKG_VORONOI=on \
-DDOWNLOAD_VORO=yes \
-DPKG_VTK=off \
-DPKG_YAFF=on \
-DBLAS_LIBRARIES="-mkl" \
-DCMAKE_BUILD_TYPE=Release
#make -j ${PARALLEL}
make VERBOSE=1 -j ${PARALLEL}
make test # will put error...
make install
cp -a ../examples ${INSTALL_PREFIX}
cd ${INSTALL_PREFIX}
for f in etc/profile.d/*; do
ln -s $f .
done
cd lib64
if [ -f liblammps_rccs-cuda.so ]; then
ln -s liblammps_rccs-cuda.so liblammps.so
fi
if [ -f liblammps_rccs-cuda.so.0 ]; then
ln -s liblammps_rccs-cuda.so.0 liblammps.so.0
fi
Packages
- enabled
ASPHERE ATC AWPMD BOCS BODY BROWNIAN CG-DNA CG-SDK CLASS2 COLLOID COLVARS
COMPRESS CORESHELL DIELECTRIC DIFFRACTION DIPOLE DPD-BASIC DPD-MESO
DPD-REACT DPD-SMOOTH DRUDE EFF EXTRA-COMPUTE EXTRA-DUMP EXTRA-FIX
EXTRA-MOLECULE EXTRA-PAIR FEP GPU GRANULAR H5MD INTEL INTERLAYER KSPACE
LATBOLTZ LATTE MACHDYN MANIFOLD MANYBODY MC MEAM MESONT MESSAGE MGPT MISC
ML-IAP ML-PACE ML-RANN ML-SNAP MOFFF MOLECULE MOLFILE MPIIO NETCDF OPENMP
OPT ORIENT PERI PHONON PLUGIN PLUMED POEMS PTM PYTHON QEQ QMMM QTB REACTION
REAXFF REPLICA RIGID SCAFACOS SHOCK SMTBQ SPH SPIN SRD TALLY UEF VORONOI
YAFF
- disabled
- ADIOS, MDI, VTK: skipped
- MSCG: system gsl is too old
- MESSAGE: (ZeroMQ support is not active)
- QUIP: failed to auto-build
- ML-HDNNP: failed to auto-build
- KIM: license issue; CDDL is not compatible with GPL
- it is possible to build KIM-enabled one. But you may need to manually copy library (libkim-api) to the installation directory.
-
- KOKKOS: CUDA-aware MPI is required for GPU; skipped
Tests
Test log can be found at /local/apl/lx/lammps29Sep21-CUDA/Testing directory.
Please see CPU version page for details (results are the same).