SearcharxivSearch

arXiv subjects

Stefano Truzzi

Publications and source records attributed to Stefano Truzzi.

7 recordsLinked to original sources

On the Limits of Performance Portability in Directive-Based GPU Programming

The transition of scientific applications to GPU-accelerated exascale systems is constrained by trade-offs between performance, portability, and productivity. This work evaluates the performance portability of directive-based GPU programming by porting gPLUTO, a production-grade magnetohydrodynamics code for astrophysical simulations, from OpenACC to OpenMP, and analyzing its performance on NVIDIA A100 (Leonardo Booster) and AMD MI250X (LUMI-G) devices. On NVIDIA platforms, OpenACC and OpenMP achieve comparable performance due to a shared compiler backend, providing a consistent baseline for assessing algorithmic efficiency. In contrast, the same OpenMP implementation is approximately three times slower at the application level on AMD MI250X with respect to the NVIDIA A100 OpenACC baseline, with kernel-level slowdowns reaching up to an order of magnitude, driven by sensitivity to strided memory-access patterns and compiler limitations. Kernel-level profiling shows that the dominant contributors to run-time are memory-latency-bound rather than limited by peak band-width. In low-parallelism kernels, C++ abstraction layers increase register pressure and spilling, leading to extreme slowdowns of up to 47x in specific cases. These results indicate that portable performance across GPU architectures requires not only application-level changes but also continued advances in compiler backends and architecture-aware optimization strategies

cs.DC

The PLUTO Code on GPUs: Offloading Lagrangian Particle Methods

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.

astro-ph.HE

Performance assessment of the gPLUTO code for the numerical modeling of radio galaxy evolution

High-resolution tri-axial simulations are indispensable for realistically co-modeling the dynamical signatures and the radiative fingerprints of astrophysical jets, which are becoming increasingly important in modern computational studies of jet physics. However, such simulations impose extreme computational requirements that often exceed the capabilities of conventional CPU-based codes. GPU-accelerated simulations offer a transformative solution to mitigate these limitations. In this work, we present a detailed performance benchmarking of the recently developed GPU-enabled PLUTO code (gPLUTO), demonstrating runtime speed-ups ranging from an order of magnitude to (approximately) over 30 relative to CPU-only configurations. A direct comparison between computations of extragalactic jet propagation performed at different grid resolutions confirm the physical fidelity and production readiness of the gPLUTO code, while underscoring the importance of resolving the jet radius adequately to capture the jet dynamics accurately. Leveraging GPU-PLUTO's capabilities, we finally present an application by performing high-resolution simulations of giant radio galaxy jets (GRGs $\gtrsim 1$ Mpc), representing the first such well-resolved 3D study to our knowledge (resolving scales down to 500 pc). These simulations probe a range of environmental effects on GRG jets, clarifying their formation from central galaxies within host cosmic structures, rapid peripheral expansion, and the development of asymmetric cocoon morphologies.

astro-ph.GA

EuroHPC SPACE CoE: Redesigning Scalable Parallel Astrophysical Codes for Exascale

High Performance Computing (HPC) based simulations are crucial in Astrophysics and Cosmology (A&C), helping scientists investigate and understand complex astrophysical phenomena. Taking advantage of exascale computing capabilities is essential for these efforts. However, the unprecedented architectural complexity of exascale systems impacts legacy codes. The SPACE Centre of Excellence (CoE) aims to re-engineer key astrophysical codes to tackle new computational challenges by adopting innovative programming paradigms and software (SW) solutions. SPACE brings together scientists, code developers, HPC experts, hardware (HW) manufacturers, and SW developers. This collaboration enhances exascale A&C applications, promoting the use of exascale and post-exascale computing capabilities. Additionally, SPACE addresses high-performance data analysis for the massive data outputs from exascale simulations and modern observations, using machine learning (ML) and visualisation tools. The project facilitates application deployment across platforms by focusing on code repositories and data sharing, integrating European astrophysical communities around exascale computing with standardised SW and data protocols.

astro-ph.IM

2D or not 2D? Exploring 3D relativistic magnetic reconnection dynamics with highly accurate numerical simulations

Fast reconnection in magnetically dominated plasmas is widely invoked in models of dissipation in pulsar winds, gamma-ray flares in the Crab nebula, and to explain the radio nanoshots of pulsars. When current sheets evolve reaching a critical inverse aspect ratio, scaling as $S^{-1/3}$ with the plasma Lundquist number, the so-called \textit{ideal} tearing instability sets in, with modes growing, independently of $S$, extremely rapidly on timescales of only a few light-crossing times of the sheet length. We present the first set of fully 3D simulations of current-sheet disruption triggered by the ideal tearing instability within the resistive relativistic MHD approximation, as appropriate in situations where the Alfv\'en velocity approaches the speed of light. We compare 3D setups with different initial conditions with their 2D counterparts, and we assess the impact of dimensionality and of the magnetic field topology on the onset, evolution, and efficiency of reconnection. In force-free configurations, 3D runs develop ideal tearing, secondary instabilities, and a thick, turbulent current layer, sustaining dissipation of magnetic energy longer than in 2D. In pressure-balanced current sheets with a null guide field, 2D reference runs show the familiar reconnection dynamics, whereas in 3D tearing dynamics is quenched after the linear phase, as pressure-driven modes growing on forming plasmoids outcompete plasmoid coalescence and suppress fast dissipation of magnetic energy. Taken together, these results suggest that the evolution and efficiency of reconnection depend sensitively on the local plasma conditions and current-sheet configuration, and can be properly captured only in fully 3D simulations.

astro-ph.HE

The PLUTO Code on GPUs: A First Look at Eulerian MHD Methods

We present preliminary performance results of gPLUTO, the new GPU-optimized implementation of the PLUTO code for computational plasma astrophysics. Like its predecessor, gPLUTO employs a finite-volume formulation to numerically solve the equations of magnetohydrodynamics (MHD) in multiple spatial dimensions. Still, this new implementation is a complete rewrite in C++ and leverages the OpenACC programming model to achieve acceleration on NVIDIA GPUs. While a more comprehensive description of the code and its several other modules will be presented in a future paper, here we focus on some preparatory results that demonstrate the code potential and performance on pre exa-scale parallel architectures.

physics.plasm-ph

Towards Exascale Computing for Astrophysical Simulation Leveraging the Leonardo EuroHPC System

Developing and redesigning astrophysical, cosmological, and space plasma numerical codes for existing and next-generation accelerators is critical for enabling large-scale simulations. To address these challenges, the SPACE Center of Excellence (SPACE-CoE) fosters collaboration between scientists, code developers, and high-performance computing experts to optimize applications for the exascale era. This paper presents our strategy and initial results on the Leonardo system at CINECA for three flagship codes, namely gPLUTO, OpenGadget3 and iPIC3D, using profiling tools to analyze performance on single and multiple nodes. Preliminary tests show all three codes scale efficiently, reaching 80% scalability up to 1,024 GPUs.

cs.DC