From b4f2bec8b950ea5e26c32c492a13d0328489b7a1 Mon Sep 17 00:00:00 2001 From: Caubet Serrabou Marc Date: Thu, 30 Jul 2020 16:42:03 +0200 Subject: [PATCH 1/3] LAMMPS 2020 --- MPI/lammps/2020/variants | 1 + MPI/lammps/build | 98 +++++++++++++++------------------------- 2 files changed, 37 insertions(+), 62 deletions(-) create mode 100644 MPI/lammps/2020/variants diff --git a/MPI/lammps/2020/variants b/MPI/lammps/2020/variants new file mode 100644 index 0000000..f277c59 --- /dev/null +++ b/MPI/lammps/2020/variants @@ -0,0 +1 @@ +lammps/2020.3_merlin6 unstable gcc/9.3.0 openmpi/4.0.4_slurm b:cmake/3.15.5 diff --git a/MPI/lammps/build b/MPI/lammps/build index 6df1224..fb1aa5c 100755 --- a/MPI/lammps/build +++ b/MPI/lammps/build @@ -4,80 +4,54 @@ TARNAME=$(grep -E "^${V_MAJOR}.${V_MINOR}" files/version-to-tarname.txt| awk '{print $2}') # pbuild::set_download_url "https://gitlab.psi.ch/caubet_m/merlin-software/raw/master/$P/$P-${V_PKG}.tar.gz" -pbuild::set_download_url "https://github.com/lammps/lammps/archive/${TARNAME}" +# pbuild::set_download_url "https://github.com/lammps/lammps/archive/${TARNAME}" +pbuild::set_download_url "https://lammps.sandia.gov/tars/${TARNAME}" pbuild::add_to_group 'MPI' pbuild::install_docfiles README LICENSE -pbuild::compile_in_sourcetree +pbuild::pre_configure() { + pbuild::add_configure_args "-D CMAKE_BUILD_TYPE=RELEASE" -# pbuild::pre_configure() { -# pbuild::add_configure_args "-D CMAKE_BUILD_TYPE=RELEASE" -# -# pbuild::add_configure_args "-D BUILD_MPI=yes" -# pbuild::add_configure_args "-D BUILD_OMP=yes" -# pbuild::add_configure_args "-D PKG_USER-OMP=yes" -# pbuild::add_configure_args "-D PKG_BODY=yes" -# pbuild::add_configure_args "-D PKG_DIPOLE=yes" -# pbuild::add_configure_args "-D PKG_MOLECULE=yes" -# pbuild::add_configure_args "-D PKG_MPIIO=yes" -# pbuild::add_configure_args "-D PKG_REPLICA=yes" -# # pbuild::add_configure_args "-D PKG_REAX=yes" -# pbuild::add_configure_args "-D PKG_RIGID=yes" -# pbuild::add_configure_args "-D PKG_USER-REAXC=yes" -# -# } + pbuild::add_configure_args "-D BUILD_MPI=yes" + pbuild::add_configure_args "-D BUILD_OMP=yes" + pbuild::add_configure_args "-D BUILD_TOOLS=yes" + pbuild::add_configure_args "-D BUILD_DOC=yes" + + pbuild::add_configure_args "-D LAMMPS_MACHINE=mpi" + pbuild::add_configure_args "-D PKG_USER-OMP=yes" + pbuild::add_configure_args "-D PKG_ASPHERE=yes" + pbuild::add_configure_args "-D PKG_BODY=yes" + pbuild::add_configure_args "-D PKG_COMPRESS=yes" + pbuild::add_configure_args "-D PKG_CORESHELL=yes" + pbuild::add_configure_args "-D PKG_DIPOLE=yes" + pbuild::add_configure_args "-D PKG_GRANULAR=yes" + pbuild::add_configure_args "-D PKG_MANYBODY=yes" + pbuild::add_configure_args "-D PKG_KSPACE=yes" + pbuild::add_configure_args "-D PKG_MC=yes" + pbuild::add_configure_args "-D PKG_MISC=yes" + pbuild::add_configure_args "-D PKG_MOLECULE=yes" + pbuild::add_configure_args "-D PKG_MPIIO=yes" + pbuild::add_configure_args "-D PKG_OPT=yes" + pbuild::add_configure_args "-D PKG_PYTHON=yes" + pbuild::add_configure_args "-D PKG_REPLICA=yes" + pbuild::add_configure_args "-D PKG_RIGID=yes" + pbuild::add_configure_args "-D PKG_SNAP=yes" + pbuild::add_configure_args "-D PKG_USER-EFF=yes" + pbuild::add_configure_args "-D PKG_USER-DRUDE=yes" + pbuild::add_configure_args "-D PKG_USER-REAXC=yes" + # (( ${OPENMPI_VERSION%%.*} >= 4 )) && pbuild::add_configure_args "-D LAMMPS_OMP_COMPAT=4" +} -# pbuild::configure() { -# cp -v "${BUILDBLOCK_DIR}/files/Makefile.PSI" "${BUILD_DIR}/src/MAKE/MINE" -# } -# pbuild::configure() { - sed -i '/^CCFLAGS.*/ s/$/ -fopenmp/' ${BUILD_DIR}/src/MAKE/Makefile.mpi - sed -i '/^LINKFLAGS.*/ s/$/ -fopenmp/' ${BUILD_DIR}/src/MAKE/Makefile.mpi + cmake ${BUILD_DIR}/../src/cmake -D CMAKE_INSTALL_PREFIX="${PREFIX}" } pbuild::compile() { - echo BEGIN COMPILE - cd src - # make clean-all - # make no-all - make yes-user-omp - make yes-asphere - make yes-body - make yes-compress - make yes-coreshell - make yes-dipole - make yes-granular - make yes-manybody - make yes-kspace - make yes-mc - make yes-misc - make yes-molecule - make yes-mpiio - make yes-opt - make yes-python - make yes-replica - make yes-rigid - make yes-snap - make yes-user-eff - make yes-user-drude - make yes-user-reaxc - make yes-user-reaxc args="-m serial" - make yes-user-reaxc args="-m mpi" - make mpi - echo ENDCOMPILE + cmake --build ${BUILD_DIR} } pbuild::install() { - install -m 0755 -d "${PREFIX}/bin" - # Modify this for installing individual binaries - install -m 0755 "${BUILD_DIR}/src/lmp_mpi" "${PREFIX}/bin/" - - # Strip all present binaries - for file in $(ls ${PREFIX}/bin/lmp_*) - do - strip "$file" - done + make install } From 8095111408a0423b97c1f32ae0c7fbef36a415e2 Mon Sep 17 00:00:00 2001 From: Caubet Serrabou Marc Date: Thu, 30 Jul 2020 16:44:43 +0200 Subject: [PATCH 2/3] LAMMPS 2020 --- MPI/lammps/files/version-to-tarname.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/MPI/lammps/files/version-to-tarname.txt b/MPI/lammps/files/version-to-tarname.txt index a901f75..134d439 100644 --- a/MPI/lammps/files/version-to-tarname.txt +++ b/MPI/lammps/files/version-to-tarname.txt @@ -1,2 +1,3 @@ 2018.11 patch_15Nov2018.tar.gz 2019.8 stable_7Aug2019.tar.gz +2020.3 lammps-3Mar20.tar.gz From 139305ec0341650fee7cc49332a57c1934c62443 Mon Sep 17 00:00:00 2001 From: Caubet Serrabou Marc Date: Thu, 27 Aug 2020 17:42:48 +0200 Subject: [PATCH 3/3] Update LAMMPS: from make to cmake, OpenMPI 4.0.4 support, 2020.3 --- MPI/lammps/2020/variants | 2 +- MPI/lammps/README.txt | 5 ++++ MPI/lammps/build | 64 +++++++++++++++++++--------------------- 3 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 MPI/lammps/README.txt diff --git a/MPI/lammps/2020/variants b/MPI/lammps/2020/variants index f277c59..f058734 100644 --- a/MPI/lammps/2020/variants +++ b/MPI/lammps/2020/variants @@ -1 +1 @@ -lammps/2020.3_merlin6 unstable gcc/9.3.0 openmpi/4.0.4_slurm b:cmake/3.15.5 +lammps/2020.3_merlin6 unstable gcc/8.4.0 openmpi/4.0.4_slurm b:cmake/3.15.5 diff --git a/MPI/lammps/README.txt b/MPI/lammps/README.txt new file mode 100644 index 0000000..7682985 --- /dev/null +++ b/MPI/lammps/README.txt @@ -0,0 +1,5 @@ +[27.08.2020] + * With CMake is necessary to have 'python3-virtualenv' installed. Needed for building documentation. + * Compilation for version 2020.3 with OMP, GCC v8, OpenMPI v4.0.4 works without the need of specifying '-D LAMMPS_OMP_COMPAT=4' + * More details here: https://lammps.sandia.gov/doc/Build_basics.html) + * Problems are seen with GCC v9, so is recommended to use GCC v8 for that. It was compiled with v8. diff --git a/MPI/lammps/build b/MPI/lammps/build index fb1aa5c..7a55561 100755 --- a/MPI/lammps/build +++ b/MPI/lammps/build @@ -11,41 +11,37 @@ pbuild::add_to_group 'MPI' pbuild::install_docfiles README LICENSE -pbuild::pre_configure() { - pbuild::add_configure_args "-D CMAKE_BUILD_TYPE=RELEASE" - - pbuild::add_configure_args "-D BUILD_MPI=yes" - pbuild::add_configure_args "-D BUILD_OMP=yes" - pbuild::add_configure_args "-D BUILD_TOOLS=yes" - pbuild::add_configure_args "-D BUILD_DOC=yes" - - pbuild::add_configure_args "-D LAMMPS_MACHINE=mpi" - pbuild::add_configure_args "-D PKG_USER-OMP=yes" - pbuild::add_configure_args "-D PKG_ASPHERE=yes" - pbuild::add_configure_args "-D PKG_BODY=yes" - pbuild::add_configure_args "-D PKG_COMPRESS=yes" - pbuild::add_configure_args "-D PKG_CORESHELL=yes" - pbuild::add_configure_args "-D PKG_DIPOLE=yes" - pbuild::add_configure_args "-D PKG_GRANULAR=yes" - pbuild::add_configure_args "-D PKG_MANYBODY=yes" - pbuild::add_configure_args "-D PKG_KSPACE=yes" - pbuild::add_configure_args "-D PKG_MC=yes" - pbuild::add_configure_args "-D PKG_MISC=yes" - pbuild::add_configure_args "-D PKG_MOLECULE=yes" - pbuild::add_configure_args "-D PKG_MPIIO=yes" - pbuild::add_configure_args "-D PKG_OPT=yes" - pbuild::add_configure_args "-D PKG_PYTHON=yes" - pbuild::add_configure_args "-D PKG_REPLICA=yes" - pbuild::add_configure_args "-D PKG_RIGID=yes" - pbuild::add_configure_args "-D PKG_SNAP=yes" - pbuild::add_configure_args "-D PKG_USER-EFF=yes" - pbuild::add_configure_args "-D PKG_USER-DRUDE=yes" - pbuild::add_configure_args "-D PKG_USER-REAXC=yes" - # (( ${OPENMPI_VERSION%%.*} >= 4 )) && pbuild::add_configure_args "-D LAMMPS_OMP_COMPAT=4" -} - pbuild::configure() { - cmake ${BUILD_DIR}/../src/cmake -D CMAKE_INSTALL_PREFIX="${PREFIX}" + cmake -D CMAKE_INSTALL_PREFIX="${PREFIX}" \ + -D CMAKE_BUILD_TYPE=RELEASE \ + -D BUILD_MPI=yes \ + -D BUILD_OMP=yes \ + -D BUILD_TOOLS=yes \ + -D BUILD_DOC=yes \ + -D LAMMPS_MACHINE=mpi \ + -D PKG_USER-OMP=yes \ + -D PKG_ASPHERE=yes \ + -D PKG_BODY=yes \ + -D PKG_COMPRESS=yes \ + -D PKG_CORESHELL=yes \ + -D PKG_DIPOLE=yes \ + -D PKG_GRANULAR=yes \ + -D PKG_MANYBODY=yes \ + -D PKG_KSPACE=yes \ + -D PKG_MC=yes \ + -D PKG_MISC=yes \ + -D PKG_MOLECULE=yes \ + -D PKG_MPIIO=yes \ + -D PKG_OPT=yes \ + -D PKG_PYTHON=yes \ + -D PKG_REPLICA=yes \ + -D PKG_RIGID=yes \ + -D PKG_SNAP=yes \ + -D PKG_USER-EFF=yes \ + -D PKG_USER-DRUDE=yes \ + -D PKG_USER-REAXC=yes \ + -D BUILD_SHARED_LIBS=on \ + ${BUILD_DIR}/../src/cmake } pbuild::compile() {