Heterogeneous Acceleration of TRIMEG++ code using OpenMP for Gyrokinetic Simulations
Nicola Noventa, Giorgio Daneri, Zhixin Lu, Matthias Hoelzl
Key points
From the paper's conclusion- These results show that directive-based offloading can accelerate a complex gyrokinetic code across GPU vendors, making whole-volume tokamak simulations with hundreds of millions of markers practical on a single GPU node.
Abstract
Turbulent transport largely determines the performance of magnetic-confinement fusion devices such as tokamaks, and gyrokinetic particle-in-cell (PIC) simulations are a principal tool to predict it. Advancing up to hundreds of millions of markers and solving large sparse field systems at every time step makes whole-device simulations among the most expensive in plasma physics. GPUs can accelerate this workload, but porting a complex code requires restructuring its parallelism and memory traffic, ideally without a separate version per vendor. In this work, the gyrokinetic code TRIMEG-C1, whose unstructured triangular mesh and high-order finite elements cover both the confined core and the open-field-line edge of the plasma, is rewritten in C++ as TRIMEG++ and fully offloaded to GPUs with OpenMP target directives, so that one portable code base runs on both AMD and NVIDIA hardware. The particle-to-grid projection is offloaded in its standard and field-aligned formulations, the PETSc-based field solver runs on the GPU through the library's backends, and, together with the previously offloaded particle pusher, every stage whose cost scales with the marker count runs on the GPU. All speedups are node-to-node comparisons against a 256-core CPU node (2x AMD EPYC 9754). On the TCV-X21 tokamak reference case, the offloaded kernels reproduce the CPU results to a relative accuracy of 1e-11, and the full simulation runs 4.1-6.1x faster on a node with two AMD MI300A and 2.1-3.0x faster on a node with four NVIDIA A100, with the speedup growing with problem size. The MI300A, with shared CPU-GPU memory, needs no explicit data transfers, whereas the A100 needs them managed by hand. These results show that directive-based offloading can accelerate a complex gyrokinetic code across GPU vendors, making whole-volume tokamak simulations with hundreds of millions of markers practical on a single GPU node.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Performance-portable GPU acceleration of the hybrid particle-in-cell code dHybridRarXiv · 2026
- GUERNICA: A continuum kinetic code for neutral dynamics in fusion plasmasarXiv · 2026
- Parallel Design of a GPU-Resident Semi-Lagrangian Drift-Kinetic Solver on Unstructured Extruded Tokamak MeshesarXiv · 2026
- Vidyut3d: A GPU accelerated fluid solver for non-equilibrium plasmas on adaptive gridsComputer Physics Communications · 2026
- Implicit-Explicit Methods for the GX Gyrokinetics CodearXiv · 2026
- The PLUTO code on GPUs: A first look at Eulerian MHD methodsAstronomy and Computing · 2026