arXiv Science⌕ Search

arXiv · 2611.12209

Heterogeneous Acceleration of TRIMEG++ code using OpenMP for Gyrokinetic Simulations

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Nicola Noventa, Giorgio Daneri, Zhixin Lu, Matthias Hoelzl. 2026-11-09. Heterogeneous Acceleration of TRIMEG++ code using OpenMP for Gyrokinetic Simulations. https://arxiv.science/abs/2611.12209

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Terahertz Generation through Photon Deceleration of Long-Wavelength Infrared Laser Pulses in Plasma

Efficient terahertz (THz) generation with high field amplitude and pulse energy is studied through the interaction of a single-color long-wavelength infrared (LWIR) laser pulse with gaseous targets. Particle-In-Cell (PIC) simulations are performed to investigate the underlying mechanism and analyze the properties of the emitted THz radiation. The results reveal that THz pulses at frequencies below 10 THz are generated via photon deceleration of the LWIR laser, driven by enhanced electron density accumulation at the pulse front in the self-modulated wakefield regime. The influence of key parameters, including target density, laser intensity, and propagation length, on nonlinear laser modulation and the resulting THz generation efficiency is analyzed. Important scalings governing the laser-to-THz energy conversion efficiency are identified from PIC simulations and validated through theoretical analysis. The study demonstrates a laser-to-THz energy conversion efficiency of approximately $4\%$, significantly exceeding previously reported values. For the laser parameters considered in this study, the energy of the emitted THz pulses is approximately 50 mJ. The findings of this study provide valuable insights for the development of next-generation high-energy THz sources.

physics.plasm-ph↗

One dimensional high-order moment models with realistic collisions for nonequilibrium ion transport in weakly ionized plasmas

Ion-neutral collisions are fundamental in the transport of partially ionized plasmas. When collisional scales are comparable to the system scales or the electric field is strong, nonequilibrium conditions for the ions arise that are beyond classical transport models due to large drifts, strong heat flux, and temperature anisotropy. In this paper, we propose the resolution of non-linear high-order moment closures for simulating nonequilibrium ion dynamics in one-dimensional weakly ionized plasmas. We compare a four-moment anisotropic Maxwellian model (mass, axial momentum, and axial and perpendicular energies), a five-moment hyperbolic quadrature-based model (first five axial moments), and a novel six-moment hyperbolic quadrature-based model (first five axial moments + perpendicular energy). We derive analytical collision source terms from the Boltzmann operator for ion-neutral scattering with arbitrary differential cross sections. This formulation generalizes the Chapman-Cowling theory for arbitrary drift velocities, temperature anisotropies, and heat flux, ensuring strictly realizable distributions. The models are validated via non-linear simulations benchmarked against kinetic solutions for argon plasmas with realistic cross sections (0.05-500 mTorr). We test a bounded plasma between floating walls and a direct-current discharge. The six-moment model robustly captures ion dynamics, particularly under strong nonequilibrium, where anisotropy and heat flux are non-local. It reconstructs the distribution function with high fidelity, without noise, and at a cost comparable to fluid models in a self-consistent manner.

physics.plasm-ph↗

The role of different nonlinearities and potential vorticity conservation in two-dimensional fluid ITG models

The nature of turbulent energy cascade of simple two-dimensional fluid models of ion temperature gradient driven turbulence is studied in detail. Notably, it is observed that a minimal two-field model of toroidal ITG behaves qualitatively differently with or without the diamagnetic nonlinearity. In its absence, the zonal flows always dominate and the system never reaches a high-transport state. In contrast, when this term is included, zonal flows dominate only near marginality, while away from it, an inverse cascade with high levels of transport is observed, requiring large-scale dissipation (hypoviscosity) to saturate and hyperviscosity to regularize small scale instability associated with this nonlinear term. However introducing such a term, together with the existence of the curvature term, breaks potential vorticity conservation, which is one of the key symmetries of drift-wave turbulence. This can be remedied by considering a more complete model that retains higher-order terms in the pressure equation. This form of the model, with four nonlinearities, conserves potential vorticity and behaves similarly to the original model, requiring hyperviscosity to saturate since the added nonlinearity generates small scale instability also for the pressure equation. To characterize the roles of potential vorticity conservation and higher-order terms in the pressure equation, the behavior of both the standard ITG system, and the potential vorticity conserving system, is studied by analyzing their spectra, turbulent cascades, and sensitivity to viscosity. Finally, the direction of turbulent cascade due to the different nonlinearities is investigated by examining their contributions to the spectral energy transfer and by considering the triadic instability assumption for each of these nonlinearities separately.

physics.plasm-ph↗