Accelerating the Particle-In-Cell code ECsim with OpenACC
This work incrementally improves performance for plasma physics simulations, benefiting researchers in computational physics.
The researchers tackled the challenge of preparing the ECsim Particle-In-Cell code for exascale architectures by using OpenACC for acceleration, achieving a 5× speedup and a 3× reduction in energy consumption on the Leonardo system.
The Particle-In-Cell (PIC) method is a computational technique widely used in plasma physics to model plasmas at the kinetic level. In this work, we present our effort to prepare the semi-implicit energy-conserving PIC code ECsim for exascale architectures. To achieve this, we adopted a pragma-based acceleration strategy using OpenACC, which enables high performance while requiring minimal code restructuring. On the pre-exascale Leonardo system, the accelerated code achieves a $5 \times$ speedup and a $3 \times$ reduction in energy consumption compared to the CPU reference code. Performance comparisons across multiple NVIDIA GPU generations show substantial benefits from the GH200 unified memory architecture. Finally, strong and weak scaling tests on Leonardo demonstrate efficiency of $70 \%$ and $78 \%$ up to 64 and 1024 GPUs, respectively.