LAMMPS/22Jul2025_update4-cpeGNU-26.03-CPU (LAMMPS-22Jul2025_update4-cpeGNU-26.03-CPU.eb)
Install with the EasyBuild-user module:
To access module help after installation and get reminded for which stacks and partitions the module is installed, usemodule spider LAMMPS/22Jul2025_update4-cpeGNU-26.03-CPU.
EasyConfig:
# Contributed by TWR and Luca Marsella (CSCS)
# Adapted by Kurt Lust (kurt.lust@uantwerpen.be) for use on LUMI
# Updated to CPE 24.03 by Orian Louant
easyblock = 'CMakeMake'
# Central stack
local_FFmpeg_version = '8.1.1' # https://ffmpeg.org/download.html#releases
local_libjpegturbo_version = '3.2.0' # https://github.com/libjpeg-turbo/libjpeg-turbo/releases
local_libpng_version = '1.6.58' # http://www.libpng.org/pub/png/libpng.html (Not yet in EB 2025a when checking)
local_zstd_version = '1.5.7' # https://github.com/facebook/zstd/releases
local_GSL_version = '2.8' # https://ftp.gnu.org/gnu/gsl/
local_zlib_version = '2.3.3' # https://github.com/zlib-ng/zlib-ng/releases
local_gzip_version = '1.14' # https://ftp.gnu.org/gnu/gzip/
local_cURL_version = '8.21.0' # https://curl.haxx.se/download/ - Newer than 2026.1?
local_PCRE2_version = '10.47' # https://github.com/PCRE2Project/pcre2/releases # Not yet in EB 2025a when checked for installation
local_libxml2_version = '2.15.3' # http://xmlsoft.org/sources/
local_Eigen3_version = '3.4.0' # https://gitlab.com/libeigen/eigen/-/releases, LAMMPS needs Eigen 3.x.
# User-installable
local_ADIOS2_version = '2.12.1' # https://github.com/ornladios/ADIOS2/releases
local_PLUMED2_7_version = '2.7.6' # https://github.com/plumed/plumed2/releases, LAMMPS may prefer old versions.
local_ScaFaCoS_version = '1.0.4' # https://github.com/scafacos/scafacos/releases
local_Voropp_version = '0.4.6' # https://math.lbl.gov/voro++/download/
name = 'LAMMPS'
version = '22Jul2025_update4'
version_suffix = '-CPU'
homepage = 'https://www.lammps.org/'
whatis = [
'Description: LAMMPS is a classical molecular dynamics simulation code designed for HPC systems'
]
description = """
LAMMPS is a classical molecular dynamics code with a focus on materials
modeling. It's 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. Many of
its models have versions that provide accelerated performance on CPUs, GPUs,
and Intel Xeon Phis. The code is designed to be easy to modify or extend
with new functionality.
LAMMPS is distributed as an open source code under the terms of the GPLv2.
"""
software_license_urls = ['https://docs.lammps.org/Intro_opensource.html']
doc_urls = ['https://docs.lammps.org/stable/']
toolchain = {'name': 'cpeGNU', 'version': '26.03'}
toolchain_opts = {'usempi': True, 'verbose': False, 'openmp': True}
source_urls = ['https://github.com/%(namelower)s/%(namelower)s/archive']
sources = ['stable_%(version)s.tar.gz']
checksums = ['411088d9c03339e025f6a975e0a5741bb9e3f351cc39eda220ab22ac318fe2fb']
sources = [
{ # LAMMPS itself
'filename': 'stable_%(version)s.tar.gz',
'source_urls': ['https://github.com/%(namelower)s/%(namelower)s/archive']
},
{ # Potential https://download.lammps.org/potentials/C_10_10.mesocnt
'filename': 'C_10_10.mesocnt',
'source_urls': ['https://download.lammps.org/potentials'],
'extract_cmd': 'cp %s %(builddir)s/lammps-stable_%(version)s/potentials'
},
{ # https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix2.tar.gz
'download_filename': 'v.2023.11.25.fix2.tar.gz',
'filename': 'libpace_v.2023.11.25.fix2.tar.gz',
'source_urls': ['https://github.com/ICAMS/lammps-user-pace/archive/refs/tags'],
'extract_cmd': 'cp %s %(builddir)s/lammps-stable_%(version)s/libpace.tar.gz'
}
]
checksums = [
{'stable_%(version)s.tar.gz': '411088d9c03339e025f6a975e0a5741bb9e3f351cc39eda220ab22ac318fe2fb'},
]
build_deps = [
('buildtools', '%(toolchain_version)s', '', True),
('craype-accel-host', EXTERNAL_MODULE),
]
deps = [
# Cray deps
('cray-python', EXTERNAL_MODULE),
('cray-hdf5-parallel', EXTERNAL_MODULE),
('cray-netcdf-hdf5parallel', EXTERNAL_MODULE),
('cray-parallel-netcdf', EXTERNAL_MODULE),
('cray-fftw', EXTERNAL_MODULE),
# Central stack deps
('FFmpeg', local_FFmpeg_version),
('libjpeg-turbo', local_libjpegturbo_version),
('libpng', local_libpng_version),
('zstd', local_zstd_version),
('GSL', local_GSL_version, '-OpenMP'),
('zlib', local_zlib_version), # For the COMPRESS package
('gzip', local_gzip_version),
('cURL', local_cURL_version),
('PCRE2', local_PCRE2_version),
('libxml2', local_libxml2_version),
('Eigen', local_Eigen3_version, '', True), # For the MACHDYN package
# Contrib deps
('ADIOS2', local_ADIOS2_version, '-MPI-hdf5-parallel'), # For the ADIOS package
('PLUMED', local_PLUMED2_7_version, '-noPython'), # For the PLUMED package
('ScaFaCoS', local_ScaFaCoS_version, '-forLAMMPS'), # For the SCAFACOS package
('Voro++', local_Voropp_version), # For the VORONOI package
]
local_enabled_packages = [
'ADIOS', # Dependency in contrib, and could not get this to work yet.
'AMOEBA',
'APIP',
'ASPHERE',
'ATC',
'AWPMD',
'BOCS',
'BODY',
'BPM',
'BROWNIAN',
'CG-DNA',
'CG-SPICA',
'CLASS2',
'COLLOID',
'COLVARS',
'COMPRESS', # Needs zlib
'CORESHELL',
'DIELECTRIC',
'DIFFRACTION',
'DIPOLE',
'DPD-BASIC',
'DPD-MESO',
'DPD-REACT',
'DPD-SMOOTH',
'DRUDE',
'EFF',
'ELECTRODE', # Also needs KSPACE to be enabled.
'EXTRA-DUMP',
'EXTRA-FIX',
'EXTRA-MOLECULE',
'EXTRA-PAIR',
'FEP',
'GRANULAR',
'H5MD', # Needs HDF5.
'INTERLAYER',
#'KIM', # Not included as it needs an additional library not yet in the software stack.
#'KOKKOS', # Done separately, not via this list.
'KSPACE',
'LATBOLTZ',
'LEPTON', # Additional library that is needed is included in the LAMMPS distribution
'MACHDYN', # Needs Eigen3 library, so the Eigen module
'MANIFOLD',
'MANYBODY',
'MC',
'MEAM',
'MESONT',
'MGPT',
'MISC',
#'ML-HDNNP', # Not included as it needs the n2p2 library which by itself has too many dependencies to be practical,
# including dependencies such as TeX which do not belong on an HPC system, and then also seems to require
# several Python packages in support.
'ML-IAP', # Needs ML-SNAP to be included in the list. When enabling Python (not done yet), Cython is also needed.
'ML-PACE', # Causes a hidden download unless the right version is installed first...
'ML-POD',
#'ML-QUIP', # Needs the QUIP library so not included.
'ML-RANN',
'ML-SNAP',
'ML-UF3',
'MOFFF',
'MOLECULE',
'MOLFILE',
'NETCDF', # Requires NetCDF
'OPENMP',
'OPT',
'ORIENT',
'PERI',
'PHONON',
'PLUGIN',
'PLUMED', # Needs PLUMED, but the manual mentions it should be 2.4.x, 2.5.x or 2.6.x and it downloads 2.7.2 if none is given
'POEMS',
'PTM',
'PYTHON',
'QEQ',
'QMMM', # Deliberately not included in this setup as it need QuantumESPRESSO which would be a huge dependency.
# It is also difficult to build and probably difficult to use.
'QTB',
'REACTION',
'REAXFF',
'REPLICA',
'RHEO',
'RIGID',
'SCAFACOS', # Not included at the moment as it needs an additional library.
'SHOCK',
'SMTBQ',
'SPH',
'SPIN',
'SRD',
'TALLY',
'UEF',
'VORONOI', # Needs Voro++
#'VTK', # Not included at the moment as it needs the VTK libraries
'YAFF',
]
local_disabled_packages = [
'USER-INTEL',
]
# General compilation options
configure_opts = ' '.join([
'-DCMAKE_CXX_COMPILER="$CXX"',
'-DMPICXX="$CXX"',
'-DBUILD_SHARED_LIBS=NO', # Default is NO. Set to YES to build liblammps.so instead
'-DBUILD_MPI=ON',
'-DBUILD_OMP=ON',
'-DBUILD_TOOLS=ON', # Default is OFF, ON will build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt
'-DFFT=FFTW3',
'-DFFT_KOKKOS=FFTW3',
'-DWITH_JPEG=ON',
'-DWITH_PNG=ON',
'-DWITH_FFMPEG=ON',
'-DWITH_GZIP=ON',
'-DWITH_CURL=ON',
'-DDOWNLOAD_EIGEN3=OFF',
'-DEIGEN3_INCLUDE_DIR=$EBROOTEIGEN/include',
]) + ' '
# Compilation options specific to Kokkos
import os
local_lumi_partition = os.getenv('LUMI_STACK_PARTITION', 'L')
local_kokkos_cpu_arch = 'ZEN3' if local_lumi_partition in ['C', 'G'] else 'ZEN2'
configure_opts += ' '.join([
'-DPKG_KOKKOS=ON',
'-DKokkos_ENABLE_SERIAL=ON',
'-DKokkos_ENABLE_OPENMP=ON',
'-DKokkos_ARCH_%s=ON' % local_kokkos_cpu_arch,
]) + ' '
# Enabled packages
configure_opts += ' '.join([f'-DPKG_{package}=ON' for package in local_enabled_packages]) + ' '
# Packages explicitly turned off
configure_opts += ' '.join([f'-DPKG_{package}=OFF' for package in local_disabled_packages]) + ' '
pre_configure_opts = pre_build_opts = 'module rm rocm && '
pre_configure_opts += 'cp ../lammps-stable_%(version)s/libpace.tar.gz . && '
# folder with CMakeLists.txt relative to the unpacked tarball
srcdir = 'cmake'
sanity_check_paths = {
'files': ['bin/lmp'],
'dirs': [],
}
# cray-python does not set LD_LIBRARY_PATH to a location where the Python library
# is installed, causing LAMMPS to crash, so, we had it ourself
env_mod_lua_footer = """
python_prefix = os.getenv("CRAY_PYTHON_PREFIX")
if python_prefix ~= nil then
prepend_path("LD_LIBRARY_PATH", pathJoin(python_prefix, "lib"))
end
"""
env_mod_category = 'chem'