Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 65 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,75 @@
Repository for pre-release builds of [ESPResSo](https://github.com/espressomd/espresso).
Builds are deployed to the [`dev.eessi.io`](https://www.eessi.io/docs/repositories/dev.eessi.io/) repository.

## Run workflow with the bot

See [our wiki](https://github.com/multixscale/dev.eessi.io-espresso/wiki).

## Run workflow locally

```sh
source /cvmfs/software.eessi.io/versions/2023.06/init/bash
module load EasyBuild/5.1.1
eb easyconfigs/ESPResSo-foss-2023b-software-commit.eb \
source /cvmfs/software.eessi.io/versions/2025.06/init/bash
module load EasyBuild/5.1.2
eb easyconfigs/ESPResSo-foss-2025a-software-commit.eb \
--include-easyblocks=easyconfigs/e/ESPResSo/espresso.py \
--software-commit=dc87ede --max-parallel $(nproc)
--software-commit=11393df --max-parallel $(nproc)
module use ~/.local/easybuild/modules/all
module spider ESPResSo
module load ESPResSo/dc87ede-foss-2023b
module load ESPResSo/11393df-foss-2025a
```

### Build missing dependencies locally

```sh
source /cvmfs/software.eessi.io/versions/2025.06/init/bash
module load EasyBuild/5.1.2
eb easybuild/easyconfigs/b/Boost.MPI/Boost.MPI-1.88.0-gompi-2025a.eb \
--dump-test-report=Boost.MPI-1.88.0-gompi-2025a_$(date "+%Y%m%d").md \
--robot --max-parallel $(nproc)
module use ~/.local/easybuild/modules/all
module spider Boost.MPI
eb easyconfigs/ESPResSo-foss-2025a-software-commit.eb \
--include-easyblocks=easyconfigs/e/ESPResSo/espresso.py \
--software-commit=11393df --max-parallel $(nproc)
module load ESPResSo/11393df-foss-2025a
python -c 'import numpy, espressomd;print(f"numpy {numpy.__version__}, ESPResSo {espressomd.__version__}")'
```

### Contribute missing dependencies upstream

- contribute the easyconfig with a test report
([instructions](https://docs.easybuild.io/contributing/#contributing_easyconfigs),
example: [easybuilders/easybuild-easyconfigs#24421](https://github.com/easybuilders/easybuild-easyconfigs/pull/24421))
- add easyconfig to the software layer
([instructions](https://www.eessi.io/docs/adding_software/opening_pr/),
example: [EESSI/software-layer#1279](https://github.com/EESSI/software-layer/pull/1279))
- deploy new software ([instructions](https://www.eessi.io/docs/adding_software/adding_development_software/))

## Migrate to a newer toolchain

- go to the top-level directory of your local `dev.eessi.io-espresso` fork
- select new `foss` toolchain version, e.g. 2025a, and create the corresponding
easyconfig file using any available older easyconfig file from that toolchain,
e.g. `cp easyconfigs/ESPResSo-foss-2023b-software-commit.eb easyconfigs/ESPResSo-foss-2025a-software-commit.eb`
- select the software layer version that ships the selected toolchain version
(see [EESSI versions](https://www.eessi.io/docs/repositories/versions/)),
and create the corresponding easystack file with the updated EasyBuild version, e.g.
`cp easystacks/software.eessi.io/2023.06/espresso-eb-5.1.0-dev.yml easystacks/software.eessi.io/2025.06/espresso-eb-5.1.2-dev.yml`
- lookup GCC version for that toolchain version
([toolchain list](https://docs.easybuild.io/common-toolchains/#common_toolchains_overview))
- for each ESPResSo dependency, find the dependency version that matches
the GCC version or toolchain version
- use `module spider` followed by the dependency name,
or the online database of supported software (example:
[c/CMake](https://docs.easybuild.io/version-specific/supported-software/c/CMake/))
- toolchains `GCCcore`, `GCC`, `gfbf`, and `gompi` are subsets of `foss`
([dependency tree](https://docs.easybuild.io/common-toolchains/#newest-generations-2022b-and-later)),
therefore package variants matched by a `module spider` search from any
of these base toolchains can be ingested by a `foss` easyconfig
- source the chosen software layer version,
e.g. `source /cvmfs/software.eessi.io/versions/2025.06/init/bash`
- load the chosen EasyBuild version,
e.g. `module load EasyBuild/5.1.2`
- make sure that GCC and other modules are *not* loaded!
- make sure you are *not* in a Python environment!
- run `eb easyconfigs/ESPResSo-foss-2025a-software-commit.eb`
78 changes: 40 additions & 38 deletions easyconfigs/ESPResSo-foss-2023b-software-commit.eb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ description = """A software package for Molecular Dynamics and Monte Carlo
simulations of bead-spring models, with electrostatics, magnetostatics,
hydrodynamics and reaction-diffusion-advection solvers."""

toolchain = {'name': 'foss', 'version': '2023b'}
toolchainopts = {'usempi': True, 'pic': True}

builddependencies = [
('CMake', '3.27.6'),
('Ninja', '1.11.1'),
('Cython', '3.0.10'),
]

dependencies = [
('Python', '3.11.5'),
('SciPy-bundle', '2023.11'),
('Boost.MPI', '1.83.0'),
('HeFFTe', '2.4.1'),
('Mesa', '23.1.9'),
('GSL', '2.7'),
('IPython', '8.17.2'),
('Pint', '0.24'),
('HDF5', '1.14.3'),
('h5py', '3.11.0'),
('VTK', '9.3.0'),
]

sources = [
{
'source_urls': ['https://github.com/espressomd/espresso/archive/'],
Expand All @@ -25,52 +48,38 @@ sources = [
},
{
'source_urls': ['https://github.com/ECP-copa/Cabana/archive/'],
'filename': 'Cabana-ebfaa51.tar.gz',
'download_filename': 'ebfaa51.tar.gz',
'filename': 'Cabana-e76c1a1.tar.gz',
'download_filename': 'e76c1a1.tar.gz',
},
{
'source_urls': ['https://github.com/highfive-devs/highfive/archive/'],
'filename': 'highfive-b8d21eb39d4c6c66a72646ddd338d4c552b1a645.tar.gz',
'download_filename': 'b8d21eb.tar.gz',
'filename': 'highfive-3.2.0.tar.gz',
'download_filename': 'v3.2.0.tar.gz',
},
]
if any(x[0] == 'HDF5' for x in dependencies):
sources += [
{
'source_urls': ['https://github.com/highfive-devs/highfive/archive/'],
'filename': 'highfive-3.2.0.tar.gz',
'download_filename': 'v3.2.0.tar.gz',
},
]
checksums = [{
'espresso-%(software_commit)s.tar.gz': '571ad31186d5304cef6799cb82024376e693947ca2d6f49dfbd72d92b66f16a1',
'espresso-%(software_commit)s.tar.gz': 'b0f816ba9ec7422beb716b624af205c8ae780642a5b8c8e3d0fbe3214860590d',
'walberla-fc081850.tar.gz': '686c8f26e225971ae5beed6f25ada7536bfacb96db11f2ff9cce6f267fc7f8ea',
'kokkos-18b830e.tar.gz': 'dc0127134f47752f61e74c77237bd9ec560535c4283fef8c9643f947b3733063',
'Cabana-ebfaa51.tar.gz': 'fe5b1b1d419662b29a80cbd6703994b28c942ccbee3b201eca87e48a13836350',
'highfive-b8d21eb.tar.gz': '4da57be993b3e2c344e01c21f488a30640ebf6457534e3bb81cfd756a50a455d',
'Cabana-e76c1a1.tar.gz': '20dbd352fe1da744a312e556730287f52a205d1e767ac45557a3998b7fc80ca7',
'highfive-3.2.0.tar.gz': '01ea2eed7dbce1cf5dfff59476cfa113a7822b641aecbd99c674592fe7a4e630',
}]

toolchain = {'name': 'foss', 'version': '2023b'}
toolchainopts = {'usempi': True, 'pic': True}

builddependencies = [
('CMake', '3.27.6'),
('Ninja', '1.11.1'),
]

dependencies = [
('Python', '3.11.5'),
('SciPy-bundle', '2023.11'),
('Boost.MPI', '1.83.0'),
('HeFFTe', '2.4.1'),
('Mesa', '23.1.9'),
('GSL', '2.7'),
('IPython', '8.17.2'),
('Pint', '0.24'),
('HDF5', '1.14.3'),
('h5py', '3.11.0'),
('VTK', '9.3.0'),
]

# default CUDA compute capabilities to use (override via --cuda-compute-capabilities)
if any(x[0] == 'CUDA' for x in dependencies):
cuda_compute_capabilities = ['5.2', '6.0', '7.0', '7.5', '8.0', '8.6', '9.0']

configopts = f' -DESPRESSO_BUILD_TESTS=ON '
# make sure the right Python is used (note: -DPython3_EXECUTABLE or -DPython_EXECUTABLE does not work!)
configopts += ' -D PYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python '
configopts += ' -DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python '
configopts += ' -DCMAKE_INSTALL_LIBDIR:PATH=lib '
# workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/22678
# (this only affects testsuite executable files in the build folder)
Expand All @@ -95,11 +104,6 @@ _libs = [
# ESPResSo
'espresso_core', 'espresso_shapes', 'espresso_walberla',
'espresso_script_interface', 'script_interface', 'utils', '_init',
# waLBerla
'libwalberla_core', 'libwalberla_executiontree', 'libwalberla_timeloop',
'libwalberla_field', 'libwalberla_blockforest', 'libwalberla_geometry',
'libwalberla_lbm', 'libwalberla_vtk', 'libwalberla_domain_decomposition',
'libwalberla_boundary', 'liblodepng',
]
_python_modules = [
'__init__.py', 'system.py', 'version.py', 'collision_detection.py', 'lb.py',
Expand All @@ -109,9 +113,7 @@ if any(x[0] == 'HDF5' for x in dependencies):
_libs.append('espresso_hdf5')
_python_modules.append('io/writer/h5md.py')
if any(x[0] == 'CUDA' for x in dependencies):
_libs += [
'espresso_cuda', 'espresso_walberla_cuda', 'libwalberla_gpu',
]
libs.append('espresso_cuda')
_python_modules.append('cuda_init.py')

_lib_path = 'lib/python%(pyshortver)s/site-packages/espressomd'
Expand Down
128 changes: 128 additions & 0 deletions easyconfigs/ESPResSo-foss-2025a-software-commit.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
easyblock = 'EB_ESPResSo'

name = 'ESPResSo'
version = '%(software_commit)s'

homepage = 'https://espressomd.org/wordpress'
description = """A software package for Molecular Dynamics and Monte Carlo
simulations of bead-spring models, with electrostatics, magnetostatics,
hydrodynamics and reaction-diffusion-advection solvers."""

toolchain = {'name': 'foss', 'version': '2025a'}
toolchainopts = {'usempi': True, 'pic': True}

builddependencies = [
('CMake', '3.31.3'),
('Ninja', '1.12.1'),
('Cython', '3.1.1'),
]

dependencies = [
('Python', '3.13.1'),
('SciPy-bundle', '2025.06'),
('Boost.MPI', '1.88.0'),
('HeFFTe', '2.4.1'),
('Mesa', '25.1.3'),
('GSL', '2.8'),
('IPython', '9.3.0'),
('Pint', '0.24.4'),
('HDF5', '1.14.6'),
('h5py', '3.14.0'),
# ('VTK', '9.5.0'),
]

sources = [
{
'source_urls': ['https://github.com/espressomd/espresso/archive/'],
'filename': 'espresso-%(software_commit)s.tar.gz',
'download_filename': '%(software_commit)s.tar.gz',
},
{
'source_urls': ['https://i10git.cs.fau.de/api/v4/projects/walberla%2Fwalberla/repository/archive?sha=fc081850#'],
'filename': 'walberla-fc081850.tar.gz',
},
{
'source_urls': ['https://github.com/kokkos/kokkos/archive/'],
'filename': 'kokkos-18b830e3360dff9f44a9a9c729ca9e74c037e354.tar.gz',
'download_filename': '18b830e3360dff9f44a9a9c729ca9e74c037e354.tar.gz',
},
{
'source_urls': ['https://github.com/ECP-copa/Cabana/archive/'],
'filename': 'Cabana-e76c1a1.tar.gz',
'download_filename': 'e76c1a1.tar.gz',
},
]
if any(x[0] == 'HDF5' for x in dependencies):
sources += [
{
'source_urls': ['https://github.com/highfive-devs/highfive/archive/'],
'filename': 'highfive-3.2.0.tar.gz',
'download_filename': 'v3.2.0.tar.gz',
},
]
checksums = [{
'espresso-%(software_commit)s.tar.gz': 'b0f816ba9ec7422beb716b624af205c8ae780642a5b8c8e3d0fbe3214860590d',
'walberla-fc081850.tar.gz': '686c8f26e225971ae5beed6f25ada7536bfacb96db11f2ff9cce6f267fc7f8ea',
'kokkos-18b830e.tar.gz': 'dc0127134f47752f61e74c77237bd9ec560535c4283fef8c9643f947b3733063',
'Cabana-e76c1a1.tar.gz': '20dbd352fe1da744a312e556730287f52a205d1e767ac45557a3998b7fc80ca7',
'highfive-3.2.0.tar.gz': '01ea2eed7dbce1cf5dfff59476cfa113a7822b641aecbd99c674592fe7a4e630',
}]

# default CUDA compute capabilities to use (override via --cuda-compute-capabilities)
if any(x[0] == 'CUDA' for x in dependencies):
cuda_compute_capabilities = ['5.2', '6.0', '7.0', '7.5', '8.0', '8.6', '9.0']

configopts = f' -DESPRESSO_BUILD_TESTS=ON '
# make sure the right Python is used (note: -DPython3_EXECUTABLE or -DPython_EXECUTABLE does not work!)
configopts += ' -DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python '
configopts += ' -DCMAKE_INSTALL_LIBDIR:PATH=lib '
# workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/22678
# (this only affects testsuite executable files in the build folder)
_exe_linker_flags = ':'.join(f'%(builddir)s/easybuild_obj/_deps/{path}'
for path in ['kokkos-build/containers/src',
'kokkos-build/core/src',
'kokkos-build/simd/src',
'heffte-build'])
configopts += f' -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,{_exe_linker_flags}" '

# build_cmd_targets does not work with CMakeNinja, use buildopts instead
buildopts = 'espresso_packaging_dependencies'

test_cmd = 'ctest'
runtest = '-L "unit_test|python_test"'
testopts = '--output-on-failure --no-tests=error'

modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']}

_binaries = ['ipypresso', 'pypresso']
_libs = [
# ESPResSo
'espresso_core', 'espresso_shapes', 'espresso_walberla',
'espresso_script_interface', 'script_interface', 'utils', '_init',
]
_python_modules = [
'__init__.py', 'system.py', 'version.py', 'collision_detection.py', 'lb.py',
'accumulators.py', 'constraints.py', 'observables.py', 'particle_data.py',
]
if any(x[0] == 'HDF5' for x in dependencies):
_libs.append('espresso_hdf5')
_python_modules.append('io/writer/h5md.py')
if any(x[0] == 'CUDA' for x in dependencies):
libs.append('espresso_cuda')
_python_modules.append('cuda_init.py')

_lib_path = 'lib/python%(pyshortver)s/site-packages/espressomd'
sanity_check_paths = {
'files': [f'bin/{x}' for x in _binaries] +
[f'{_lib_path}/{x}.{SHLIB_EXT}' for x in _libs] +
[f'{_lib_path}/{x}' for x in _python_modules],
'dirs': ['bin', 'lib']
}

sanity_check_commands = [
'pypresso -h', 'ipypresso -h',
'pypresso -c "import espressomd.version;print(espressomd.version.friendly())"',
'python3 -c "import espressomd.version;print(espressomd.version.friendly())"',
]

moduleclass = 'chem'
5 changes: 4 additions & 1 deletion easyconfigs/e/ESPResSo/espresso.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ def configure_step(self):
if get_cpu_architecture() == X86_64 and 'avx2' in cpu_features:
configopts += ' -DESPRESSO_BUILD_WITH_WALBERLA_AVX=ON'

configopts += ' -DESPRESSO_BUILD_WITH_SHARED_MEMORY_PARALLELISM=OFF'
configopts += ' -DESPRESSO_BUILD_WITH_SHARED_MEMORY_PARALLELISM=ON'
configopts += ' -DESPRESSO_BUILD_WITH_FFTW=ON'
configopts += ' -DESPRESSO_BUILD_WITH_PYTHON=ON'
configopts += ' -DESPRESSO_BUILD_WITH_SCAFACOS=OFF'
configopts += ' -DESPRESSO_BUILD_WITH_STOKESIAN_DYNAMICS=OFF'

self.cfg['configopts'] = configopts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
easyconfigs:
- ESPResSo-foss-2023b-software-commit.eb:
options:
software-commit: dc87ede3f6c218bb71624460752bc8c26a271c33
software-commit: 11393dfe1aaade7240395f37a24fc1f743f868b9
include-easyblocks: easyconfigs/*/*/*.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
easyconfigs:
- ESPResSo-foss-2025a-software-commit.eb:
options:
software-commit: 11393dfe1aaade7240395f37a24fc1f743f868b9
include-easyblocks: easyconfigs/*/*/*.py