LAMMPS 2Aug23 with GPU support
ウェブページ
https://www.lammps.org

バージョン
2Aug23

ビルド環境
GCC 12.1.1 (gcc-toolset-12)
Intel MPI 2021.10.0
CUDA 12.1 update 1

ビルドに必要なファイル
lammps-stable_2Aug2023.tar.gz(一部ファイルは以下スクリプト中で取得)

ビルド手順#!/bin/sh
VERSION=2Aug23
NAME=lammps-stable_2Aug2023
INSTALL_PREFIX=/apl/lammps/2023-Aug2-CUDA
BASEDIR=/home/users/${USER}/Software/LAMMPS/${VERSION}LAMMPS_TARBALL=${BASEDIR}/${NAME}.tar.gz
WORKDIR=/gwork/users/${USER}LAMMPS_WORKDIR=${WORKDIR}/${NAME}
VMD_MOLFILE_INC=/home/users/${USER}/Software/VMD/1.9.4/vmd-1.9.4a57/plugins/include
GPU_ARCH=sm_80
PARALLEL=12#-----------------------------------------------------------------umask 0022
export LANG=C
ulimit -s unlimited
module -s purge
module -s load gcc-toolset/12
module -s load intelmpi/2021.10.0
module -s load cuda/12.1u1
PYTHONEXE=/usr/bin/python3.6m
PYTHONINC=/usr/include/python3.6m
cd ${WORKDIR}
if [ -d ${NAME} ]; thenmv ${NAME} lammps_erase
rm -rf lammps_erase &fitar zxf ${LAMMPS_TARBALL}
cd ${NAME}
mkdir build && cd build

