LAMMPS 16Mar18 (stable release) for LX (gcc)
Webpage
Version
16Mar18
Build Environment
- GCC 6.3.1
- Intel MKL 2018 Update 2
- Intel MPI 2017.3.196
- 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
(2018/7/4: update)
#!/bin/sh
VERSION=16Mar18
INSTALL_PREFIX=/local/apl/lx/lammps${VERSION}-gnuBASEDIR=/home/users/${USER}
LAMMPS_TARBALL=${BASEDIR}/lammps-stable.tar.gzWORKDIR=/work/users/${USER}
WORKDIR_LAMMPS=${WORKDIR}/lammps-${VERSION}
WORKDIR_LAMMPS_ESC=`echo ${WORKDIR_LAMMPS} | sed -e 's/\//\\\\\//g'`PARALLEL=12
module purge
module load mkl/2018.0.2
module load mpi/intelmpi/2018.2.199
module load scl/devtoolset-6#-- libs
MKLROOT_ESC=`echo /local/apl/lx/intel2018update2/compilers_and_libraries_2018.2.
199/linux/mkl | sed -e 's/\//\\\\\//g'`
LATTE_GIT= # latte
LATTEDIR=${WORKDIR_LAMMPS}/lib/latte/LATTE
LATTEDIR_ESC="${WORKDIR_LAMMPS_ESC}\/lib\/latte\/LATTE"
METIS_VER=5.1.0
METIS=http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-${METIS_VER}.tar.gz
BML=https://github.com/lanl/bml.git
PROGRESS=https://github.com/lanl/qmd-progress.git
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 0022cd ${WORKDIR}
if [ -d lammps-${VERSION} ]; then
mv lammps-${VERSION} lammps_erase
rm -rf lammps_erase &
fitar zxf ${LAMMPS_TARBALL}
cd lammps-${VERSION}# setup makefiles, libraries, and external resources
## main
sed -e "/g++_openmpi =/s/.*/# rccs = Intel MPI, MKL FFT + g++ /" \
-e "/OMPI_CXX/d" \
-e "s/^CCFLAGS.*/CCFLAGS = -g -O3 -fopenmp/" \
-e "s/^LINKFLAGS.*/LINKFLAGS = -g -O -fopenmp/" \
-e "s/DLAMMPS_GZIP/DLAMMPS_GZIP -DLAMMPS_JPEG/" \
-e "s/^FFT_INC.*/FFT_INC = -DFFT_FFTW3 -L${MKLROOT_ESC}\/..\/compiler\/lib\/intel64 -m64 -I${MKLROOT_RSC}\/include/" \
-e "s/^FFT_PATH.*/FFT_PATH = -L${MKLROOT_ESC}\/lib\/intel64 -Wl,--no-as-needed/" \
-e "s/^FFT_LIB.*/FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl/" \
-e "s/^JPG_LIB.*/JPG_LIB = -ljpeg/" \
src/MAKE/OPTIONS/Makefile.g++_openmpi > src/MAKE/MINE/Makefile.rccs
## atc
( cd lib/atc && \
sed -e s/lammps.linalg/lammps.empty/ Makefile.mpic++ > Makefile.rccs && \
make -f Makefile.rccs -j ${PARALLEL} && \
cd ../../ )
## awpmd
( cd lib/awpmd && \
sed -e s/linalg/empty/ Makefile.mpi > Makefile.rccs && \
make -f Makefile.rccs -j ${PARALLEL} && \
cd ../../ )
## colvars
( cd lib/colvars && \
make -f Makefile.mpi -j ${PARALLEL} && \
cd ../../ )
## h5md
( cd lib/h5md && \
make -f Makefile.mpi -j ${PARALLEL} && \
cd ../../ )
## latte (make jobserver not available?)
## METIS, BML, and (qmd-)PROGRESS are also built
( cd lib/latte && \
git clone ${LATTE_GIT} && \
cd LATTE && \
wget ${METIS} && \
tar zxf metis-${METIS_VER}.tar.gz && \
cd metis-${METIS_VER} && \
make config prefix=../../install && \
make install && \
cd ../ && \
git clone ${BML} && \
cd bml && \
EXTRA_CFLAGS="-fPIC" EXTRA_FFLAGS="-fPIC" sh example_build.sh && \
cd build/ && \
make && \
make install && \
cd ../../ && \
git clone ${PROGRESS} && \
cd qmd-progress && \
EXTRA_FCFLAGS="-fPIC" EXTRA_LINK_FLAGS="-fPIC" CMAKE_PREFIX_PATH=${LATTEDIR}/metis-5.1.0/install PROGRESS_GRAPHLIB=yes PKG_CONFIG_PATH=${LATTEDIR}/bml/install/lib64/pkgconfig ./build.sh configure && \
cd build/ && \
make && \
cd src/ && \
gcc -DGLOBAL_DEBUG=PROGRESS_LOG_DEBUG \
-DMETIS_INDEX_KIND=4 \
-DMETIS_REAL_KIND=0d0 \
-O3 -DNDEBUG -fPIC \
-I${LATTEDIR}/bml/install/include \
-fopenmp \
-o CMakeFiles/progress.dir/prg_memory_consumption.c.o \
-c ${LATTEDIR}/qmd-progress/src/prg_memory_consumption.c && \
cd ../ && \
make install && \
cd ../../ && \
sed -i -e "s/fopenmp/fopenmp -fPIC/" \
-e "s/^LIB =.*/LIB = -L${MKLROOT_ESC}\/lib\/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl/" \
-e "s/^METIS =.*/METIS = ON/" \
-e "s/^PROGRESS =.*/PROGRESS = ON/" \
-e "s/.(HOME)/${LATTEDIR_ESC}/" \
-e "s/metis\///" \
-e "s/install\/lib/install\/lib64/" \
makefile.CHOICES && \
make && \
cd ../ && \
ln -s LATTE/src includelink && \
ln -s LATTE liblink && \
ln -s LATTE/src/latte_c_bind.o filelink.o && \
echo "latte_SYSINC = -I../../lib/latte/LATTE/src -I../../lib/latte/LATTE/bml/install/include -I../../lib/latte/LATTE/qmd-progress/install/include" > Makefile.lammps && \
echo "latte_SYSLIB = -fopenmp ../../lib/latte/filelink.o -llatte -L../../lib/latte/LATTE/qmd-progress/install/lib64 -lprogress -L../../lib/latte/LATTE/bml/install/lib64 -lbml_fortran -lbml -L../../lib/latte/LATTE/metis-5.1.0/install/lib -lmetis" >> Makefile.lammps && \
echo -n "latte_SYSPATH = -fopenmp" >> Makefile.lammps && \
cd ../../ )
## meam
( cd lib/meam && \
sed -e s/mpifort/mpif90/ Makefile.mpi > Makefile.rccs && \
make -f Makefile.rccs -j ${PARALLEL} && \
cd ../../ )
## molfile
#### plugin location: /local/apl/lx/vmd193/lib/plugins/LINUXAMD64/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.g++ -j ${PARALLEL} && \
cd ../../ )
## reax
( cd lib/reax && \
make -f Makefile.gfortran -j ${PARALLEL} && \
cd ../../ )
## voronoi
( cd lib/voronoi && \
wget ${VORO} && \
tar zxf voro++-${VORO_VER}.tar.gz && \
cd voro++-${VORO_VER} && \
sed -i -e "s/^CFLAGS=.*/CFLAGS=-Wall -ansi -pedantic -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 \
no-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}
cp lib/h5md/LICENSE ${INSTALL_PREFIX}/LICENSE-h5md
cp lib/voronoi/voro++-${VORO_VER}/LICENSE ${INSTALL_PREFIX}/LICENSE-voro++## latte extra
mkdir -p ${INSTALL_PREFIX}/lib/latte/LATTE
cp -r lib/latte/LATTE/{LICENSE_GPL-2.0,latte.in,MATRIX,Manual,Restarts,TBparam,animate,examples,tests,tools} ${INSTALL_PREFIX}/lib/latte/LATTEmkdir -p ${INSTALL_PREFIX}/lib/latte/LATTE/bml
cp -r lib/latte/LATTE/bml/{LICENSE.md,install,examples} ${INSTALL_PREFIX}/lib/latte/LATTE/bmlmkdir -p ${INSTALL_PREFIX}/lib/latte/LATTE/metis-${METIS_VER}
cp -r lib/latte/LATTE/metis-${METIS_VER}/{LICENSE.txt,install} ${INSTALL_PREFIX}/lib/latte/LATTE/metis-${METIS_VER}mkdir -p ${INSTALL_PREFIX}/lib/latte/LATTE/qmd-progress
cp -r lib/latte/LATTE/qmd-progress/{LICENSE.md,install,examples} ${INSTALL_PREFIX}/lib/latte/LATTE/qmd-progress
List of Packages
ASPHERE, BODY, CLASS2, COLLOID, COMPRESS, CORESHELL, DIPOLE, GRANULAR
KSPACE, LATTE, 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).
- The same test procedure as the intel version employed.
Notices
- Files are installed in /local/apl/lx/lammps16Mar18-gnu/.
- Binary file (lmp_rccs) and library (liblammps.so) can be found in src/. (symbolic bin/ can be used instead of src/)
- Samples are available in samples/ directory.
- Python module files are copied in python/ directory.
- LAMMPS header files in src/ directory are also copied in src/ directory.
Notices about parallel tests (Items written in bold are common errors to intel version)
- balance/balance.var.dynamics: minor(?) numrical error (TotEng(3.99e-5), Press(0.00019) etc.)
- balance/balance.kspace: numerical error (TotEng(0.17), Press(0.62) etc.)
- balance/balance.clock.dynamic: minor(?) numerical error (TotEng(1.23e-5), Press(9.36e-5))
- VICOSITY/nemd.2d: numerical error (TotEng(0.12), Press(0.35), v_visc(5.16) etc.)
- USER/eff/ECP/Si2H6/Si2H6.ang: get stuck
- USER/eff/CH4/ch4_ionized.dynamics: get stuck
Notices about excluded or separately performed tests
- mscg: package not installed
- USER/quip: package not installed
- kim: package not installed
- gcmc: package not installed
- tad/tad: requires additional argument. Even when the argument added, it does not work. (error in handling 4-byetes and 8-bytes variables)
- neb, dpd/dpdrx-shardlow: requires additional arguments, skipped.
- imd, USER/lb: too time consuming.
- COUPLE, USER/misc/i-pi, USER/misc/grem: skipped. (only COUPLE/multiple is tested and works fine)
- ASPHERE/tri: ERROR: Illegal neigh_modify command
- ASPHERE/line: ERROR: Illegal neigh_modify command
- ASPHERE/poly: ERROR on proc 0: Neighbor list overflow, boost neigh_modify one
- USER/eff/Li-dendritic: file missing?
- USER/atc: file missing
- USER/misc/pimd: needs to mkdir brefore tun tests. I don't know how to verify this.
Others
- vmd molfile plugin files can be found in /local/apl/lx/vmd193/lib/plugins/LINUXAMD64/molfile directory.
Changelog
- (2018/7/4) LAMMPS and LATTE licenses are (GPL v2 OR LATER), so there is no problem.
- (2018/7/3)
LATTE was removed from the installation due to the license conflict between METIS (Apache License 2.0; used in LATTE) and LAMMPS (GPL v2). While LATTE might be installed without METIS, we are not planning to build that version of LAMMPS for now.