From 0f4dab9ab1d6f6f44b6e20da9682639c295aa13c Mon Sep 17 00:00:00 2001 From: laraPPr Date: Fri, 20 Jun 2025 15:05:18 +0200 Subject: [PATCH 1/7] adding easyconfigs: LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb --- ...a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb new file mode 100644 index 000000000000..ae8df231ea8f --- /dev/null +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb @@ -0,0 +1,204 @@ +name = 'LAMMPS' +version = '2Aug2023_update2' +_cuda_suffix = '-CUDA-%(cudaver)s' +versionsuffix = '-kokkos' + _cuda_suffix + "-with-deepmd-plugin" +local_DeePMDkit_version = '3.0.1' + +homepage = 'https://www.lammps.org' +description = """LAMMPS is a classical molecular dynamics code, and an acronym +for Large-scale Atomic/Molecular Massively Parallel Simulator. LAMMPS has +potentials for solid-state materials (metals, semiconductors) and soft matter +(biomolecules, polymers) and coarse-grained or mesoscopic systems. It can be +used to model atoms or, more generically, as a parallel particle simulator at +the atomic, meso, or continuum scale. LAMMPS runs on single processors or in +parallel using message-passing techniques and a spatial-decomposition of the +simulation domain. The code is designed to be easy to modify or extend with new +functionality. +""" + +toolchain = {'name': 'foss', 'version': '2023a'} +toolchainopts = {'openmp': True, 'usempi': True} + +# 'https://github.com/lammps/lammps/archive/' +source_urls = [ + GITHUB_LOWER_SOURCE, + 'https://github.com/deepmodeling/deepmd-kit/archive/refs/tags/', +] +sources = [ + 'stable_%(version)s.tar.gz', + 'v%s.tar.gz' % local_DeePMDkit_version, +] +patches = [ + 'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch', + 'LAMMPS-2Aug2023_fix-timestep-balance-example.patch', + 'LAMMPS-29Aug2024_install-deepmd-plugin.patch' +] +checksums = [ + {'stable_2Aug2023_update2.tar.gz': '3bcecabc9cad08d0a4e4d989b52d29c58505f7ead8ebacf43c9db8d9fd3d564a'}, + {'v3.0.1.tar.gz': 'e842edbc2714bc948ce708c411e5fed751e67c88d5c493c2978f11c849027dca'}, + {'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch': + '723c944b62b9d28427d25e80a7a67049631702d344df49268a6846aa0cd0fe04'}, + {'LAMMPS-2Aug2023_fix-timestep-balance-example.patch': + '6f68387ced2b4bd0a06e4c3d31b0ffd47042476777d87d8a0ca6b19a4e6a1777'}, + {'LAMMPS-29Aug2024_install-deepmd-plugin.patch': + '1723b0c1175c31b9e1f41a87750fddd00225e35a14ac9f9107323360fb69a698'}, +] + +builddependencies = [ + ('CMake', '3.26.3'), + ('pkgconf', '1.9.5'), + ('archspec', '0.2.5'), +] +dependencies = [ + ('CUDA', '12.1.1', '', SYSTEM), + ('UCX-CUDA', '1.14.1', _cuda_suffix), + ('NCCL', '2.18.3', _cuda_suffix), + ('Python', '3.11.3'), + ('libpng', '1.6.39'), + ('libjpeg-turbo', '2.1.5.1'), + ('netCDF', '4.9.2'), + ('GSL', '2.7'), + ('zlib', '1.2.13'), + ('gzip', '1.12'), + ('cURL', '8.0.1'), + ('HDF5', '1.14.0'), + ('PCRE', '8.45'), + ('libxml2', '2.11.4'), + ('FFmpeg', '6.0'), + ('Voro++', '0.4.6'), + ('kim-api', '2.3.0'), + ('Eigen', '3.4.0'), + ('PLUMED', '2.9.0'), + ('SciPy-bundle', '2023.07'), + # VTK package is auto-disabled if this dep is not available + ('VTK', '9.3.0'), + # We use a custom build of MDI + ('MDI', '1.4.26'), + ('DeePMD-kit', local_DeePMDkit_version, _cuda_suffix) +] +if ARCH == 'x86_64': + # TBB and ScaFaCos are an optional dependency when building on Intel arch + dependencies += [ + ('tbb', '2021.11.0'), + ('ScaFaCoS', '1.0.4'), + ] + +# To use additional custom configuration options, use the 'configopts' easyconfig parameter +# See docs and lammps easyblock for more information. +# https://github.com/lammps/lammps/blob/master/cmake/README.md#lammps-configuration-options + +# OpenMP-Kokkos build is default in the current easyblock. One can switch to serial backend of Kokkos, +# which is claimed to be faster in pure MPI calculations +# configopts = "-DKokkos_ENABLE_SERIAL=yes " + +# packages auto-enabled by easyblock +# 'GPU' - if cuda package is present and kokkos is disabled +# 'KOKKOS' - if kokkos is enabled (by default) +# 'INTEL' - if builing on Intel CPU +# 'OPENMP' - if OpenMP swithed on in 'toolchainopts' + +# include the following extra packages into the build +general_packages = [ + 'AMOEBA', + 'ASPHERE', + 'ATC', + 'AWPMD', + 'BOCS', + 'BODY', + 'BPM', + 'BROWNIAN', + 'CG-DNA', + 'CG-SPICA', + 'CLASS2', + 'COLLOID', + 'COLVARS', + 'COMPRESS', + 'CORESHELL', + 'DIELECTRIC', + 'DIFFRACTION', + 'DIPOLE', + 'DPD-BASIC', + 'DPD-MESO', + 'DPD-REACT', + 'DPD-SMOOTH', + 'DRUDE', + 'EFF', + 'ELECTRODE', + 'EXTRA-COMPUTE', + 'EXTRA-DUMP', + 'EXTRA-FIX', + 'EXTRA-MOLECULE', + 'EXTRA-PAIR', + 'FEP', + 'GRANULAR', + 'H5MD', + 'INTERLAYER', + 'KIM', + 'KSPACE', + 'LATBOLTZ', + 'LEPTON', + 'MACHDYN', + 'MANIFOLD', + 'MANYBODY', + 'MC', + 'MDI', + 'MEAM', + 'MGPT', + 'MISC', + 'ML-IAP', + 'ML-PACE', + 'ML-POD', + 'ML-RANN', + 'ML-SNAP', + 'MOFFF', + 'MOLECULE', + 'MOLFILE', + 'MPIIO', + 'NETCDF', + 'OPT', + 'ORIENT', + 'PERI', + 'PHONON', + 'PLUGIN', + 'PLUMED', + 'POEMS', + 'PTM', + 'PYTHON', + 'QEQ', + 'QTB', + 'REACTION', + 'REAXFF', + 'REPLICA', + 'RIGID', + 'SCAFACOS', + 'SHOCK', + 'SMTBQ', + 'SPH', + 'SPIN', + 'SRD', + 'TALLY', + 'UEF', + 'VORONOI', + 'VTK', + 'YAFF', +] + +# Enabeling the build of the DeePMD-kit plugin +configopts = 'CMAKE_INSTALL_PREFIX=${deepmd_root} -DCMAKE_PREFIX_PATH=${deepmd_root}' + +# Excluded packages due to requiring additional (non-trivial) deps +# - ADIOS +# - LATTE +# - MESONT (requires very large files downloaded during build) +# - ML-HDNNP (requires N2P2) +# - ML-QUIP +# - MSCG +# - QMMM (setup seems complex) + +# hardware-specific option +# note: only the highest capability will be used +# cuda_compute_capabilities = ['9.0'] + +configopts = '-Ddeepmd_source_dir=%(builddir)s/deepmd-kit-3.0.1' + +moduleclass = 'chem' From 044e313ea1ac3bc71d407b3bc6d6267a44d91b89 Mon Sep 17 00:00:00 2001 From: Lara Ramona Peeters <49882639+laraPPr@users.noreply.github.com> Date: Mon, 23 Jun 2025 10:40:04 +0200 Subject: [PATCH 2/7] =?UTF-8?q?=C3=BBpdate=20checksum=20of=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb index ae8df231ea8f..63cff45fbd78 100644 --- a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb @@ -41,7 +41,7 @@ checksums = [ {'LAMMPS-2Aug2023_fix-timestep-balance-example.patch': '6f68387ced2b4bd0a06e4c3d31b0ffd47042476777d87d8a0ca6b19a4e6a1777'}, {'LAMMPS-29Aug2024_install-deepmd-plugin.patch': - '1723b0c1175c31b9e1f41a87750fddd00225e35a14ac9f9107323360fb69a698'}, + 'e601be73e131ed0740553b6ceff066eca0a7a474aad3d1b9e8dd4409ac6497df'}, ] builddependencies = [ From 52b19b69908dc6b4286a949cf7c4381b13f26374 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Thu, 26 Jun 2025 12:33:15 +0200 Subject: [PATCH 3/7] specify name of deepmd source + fix configopts --- ...oss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb index 63cff45fbd78..f30ac5de7820 100644 --- a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb @@ -26,7 +26,10 @@ source_urls = [ ] sources = [ 'stable_%(version)s.tar.gz', - 'v%s.tar.gz' % local_DeePMDkit_version, + { + 'download_filename': 'v%s.tar.gz' % local_DeePMDkit_version, + 'filename': 'deepmd-v%s.tar.gz' % local_DeePMDkit_version, + }, ] patches = [ 'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch', @@ -35,7 +38,7 @@ patches = [ ] checksums = [ {'stable_2Aug2023_update2.tar.gz': '3bcecabc9cad08d0a4e4d989b52d29c58505f7ead8ebacf43c9db8d9fd3d564a'}, - {'v3.0.1.tar.gz': 'e842edbc2714bc948ce708c411e5fed751e67c88d5c493c2978f11c849027dca'}, + {'deepmd-v3.0.1.tar.gz': 'e842edbc2714bc948ce708c411e5fed751e67c88d5c493c2978f11c849027dca'}, {'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch': '723c944b62b9d28427d25e80a7a67049631702d344df49268a6846aa0cd0fe04'}, {'LAMMPS-2Aug2023_fix-timestep-balance-example.patch': @@ -183,9 +186,6 @@ general_packages = [ 'YAFF', ] -# Enabeling the build of the DeePMD-kit plugin -configopts = 'CMAKE_INSTALL_PREFIX=${deepmd_root} -DCMAKE_PREFIX_PATH=${deepmd_root}' - # Excluded packages due to requiring additional (non-trivial) deps # - ADIOS # - LATTE @@ -199,6 +199,7 @@ configopts = 'CMAKE_INSTALL_PREFIX=${deepmd_root} -DCMAKE_PREFIX_PATH=${deepmd_r # note: only the highest capability will be used # cuda_compute_capabilities = ['9.0'] +# Enabeling the build of the DeePMD-kit plugin configopts = '-Ddeepmd_source_dir=%(builddir)s/deepmd-kit-3.0.1' moduleclass = 'chem' From d0cb70ec0ba957774e4bf91eab65ca71237570c7 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Thu, 26 Jun 2025 12:39:06 +0200 Subject: [PATCH 4/7] replace hardcoded version of deepmd in configopts --- ..._update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb index f30ac5de7820..f7084c87372b 100644 --- a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb @@ -200,6 +200,6 @@ general_packages = [ # cuda_compute_capabilities = ['9.0'] # Enabeling the build of the DeePMD-kit plugin -configopts = '-Ddeepmd_source_dir=%(builddir)s/deepmd-kit-3.0.1' +configopts = '-Ddeepmd_source_dir=%%(builddir)s/deepmd-kit-%s' % local_DeePMDkit_version moduleclass = 'chem' From bdefb2042ea39a4d16a5f9a8add4e1af9fafd5ab Mon Sep 17 00:00:00 2001 From: laraPPr Date: Thu, 26 Jun 2025 16:26:41 +0200 Subject: [PATCH 5/7] add patch to pr --- .../LAMMPS-29Aug2024_install-deepmd-plugin.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 easybuild/easyconfigs/l/LAMMPS/LAMMPS-29Aug2024_install-deepmd-plugin.patch diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-29Aug2024_install-deepmd-plugin.patch b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-29Aug2024_install-deepmd-plugin.patch new file mode 100644 index 000000000000..1d5473e710f0 --- /dev/null +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-29Aug2024_install-deepmd-plugin.patch @@ -0,0 +1,12 @@ +Add include line for the DeePMD-kit plugin +See DeepMD documentation: https://docs.deepmodeling.com/projects/deepmd/en/stable/install/install-lammps.html#with-cmake +Author: Lara Peeters (UGent) +diff -ruN lammps-stable_29Aug2024.orig/cmake/CMakeLists.txt lammps-stable_29Aug2024/cmake/CMakeLists.txt +--- lammps-stable_29Aug2024.orig/cmake/CMakeLists.txt 2024-08-30 02:47:52.000000000 +0200 ++++ lammps-stable_29Aug2024/cmake/CMakeLists.txt 2025-06-20 10:17:41.184817337 +0200 +@@ -1091,3 +1091,5 @@ + message(STATUS "Collecting code coverage data") + endif() + endif() ++ ++include(${deepmd_source_dir}/source/lmp/builtin.cmake) From 128c142e7a7f5de1918903bde0fc167110de4068 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 6 Mar 2026 09:04:49 +0100 Subject: [PATCH 6/7] add patch to ensure that system Python packages are used and not updated in Python virtual environment --- ...pdate2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb index f7084c87372b..19f305ba3ebd 100644 --- a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb @@ -34,15 +34,17 @@ sources = [ patches = [ 'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch', 'LAMMPS-2Aug2023_fix-timestep-balance-example.patch', + 'LAMMPS-2Aug2023_python_venv.patch', 'LAMMPS-29Aug2024_install-deepmd-plugin.patch' ] checksums = [ {'stable_2Aug2023_update2.tar.gz': '3bcecabc9cad08d0a4e4d989b52d29c58505f7ead8ebacf43c9db8d9fd3d564a'}, {'deepmd-v3.0.1.tar.gz': 'e842edbc2714bc948ce708c411e5fed751e67c88d5c493c2978f11c849027dca'}, {'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch': - '723c944b62b9d28427d25e80a7a67049631702d344df49268a6846aa0cd0fe04'}, + '314ab1064af74ddfcf4091dfe9f90fa32cfa4100e8d01fea7b59b019575a7c51'}, {'LAMMPS-2Aug2023_fix-timestep-balance-example.patch': '6f68387ced2b4bd0a06e4c3d31b0ffd47042476777d87d8a0ca6b19a4e6a1777'}, + {'LAMMPS-2Aug2023_python_venv.patch': '87fd13b0c66f0886877885412ff13dfd092782e2237ba1fae157f803437828d6'}, {'LAMMPS-29Aug2024_install-deepmd-plugin.patch': 'e601be73e131ed0740553b6ceff066eca0a7a474aad3d1b9e8dd4409ac6497df'}, ] From e6b4c42b46a9ccd68f5ab295fd8e23e09bca601e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 12 Mar 2026 19:30:36 +0100 Subject: [PATCH 7/7] add extra missing patch to avoid trouble with 'wheel' Python package not being found when installing LAMMPS 2Aug2023 --- ...update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb index 19f305ba3ebd..e9710e9f47d7 100644 --- a/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb +++ b/easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1-with-deepmd-plugin.eb @@ -35,6 +35,7 @@ patches = [ 'LAMMPS-2Aug2023_install_lammps_python_package_in_eb_software_module.patch', 'LAMMPS-2Aug2023_fix-timestep-balance-example.patch', 'LAMMPS-2Aug2023_python_venv.patch', + 'LAMMPS-2Aug2023_python_wheel_requirements.patch', 'LAMMPS-29Aug2024_install-deepmd-plugin.patch' ] checksums = [ @@ -45,6 +46,8 @@ checksums = [ {'LAMMPS-2Aug2023_fix-timestep-balance-example.patch': '6f68387ced2b4bd0a06e4c3d31b0ffd47042476777d87d8a0ca6b19a4e6a1777'}, {'LAMMPS-2Aug2023_python_venv.patch': '87fd13b0c66f0886877885412ff13dfd092782e2237ba1fae157f803437828d6'}, + {'LAMMPS-2Aug2023_python_wheel_requirements.patch': + 'fa2b615d3cbab6f886e5aaee39cb46b5bf9a542291b919fe0b2f734ab79eeed0'}, {'LAMMPS-29Aug2024_install-deepmd-plugin.patch': 'e601be73e131ed0740553b6ceff066eca0a7a474aad3d1b9e8dd4409ac6497df'}, ]