arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.02873astro-ph.IM
收藏

在GPU上加速宇宙学模拟:一种使用OpenMP的可移植方法

Accelerating cosmological simulations on GPUs: a portable approach using OpenMP

Università di Trieste(的里雅斯特大学);INAF-Osservatorio Astronomico di Trieste(意大利国家天体物理研究所的里雅斯特天文台);ICSC – Centro Nazionale di Ricerca in High Performance Computing, Big Data e Quantum Computing(高性能计算、大数据与量子计算国家研究中心);IFPU – Institute for Fundamental Physics of the Universe(宇宙基础物理研究所);INAF-Osservatorio astronomico di Brera(意大利国家天体物理研究所布雷拉天文台)

M. D. Lepinzan, G. Lacopo, D. Goz, G. Taffoni, P. Monaco, P. J. Elahi, U. Varetto, M. Cytowski

AI总结:

本研究采用OpenMP指令将宇宙学代码Pinocchio的坍缩时间计算模块移植到GPU,实现4-8倍加速,累计节省大量计算时间,为异构硬件上的大规模宇宙学模拟提供可移植加速方案。

摘要:

本研究将基于拉格朗日微扰理论(LPT)框架的宇宙学代码{\tt Pinocchio}(一种广泛用于生成暗物质晕目录的工具)的关键模块移植到图形处理器(GPU,使用OpenMP目标指令)并进行优化。优化聚焦于代码中负责计算模拟中每个粒子坍缩时间的特定部分,由于该计算具有高度并行性,是GPU卸载的理想候选。移植过程中,开发了三次样条和双线性插值例程的完全GPU原生实现,这两种例程是计算坍缩时间所必需的;由于GNU科学库(GSL)不支持GPU卸载,这些自定义实现完全在GPU上运行,与基于CPU的GSL实现相比,残差仅约0.003%。在基于NVIDIA的LEONARDO和基于AMD的SETONIX超级计算机上的对比基准测试显示出显著的可移植性和性能,加速比分别为4倍和最高8倍。尽管坍缩时间计算不是整体工作流的主要瓶颈,但该加速使完整生产运行每次减少约100秒,在数千次模拟中累计节省约160000标准小时(约28小时墙钟时间)。屋顶线分析证实,该GPU移植实现了超过80%的理论双精度浮点(FP64)峰值性能,确认了计算密集型执行的高效性。本研究表明,OpenMP指令为在异构硬件上加速大规模宇宙学模拟提供了一种可移植、有效的策略。

英文摘要:

In this work we present the porting to Graphics Processing Units (GPUs, using OpenMP target directives) and optimization of a key module within the cosmological {\pinocchio} code, a Lagrangian Perturbation Theory (LPT)-based framework widely used for generating dark matter (DM) halo catalogs. Our optimization focuses on a specific segment of the code responsible for calculating the collapse time of each particle involved in the simulation. Due to the embarrassingly parallel nature of this computation, it represents an ideal candidate for GPU offloading. As part of the porting process, we developed fully GPU-native implementations of both cubic spline and bilinear interpolation routines, required for evaluating collapse times. Since GNU Scientific Library (GSL) does not support GPU offloading, these custom implementations run entirely on the GPU and achieve residuals of only $\sim0.003\%$ when compared to the CPU-based implementation of GSL. Comparative benchmarking on the LEONARDO (NVIDIA-based) and SETONIX (AMD-based) supercomputers reveals notable portability and performance, with speedups of~\textit{4x} and up to~\textit{8x}, respectively. While collapse time calculation is not a primary bottleneck in the overall workflow, the acceleration reduces full production runs by $\sim 100$ seconds each leading to a cumulative saving of $\sim 160000$ Standard-h ($\sim28$ hours wall time) across thousands of simulations. Roofline analysis confirms that our GPU porting achieves over 80\% of the theoretical FP64 peak performance, confirming efficient compute-bound execution. This work demonstrates that OpenMP directives offer a portable, effective strategy for accelerating large-scale cosmological simulations on heterogeneous hardware.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