Massive stochastic simulation of cosmic rays propagation in the heliosphere: The COSMICA code

The accurate modeling of galactic cosmic ray (GCR) propagation in the heliosphere requires solving the Parker Transport Equation (PTE), a multidimensional nonlinear equation that cannot be addressed analytically without strong approximations. In recent decades, stochastic differential equation (SDE)–Monte Carlo methods have emerged as a powerful numerical strategy for this problem, thanks to their numerical stability, relatively low memory requirements, and intrinsic parallelism. The increasing availability of general-purpose Graphics Processing Units (GPUs) has further revolutionized this approach by enabling massive parallelization of particle trajectories at relatively low cost. In this work, we introduce COSMICA (COde for a Speedy Montecarlo Involving Cuda Architecture), a new open-source multi-GPU code written in CUDA/C++ for the three-dimensional solution of the PTE. COSMICA has been specifically designed to optimize GPU resource usage and scalability, with strategies including memory hierarchy exploitation, register-conscious kernel design, warp-aware scheduling, and parameter reordering for multi-GPU execution. Benchmark results demonstrate that COSMICA reduces runtimes from weeks to hours for large-scale simulations. These optimizations make COSMICA a versatile tool for systematic studies of cosmic-ray modulation and parameter exploration, thereby expanding the feasibility of investigations that were previously computationally prohibitive. The present article constitutes the first part of a two-paper series, focusing on code design and computational performance; a companion paper will present its validation against benchmark models. • COSMICA: new open, multi-GPU solver for the three-dimensional Parker Transport Equation. • Register-conscious design, warp-aware scheduling, and multi-GPU particle reordering. • Scalability validation across multiple GPU architectures, both enterprise- and consumer-grade. • COSMICA facilitates integration of alternative transport models, beyond cosmic-rays modulation.

Authors

Institutions

Publication Details

Journal
Astronomy and Computing
Published
2025-12-06
DOI
https://doi.org/10.1016/j.ascom.2025.101043
Citations
1
Primary Topic
Solar and Space Plasma Dynamics
Type
article
Field-Weighted Citation Impact
1.15
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Massive stochastic simulation of cosmic rays propagation in the heliosphere: The COSMICA code

Sabina Rossi, Giovanni Cavallotto, M. Gervasi, G. La Vacca et al.
1 citations
Astronomy and Computing
Solar and Space Plasma Dynamics
1.15
article

Massive stochastic simulation of cosmic rays propagation in the heliosphere: The COSMICA code

Sabina Rossi, Giovanni Cavallotto, M. Gervasi, G. La Vacca, Marco S. Nobile, S. Della Torre, Matteo Grazioso, Leone Bacciu
article en
1 citations

Abstract

The accurate modeling of galactic cosmic ray (GCR) propagation in the heliosphere requires solving the Parker Transport Equation (PTE), a multidimensional nonlinear equation that cannot be addressed analytically without strong approximations. In recent decades, stochastic differential equation (SDE)–Monte Carlo methods have emerged as a powerful numerical strategy for this problem, thanks to their numerical stability, relatively low memory requirements, and intrinsic parallelism. The increasing availability of general-purpose Graphics Processing Units (GPUs) has further revolutionized this approach by enabling massive parallelization of particle trajectories at relatively low cost. In this work, we introduce COSMICA (COde for a Speedy Montecarlo Involving Cuda Architecture), a new open-source multi-GPU code written in CUDA/C++ for the three-dimensional solution of the PTE. COSMICA has been specifically designed to optimize GPU resource usage and scalability, with strategies including memory hierarchy exploitation, register-conscious kernel design, warp-aware scheduling, and parameter reordering for multi-GPU execution. Benchmark results demonstrate that COSMICA reduces runtimes from weeks to hours for large-scale simulations. These optimizations make COSMICA a versatile tool for systematic studies of cosmic-ray modulation and parameter exploration, thereby expanding the feasibility of investigations that were previously computationally prohibitive. The present article constitutes the first part of a two-paper series, focusing on code design and computational performance; a companion paper will present its validation against benchmark models. • COSMICA: new open, multi-GPU solver for the three-dimensional Parker Transport Equation. • Register-conscious design, warp-aware scheduling, and multi-GPU particle reordering. • Scalability validation across multiple GPU architectures, both enterprise- and consumer-grade. • COSMICA facilitates integration of alternative transport models, beyond cosmic-rays modulation.

Astronomy and ComputingVol. 55
Ca' Foscari University of Venice (IT), Cineca (IT), Istituto Nazionale di Fisica Nucleare, Sezione di Milano Bicocca (IT), University of Milano-Bicocca (IT)
Openalex Percentile: Top 14%
Solar and Space Plasma Dynamics
1.15
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.