arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.06717astro-ph.IMastro-ph.SRphysics.comp-phphysics.space-ph
收藏

BATSRUS GPU:采用块自适应网格代码的超实时磁层模拟

BATSRUS GPU: Faster-than-Real-Time Magnetospheric Simulations with a Block-Adaptive Grid Code

Yifu An, Yuxi Chen, Hongyang Zhou, Alexander Gaenko, Gábor Tóth

AI总结:

本研究通过OpenACC API将磁流体力学代码BATSRUS移植到GPU,实现支持块自适应网格的多GPU消息传递算法,弱扩展测试表现良好,可达成超实时磁层模拟。

摘要:

BATSRUS是我们研发的先进扩展磁流体力学代码,也是空间天气建模框架(Space Weather Modeling Framework)中使用最广泛、资源消耗最高的模型之一。利用GPU加速等新兴技术提升其效率与速度一直是我们的目标。为适配现代超级计算机的GPU节点,我们通过OpenACC API将BATSRUS移植到GPU上。将代码移植到单GPU需要将原代码中最常用的功能重写并优化为新的求解器,这部分代码长度约占整个程序的1%。为实现多GPU移植,我们实现了一种新的消息传递算法,以支持其独特的块自适应网格特性。我们在多达256块GPU上开展了弱可扩展性测试,结果表现良好:在最多256块GPU上程序的并行效率为50%-60%,单节点(4块GPU)内的效率最高可达95%。由于硬件瓶颈,在多节点上运行大规模问题时效率会有所下降。我们还验证了在GPU上运行典型磁层模拟的能力:单块A100 GPU的性能约相当于270个AMD“Rome”CPU核心,运行速度比实时快3.6倍;在四块A100 GPU上,模拟运行速度可比实时快6.9倍。

英文摘要:

BATSRUS, our state-of-the-art extended magnetohydrodynamic code, is the most used and one of the most resource-consuming models in the Space Weather Modeling Framework. It has always been our objective to improve its efficiency and speed with emerging techniques, such as GPU acceleration. To utilize the GPU nodes on modern supercomputers, we port BATSRUS to GPUs with the OpenACC API. Porting the code to a single GPU requires rewriting and optimizing the most used functionalities of the original code into a new solver, which accounts for around 1% of the entire program in length. To port it to multiple GPUs, we implement a new message passing algorithm to support its unique block-adaptive grid feature. We conduct weak scaling tests on as many as 256 GPUs and find good performance. The program has 50-60% parallel efficiency on up to 256 GPUs, and up to 95% efficiency within a single node (4 GPUs). Running large problems on more than one node has reduced efficiency due to hardware bottlenecks. We also demonstrate our ability to run representative magnetospheric simulations on GPUs. The performance for a single A100 GPU is about the same as 270 AMD "Rome" CPU cores, and it runs 3.6 times faster than real time. The simulation can run 6.9 times faster than real time on four A100 GPUs.

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

↑