Skip to content

[LAMMPS] [package list]

LAMMPS/2Aug2023_update3-cpeAMD-24.03-rocm (LAMMPS-2Aug2023_update3-cpeAMD-24.03-rocm.eb)

Install with the EasyBuild-user module:

eb LAMMPS-2Aug2023_update3-cpeAMD-24.03-rocm.eb -r
To access module help after installation and get reminded for which stacks and partitions the module is installed, use module spider LAMMPS/2Aug2023_update3-cpeAMD-24.03-rocm.

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'

local_FFmpeg_version       = '6.1.1'    # https://ffmpeg.org/download.html#releases
local_libjpegturbo_version = '3.0.1'    # https://github.com/libjpeg-turbo/libjpeg-turbo/releases
local_libpng_version       = '1.6.40'   # http://www.libpng.org/pub/png/libpng.html
local_zstd_version         = '1.5.5'    # https://github.com/facebook/zstd/releases
local_GSL_version          = '2.7.1'    # https://ftp.gnu.org/gnu/gsl/
local_zlib_version         = '1.3.1'    # https://www.zlib.net/
local_gzip_version         = '1.13'     # https://ftp.gnu.org/gnu/gzip/
local_cURL_version         = '8.3.0'    # https://curl.se/download/
local_PCRE2_version        = '10.42'    # https://github.com/PCRE2Project/pcre2/releases
local_libxml2_version      = '2.11.5'   # https://gitlab.gnome.org/GNOME/libxml2/-/releases
local_Eigen_version        = '3.4.0'    # https://gitlab.com/libeigen/eigen/-/releases
local_PLUMED_version       = '2.9.2'    # https://github.com/plumed/plumed2/releases

name = 'LAMMPS'
version = '2Aug2023_update3'
versionsuffix = '-rocm'

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']
docurls = ['https://docs.lammps.org/stable/']

toolchain = {'name': 'cpeAMD', 'version': '24.03'}
toolchainopts = {'usempi': True, 'verbose': False, 'openmp': True}

# https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz
source_urls = ['https://github.com/%(namelower)s/%(namelower)s/archive']
sources = ['stable_%(version)s.tar.gz']
checksums = ['6666e28cb90d3ff01cbbda6c81bdb85cf436bbb41604a87f2ab2fa559caa8510']

builddependencies = [
    ('buildtools',        '%(toolchain_version)s', '', True),
    # It's impossible to compile with OpenMP enabled with the gfx90a target
    # module is loaded
    ('craype-accel-host', EXTERNAL_MODULE),
]

dependencies = [
    ('rocm',                      EXTERNAL_MODULE),
    ('cray-python',               EXTERNAL_MODULE),
    ('cray-hdf5-parallel',        EXTERNAL_MODULE),
    ('cray-netcdf-hdf5parallel',  EXTERNAL_MODULE),
    ('cray-parallel-netcdf',      EXTERNAL_MODULE),
    ('cray-fftw',                 EXTERNAL_MODULE),
    ('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),
    ('gzip',                      local_gzip_version),
    ('cURL',                      local_cURL_version),
    ('PCRE2',                     local_PCRE2_version),
    ('libxml2',                   local_libxml2_version),
    ('Eigen',                     local_Eigen_version, '', True),
    ('PLUMED',                    local_PLUMED_version, '-noPython'),
]

local_enabled_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',
    'KSPACE',
    'LATBOLTZ',
    'LEPTON',
    'MACHDYN',
    'MANIFOLD',
    'MANYBODY',
    'MC',
    'MEAM',
    'MESONT',
    'MGPT',
    'MISC',
    'ML-IAP',
    'ML-PACE',
    'ML-POD',
    'ML-RANN',
    'ML-SNAP',
    'MOFFF',
    'MOLECULE',
    'MOLFILE',
    'MPIIO',
    'NETCDF',
    'OPENMP',
    'OPT',
    'ORIENT',
    'PERI',
    'PHONON',
    'PLUGIN',
    'PLUMED',
    'POEMS',
    'PTM',
    'PYTHON',
    'QEQ',
    'QTB',
    'REACTION',
    'REAXFF',
    'REPLICA',
    'RIGID',
    'SHOCK',
    'SMTBQ',
    'SPH',
    'SPIN',
    'SRD',
    'TALLY',
    'UEF',
    'YAFF',
]

local_disabled_packages = [
    'USER-INTEL',
]

# General compilation options 
configopts = ' '.join([
    '-DCMAKE_CXX_COMPILER="$CXX"',
    '-DMPICXX="$CXX"',
    '-DCMAKE_EXE_LINKER_FLAGS="$PE_MPICH_GTL_DIR_amd_gfx90a $PE_MPICH_GTL_LIBS_amd_gfx90a"',
    '-DBUILD_MPI=ON',
    '-DBUILD_OMP=ON',
    '-DWITH_JPEG=ON',
    '-DWITH_PNG=ON',
    '-DWITH_FFMPEG=ON',
    '-DWITH_GZIP=ON'
]) + ' '

# 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'

configopts += ' '.join([
    '-DPKG_KOKKOS=ON',
    '-DKokkos_ENABLE_SERIAL=ON',
    '-DKokkos_ENABLE_OPENMP=ON',
    '-DKokkos_ARCH_%s=ON' % local_kokkos_cpu_arch,
    '-DKokkos_ENABLE_HIP=ON',
    '-DKokkos_ARCH_VEGA90A=ON',
    '-DHIP_PATH=$ROCM_PATH',
]) + ' '

# Enabled packages
configopts += ' '.join([f'-DPKG_{package}=ON' for package in local_enabled_packages]) + ' '
# Packages explicitly turned off
configopts += ' '.join([f'-DPKG_{package}=OFF' for package in local_disabled_packages]) + ' '

# folder with CMakeLists.txt relative to the unpacked tarball
srcdir = 'cmake'

sanity_check_paths = {
    'files': ['bin/lmp'],
    'dirs':  [],
}

# cray-python do not set LD_LIBRARY_PATH to a location where the Python library
# is installed, causing LAMMPS to crash, so, we had it ourself
modluafooter = """
python_prefix = os.getenv("CRAY_PYTHON_PREFIX")
if python_prefix ~= nil then
    prepend_path("LD_LIBRARY_PATH", pathJoin(python_prefix, "lib"))
end
"""

moduleclass = 'chem'

[LAMMPS] [package list]