We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

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

Formal Metadata

Title
Shared-memory parallelism and performance portability in the ESPResSo package for particle- and lattice-based simulations
Title of Series
Number of Parts
31
Author
License
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
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, 2024. 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