# Disabled PKGs:# FFMPEG, ADIOS, MDI, VTK: noavail# AMOEBA: GPU and FFT single version not available# ML-HDNNP: failed to build# ML-IAP: failed to build# KIM: CDDL is imcompatible with GPL# MPIIO: not maintained?
# INTEL: not necessary for gcc build
cmake ../cmake \-DLAMMPS_MACHINE=rccs-cuda \-DENABLE_TESTING=on \-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \-DCMAKE_C_COMPILER=gcc \-DCMAKE_CXX_COMPILER=g++ \-DCMAKE_Fortran_COMPILER=gfortran \-DCMAKE_MPI_C_COMPILER=mpicc \-DCMAKE_MPI_CXX_COMPILER=mpicxx \-DCMAKE_MPI_Fortran_COMPILER=mpif90 \-DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG" \-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG" \-DCMAKE_Fortran_FLAGS_RELEASE="-O3 -DNDEBUG" \-DPython_EXECUTABLE=${PYTHONEXE} \-DPython_INCLUDE_DIR=${PYTHONINC} \-DLAMMPS_EXCEPTIONS=on \-DBUILD_SHARED_LIBS=on \-DBUILD_TOOLS=on \-DBUILD_MPI=on \-DBUILD_OMP=on \-DBUILD_LAMMPS_GUI=off \-DFFT=FFTW3 \-DFFT_SINGLE=on \-DFFT_FFTW_THREADS=on \-DWITH_JPEG=on \-DWITH_PNG=on \-DWITH_GZIP=on \-DPKG_ADIOS=off \-DPKG_AMOEBA=off \-DPKG_ASPHERE=on \-DPKG_ATC=on \-DPKG_AWPMD=on \-DPKG_BOCS=on \-DPKG_BODY=on \-DPKG_BPM=on \-DPKG_BROWNIAN=on \-DPKG_CG-DNA=on \-DPKG_CG-SPICA=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_ELECTRODE=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=${GPU_ARCH} \-DPKG_GRANULAR=on \-DPKG_H5MD=on \-DPKG_INTEL=off \-DPKG_INTERLAYER=on \-DPKG_KIM=off \-DDOWNLOAD_KIM=off \-DPKG_KOKKOS=off \-DKokkos_ARCH_ZEN3=off \-DKokkos_ENABLE_OPENMP=off \-DPKG_KSPACE=on \-DPKG_LATBOLTZ=on \-DPKG_LEPTON=on \-DPKG_MACHDYN=on \-DDOWNLOAD_EIGEN3=on \-DPKG_MANIFOLD=on \-DPKG_MANYBODY=on \-DPKG_MC=on \-DPKG_MDI=on \-DPKG_MEAM=on \-DPKG_MESONT=on \-DPKG_MGPT=on \-DPKG_MISC=on \-DPKG_ML-HDNNP=off \-DDOWNLOAD_N2P2=off \-DPKG_ML-IAP=off \-DPKG_ML-PACE=on \-DPKG_ML-QUIP=on \-DDOWNLOAD_QUIP=on \-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=off \-DPKG_MSCG=on \-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=on \-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=on \-DPKG_VTK=off \-DPKG_YAFF=on \-DBLA_VENDOR=OpenBLAS \-DCMAKE_BUILD_TYPE=Release
make VERBOSE=1 -j ${PARALLEL}
export OMP_NUM_THREADS=2#make test # need to do it separately...
make install
cp -a ../examples ${INSTALL_PREFIX}
cd ${INSTALL_PREFIX}
for f in etc/profile.d/*; doif [ -f $f ]; thenln -s $f .
fi
done
cd lib64
if [ -f liblammps_rccs-cuda.so ]; thenln -s liblammps_rccs-cuda.so liblammps.sofi
if [ -f liblammps_rccs-cuda.so.0 ]; thenln -s liblammps_rccs-cuda.so.0 liblammps.so.0fiパッケージASPHERE ATC AWPMD BOCS BODY BPM BROWNIAN CG-DNA CG-SPICA CLASS2 COLLOID COLVARS COMPRESS CORESHELL DIELECTRIC DIFFRACTIONDIPOLE DPD-BASIC DPD-MESO DPD-REACT DPD-SMOOTH DRUDE EFF ELECTRODE EXTRA-COMPUTE EXTRA-DUMP EXTRA-FIX EXTRA-MOLECULEEXTRA-PAIR FEP GPU GRANULAR H5MD INTERLAYER KSPACE LATBOLTZ LEPTON MACHDYN MANIFOLD MANYBODY MC MDI MEAM MESONT MGPT MISCML-PACE ML-QUIP ML-RANN ML-SNAP MOFFF MOLECULE MOLFILE MSCG NETCDF OPENMP OPT ORIENT PERI PHONON PLUGIN PLUMED POEMS PTMPYTHON QEQ QMMM QTB REACTION REAXFF REPLICA RIGID SCAFACOS SHOCK SMTBQ SPH SPIN SRD TALLY UEF VORONOI YAFF

テスト
以下のジョブスクリプトで別途実行しています。
#!/bin/sh#PBS -l select=1:ncpus=16:mpiprocs=8:ompthreads=1:ngpus=2#PBS -l walltime=24:00:00
VERSION=2Aug23
NAME=lammps-stable_2Aug2023
INSTALL_PREFIX=/apl/lammps/2023-Aug2-CUDA
BASEDIR=/home/users/${USER}/Software/LAMMPS/${VERSION}LAMMPS_TARBALL=${BASEDIR}/${NAME}.tar.gz
WORKDIR=/gwork/users/${USER}LAMMPS_WORKDIR=${WORKDIR}/${NAME}
VMD_MOLFILE_INC=/home/users/${USER}/Software/VMD/1.9.4/vmd-1.9.4a57/plugins/include
GPU_ARCH=sm_80
PARALLEL=12

#-----------------------------------------------------------------umask 0022
export LANG=C
ulimit -s unlimited
module -s purge
module -s load gcc-toolset/12
module -s load intelmpi/2021.10.0
module -s load cuda/12.1u1
PYTHONEXE=/usr/bin/python3.6m
PYTHONINC=/usr/include/python3.6m
cd ${WORKDIR}
cd ${NAME}
cd buildmake test # need to do it separately...

テストログのコピーは /apl/lammps/2023-Aug2-CUDA/Testing/ に置いています。
37 - SimpleCommands (SEGFAULT)

実際に使う際にはほぼ影響の無いエラーだと思われます。

メモ
CPU 版の内容もご確認ください。