ORB5X v1.0:一个使用智能AI构建的性能可移植的全局电磁陀螺动力学PIC C++/Kokkos代码
ORB5X: a performance-portable global electromagnetic gyrokinetic PIC code in C++/Kokkos built using Agentic AI
浏览论文内容
中文总结 AI 辅助
本文介绍ORB5X,它是ORB5的C++/Kokkos版本,保留了原Fortran代码的数学模型与算法,通过替换模块和数组提升性能可移植性,经测试与原代码精度相近,且能在多种设备上编译运行。
中文摘要 AI 辅助
ORB5X是ORB5的C++17/Kokkos人工智能辅助翻译版本,ORB5是用于环形约束等离子体的全局电磁陀螺动力学粒子模拟代码。该翻译保留了Fortran实现的数学模型和主要数值算法,如拉格朗日陀螺动力学公式、分布函数的标记粒子表示、场的有限元B样条表示、角向傅里叶滤波、MPI域分解和克隆以及HDF5诊断输出。主要软件更改是用类型化的C++类、结构体、命名空间以及Kokkos视图和内核替换Fortran模块和可分配数组,以实现跨多核CPU和GPU后端的性能可移植性。本文总结了物理模型、数值方案、分布式和共享内存并行设计、人工智能辅助代码翻译工作流程以及用于将ORB5X与原始Fortran参考代码库进行比较的验证路径。对ITG、ITPA和啁啾的初始测试表明,ORB5X和ORB5在静电和电磁场分量上的一致性几乎达到机器精度。此外,我们证明,使用现代CMake和Kokkos,ORB5X可以轻松地在个人Linux和Mac笔记本电脑以及LUMI、ALPS、CINECA和Discoverer等高性能计算集群上编译和运行。
英文摘要
ORB5X is a C++17/Kokkos AI-assisted translation of ORB5, a global electromagnetic gyrokinetic particle-in-cell code for toroidal confined plasmas. The translation preserves the mathematical model and the main numerical algorithms of the Fortran implementation, i.e. a Lagrangian gyrokinetic formulation, marker-particle representation of the distribution functions, finite-element B-spline representation of the fields, Fourier filtering in the angular directions, MPI domain decomposition and cloning, and HDF5 diagnostic output. The main software change is the replacement of Fortran modules and allocatable arrays by typed C++ classes, structs, namespaces, and Kokkos Views and kernels for performance portability across multicore CPU and GPU backends. This paper summarizes the physical models, the numerical scheme, the distributed and shared-memory parallel design, the AI-assisted code translation workflow, and the validation path used to compare ORB5X against the original Fortran reference codebase. The initial tests for ITG, ITPA, and chirping show an agreement of almost machine accuracy between ORB5X and ORB5 for the electrostatic and electromagnetic field components. Furthermore, we demonstrate that with the modern CMake and Kokkos, ORB5X can be easily compiled and efficiently run on personal Linux and Mac laptops, as well as on high-performance computing clusters such as LUMI-G, Daint-ALPS, CINECA, and Discoverer.
发表机构
- Paul Scherrer Institute(保罗谢尔研究所)
- Department of Mechanical Engineering, MIT(麻省理工学院机械工程系)
- École Polytechnique Fédérale de Lausanne (EPFL)(洛桑联邦理工学院)
- Max-Planck-Institut für Plasmaphysik(马克斯·普朗克等离子体物理研究所)
机构由 AI 辅助整理,请以论文原文为准。