[Paper Review] The PLUTO Code on GPUs: Offloading Lagrangian Particle Methods
The paper redesigns PLUTO's Lagrangian Particle (LP) module for GPU offloading using OpenACC, benchmarks it on large GPUs/CPUs, and demonstrates strong/weak scaling and substantial speedups.
The Lagrangian Particles (LP) module of the PLUTO code offers a powerful simulation tool to predict the non-thermal emission produced by shock accelerated particles in large-scale relativistic magnetized astrophysics flows. The LPs represent ensembles of relativistic particles with a given energy distribution which is updated by solving the relativistic cosmic ray transport equation. The approach consistently includes the effects of adiabatic expansion, synchrotron and inverse Compton emission. The large scale nature of such systems creates boundless computational demand which can only be satisfied by targeting modern computing hardware such as Graphic Processing Units (GPUs). In this work we presents the GPU-compatible C++ re-design of the LP module, that, by means of the programming model OpenACC and the Message Passing Interface library, is capable of targeting both single commercial GPUs as well as multi-node (pre-)exascale computing facilities. The code has been benchmarked up to 28672 parallel CPUs cores and 1024 parallel GPUs demonstrating $\sim(80-90)\%$ weak scaling parallel efficiency and good strong scaling capabilities. Our results demonstrated a speedup of $6$ times when solving that same benchmark test with 128 full GPU nodes (4GPUs per node) against the same amount of full high-end CPU nodes (112 cores per node). Furthermore, we conducted a code verification by comparing its prediction to corresponding analytical solutions for two test cases. We note that this work is part of broader project that aims at developing gPLUTO, the novel and revised GPU-ready implementation of its legacy.
Motivation & Objective
- Motivate the need for hybrid fluid-kinetic modeling of non-thermal particles in astrophysical flows.
- Present a GPU-ready redesign of the LP module to leverage OpenACC and MPI for large-scale HPC systems.
- Demonstrate correctness and performance through numerical benchmarks and scalability tests across CPU and GPU architectures.
- Showcase scalability (weak/strong) and speedups on pre-exascale platforms to validate gPLUTO.
Proposed method
- Recast the LP transport equation for non-thermal particle evolution under adiabatic, synchrotron, and inverse Compton losses.
- Discretize the energy spectrum into Nb bins and solve spectral updates at shocks.
- Implement GPU offloading via OpenACC to accelerate LP updates and MPI for inter-node communication.
- Adopt a structure-of-arrays memory layout to enable coalesced GPU memory accesses and efficient compaction.
- Use a chunked memory allocation strategy to handle dynamic particle populations with linear-time compaction.
Experimental results
Research questions
- RQ1Can the LP module be efficiently ported to GPUs without sacrificing numerical accuracy?
- RQ2What are the performance and scaling characteristics of gPLUTO on large CPU and GPU HPC resources?
- RQ3How does the LP spectral update behave across MHD shocks and under radiative losses?
- RQ4What level of speedup and parallel efficiency is achievable for realistic 3D, multi-node runs?
Key findings
- GPU-enabled LP module achieves ∼80–90% weak scaling parallel efficiency up to tens of thousands of cores or GPUs.
- On 128 GPU nodes (4 GPUs per node) the GPU-only run is about 6x faster than an equivalent CPU configuration.
- Strong scaling remains close to ideal up to 128 CPU nodes in advection tests, with some degradation in shock tests due to spectral updates.
- Weak scaling demonstrates high efficiency across increasing node counts and grid resolutions.
- The spectral update and MPI-based particle exchange are identified as dominant contributors to runtime in the tested configurations.
- gPLUTO shows consistent agreement with analytical solutions in test cases, validating numerical correctness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.