Shared-memory parallelism and performance portability in the ESPResSo package for particle- and lattice-based simulations

ESPResSo is an open-source simulation package for soft condensed matter that combines particle-based molecular dynamics and Monte Carlo methods with continuum hydrodynamics to study systems at the intersection of physics, chemistry and process engineering. Examples include colloids, polymers and polyelectrolytes, gels, ferrofluids, and biofilms[1]. Modelling these systems demands efficient, flexible, and extensible software. A defining feature of ESPResSo is its hybrid architecture: a Python front end for model construction and analysis and a C++ core for high-performance kernels. Historically the core has relied on distributed-memory MPI parallelism and selective GPU offloading, but modern HPC nodes with many CPU cores expose limitations of an MPI-only approach – in particular excessive halo communication between processes on the same node and contention when multiple processes share a single GPU. Limiting GPUs to one process per device reduces contention but wastes CPU resources. We address these issues by introducing node-level shared-memory parallelism using the performance-portable Kokkos library[2]. Kokkos lets the same computational kernels target CPU backends (OpenMP, threads) and GPU backends (CUDA) from a single code base. By restructuring short-range non-bonded force calculations and electrostatics solvers to use Kokkos, we enable hybrid execution where processes on the same node share in-memory data structures and intra-node work, thereby reducing halo communication and redundant copies of local data. This approach improves CPU utilization, eliminates much of the node-local MPI traffic, and simplifies GPU offloading by consolidating data movement and execution choices. This, however, comes with the price of requiring changes in the data layout and management of race conditions. We describe our strategy and experience incrementally introducing shared memory parallelism on the node level, while preserving existing MPI-based scaling across nodes. We highlight practical design choices for memory layout, work partitioning, and synchronization for short-range force calculation and an FFT-based electrostatics solver. Initial benchmarks show improved within-node scaling for low core numbers, reduced communication overhead, and removal of GPU contention. Moreover, Kokkos' ability to run largely unchanged code on the CPU and GPU considerably lowers the effort needed to port additional parts of ESPResSo to the GPU, in the future. This will become highly relevant, as the majority of compute in new HPC systems is provided by GPU accelerators. References: [1]: Weeber et al. ESPResSo, a versatile open-source software package for simulating soft matter systems. In Yáñez and Boyd (Eds.), Comprehensive Computational Chemistry, pp. 578–601. Elsevier. doi:10.1016/B978-0-12-821978-2.00103-3[2]: Trott et al. Kokkos 3: Programming model extensions for the exascale era, IEEE Transactions on Parallel and Distributed Systems, 33(4):805–817, 2022, doi:10.1109/TPDS.2021.3097283

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-03-02
DOI
https://doi.org/10.5281/zenodo.18836984
Primary Topic
Block Copolymer Self-Assembly
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Shared-memory parallelism and performance portability in the ESPResSo package for particle- and lattice-based simulations

Rudolf Weeber, Jean‐Noël Grad, Christian Holm, Hideki Kobayashi et al.
Zenodo (CERN European Organization for Nuclear Research)
Block Copolymer Self-Assembly
article

Shared-memory parallelism and performance portability in the ESPResSo package for particle- and lattice-based simulations

Rudolf Weeber, Jean‐Noël Grad, Christian Holm, Hideki Kobayashi, Paul Hohenberger
article en

Abstract

ESPResSo is an open-source simulation package for soft condensed matter that combines particle-based molecular dynamics and Monte Carlo methods with continuum hydrodynamics to study systems at the intersection of physics, chemistry and process engineering. Examples include colloids, polymers and polyelectrolytes, gels, ferrofluids, and biofilms[1]. Modelling these systems demands efficient, flexible, and extensible software. A defining feature of ESPResSo is its hybrid architecture: a Python front end for model construction and analysis and a C++ core for high-performance kernels. Historically the core has relied on distributed-memory MPI parallelism and selective GPU offloading, but modern HPC nodes with many CPU cores expose limitations of an MPI-only approach – in particular excessive halo communication between processes on the same node and contention when multiple processes share a single GPU. Limiting GPUs to one process per device reduces contention but wastes CPU resources. We address these issues by introducing node-level shared-memory parallelism using the performance-portable Kokkos library[2]. Kokkos lets the same computational kernels target CPU backends (OpenMP, threads) and GPU backends (CUDA) from a single code base. By restructuring short-range non-bonded force calculations and electrostatics solvers to use Kokkos, we enable hybrid execution where processes on the same node share in-memory data structures and intra-node work, thereby reducing halo communication and redundant copies of local data. This approach improves CPU utilization, eliminates much of the node-local MPI traffic, and simplifies GPU offloading by consolidating data movement and execution choices. This, however, comes with the price of requiring changes in the data layout and management of race conditions. We describe our strategy and experience incrementally introducing shared memory parallelism on the node level, while preserving existing MPI-based scaling across nodes. We highlight practical design choices for memory layout, work partitioning, and synchronization for short-range force calculation and an FFT-based electrostatics solver. Initial benchmarks show improved within-node scaling for low core numbers, reduced communication overhead, and removal of GPU contention. Moreover, Kokkos' ability to run largely unchanged code on the CPU and GPU considerably lowers the effort needed to port additional parts of ESPResSo to the GPU, in the future. This will become highly relevant, as the majority of compute in new HPC systems is provided by GPU accelerators. References: [1]: Weeber et al. ESPResSo, a versatile open-source software package for simulating soft matter systems. In Yáñez and Boyd (Eds.), Comprehensive Computational Chemistry, pp. 578–601. Elsevier. doi:10.1016/B978-0-12-821978-2.00103-3[2]: Trott et al. Kokkos 3: Programming model extensions for the exascale era, IEEE Transactions on Parallel and Distributed Systems, 33(4):805–817, 2022, doi:10.1109/TPDS.2021.3097283

Zenodo (CERN European Organization for Nuclear Research)
University of Stuttgart (DE)
Industry, innovation and infrastructure
Openalex Percentile: Top 38%
Block Copolymer Self-Assembly
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.