相对论磁流体动力学 ECHO 代码的 GPU 加速现代 Fortran 版本

IF 1.8 Q3 MECHANICS Fluids Pub Date : 2024-01-05 DOI:10.3390/fluids9010016
Luca Del Zanna, Simone Landi, Lorenzo Serafini, Matteo Bugli, E. Papini
{"title":"相对论磁流体动力学 ECHO 代码的 GPU 加速现代 Fortran 版本","authors":"Luca Del Zanna, Simone Landi, Lorenzo Serafini, Matteo Bugli, E. Papini","doi":"10.3390/fluids9010016","DOIUrl":null,"url":null,"abstract":"The numerical study of relativistic magnetohydrodynamics (MHD) plays a crucial role in high-energy astrophysics but unfortunately is computationally demanding, given the complex physics involved (high Lorentz factor flows, extreme magnetization, and curved spacetimes near compact objects) and the large variety of spatial scales needed to resolve turbulent motions. A great benefit comes from the porting of existing codes running on standard processors to GPU-based platforms. However, this usually requires a drastic rewriting of the original code, the use of specific languages like CUDA, and a complex analysis of data management and optimization of parallel processes. Here, we describe the porting of the ECHO code for special and general relativistic MHD to accelerated devices, simply based on native Fortran language built-in constructs, especially do concurrent loops, few OpenACC directives, and straightforward data management provided by the Unified Memory option of NVIDIA compilers. Thanks to these very minor modifications to the original code, the new version of ECHO runs at least 16 times faster on GPU platforms as compared to CPU-based ones. The chosen benchmark is the 3D propagation of a relativistic MHD Alfvén wave, for which strong and weak scaling tests performed on the LEONARDO pre-exascale supercomputer at CINECA are provided (using up to 256 nodes corresponding to 1024 GPUs, and over 14 billion cells). Finally, an example of high-resolution relativistic MHD Alfvénic turbulence simulation is shown, demonstrating the potential for astrophysical plasmas of the new GPU-based version of ECHO.","PeriodicalId":12397,"journal":{"name":"Fluids","volume":"86 5","pages":""},"PeriodicalIF":1.8000,"publicationDate":"2024-01-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A GPU-Accelerated Modern Fortran Version of the ECHO Code for Relativistic Magnetohydrodynamics\",\"authors\":\"Luca Del Zanna, Simone Landi, Lorenzo Serafini, Matteo Bugli, E. Papini\",\"doi\":\"10.3390/fluids9010016\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The numerical study of relativistic magnetohydrodynamics (MHD) plays a crucial role in high-energy astrophysics but unfortunately is computationally demanding, given the complex physics involved (high Lorentz factor flows, extreme magnetization, and curved spacetimes near compact objects) and the large variety of spatial scales needed to resolve turbulent motions. A great benefit comes from the porting of existing codes running on standard processors to GPU-based platforms. However, this usually requires a drastic rewriting of the original code, the use of specific languages like CUDA, and a complex analysis of data management and optimization of parallel processes. Here, we describe the porting of the ECHO code for special and general relativistic MHD to accelerated devices, simply based on native Fortran language built-in constructs, especially do concurrent loops, few OpenACC directives, and straightforward data management provided by the Unified Memory option of NVIDIA compilers. Thanks to these very minor modifications to the original code, the new version of ECHO runs at least 16 times faster on GPU platforms as compared to CPU-based ones. The chosen benchmark is the 3D propagation of a relativistic MHD Alfvén wave, for which strong and weak scaling tests performed on the LEONARDO pre-exascale supercomputer at CINECA are provided (using up to 256 nodes corresponding to 1024 GPUs, and over 14 billion cells). Finally, an example of high-resolution relativistic MHD Alfvénic turbulence simulation is shown, demonstrating the potential for astrophysical plasmas of the new GPU-based version of ECHO.\",\"PeriodicalId\":12397,\"journal\":{\"name\":\"Fluids\",\"volume\":\"86 5\",\"pages\":\"\"},\"PeriodicalIF\":1.8000,\"publicationDate\":\"2024-01-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Fluids\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.3390/fluids9010016\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"MECHANICS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Fluids","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3390/fluids9010016","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"MECHANICS","Score":null,"Total":0}
引用次数: 0

摘要

相对论磁流体力学(MHD)的数值研究在高能天体物理学中起着至关重要的作用,但遗憾的是,由于涉及复杂的物理学(高洛伦兹因子流、极端磁化和紧凑天体附近的弯曲时空)以及解析湍流运动所需的大量空间尺度,其计算要求非常高。将在标准处理器上运行的现有代码移植到基于 GPU 的平台上会带来巨大的好处。然而,这通常需要对原始代码进行大幅重写,使用 CUDA 等特定语言,并对数据管理和并行处理优化进行复杂的分析。在此,我们将介绍如何将用于特殊和一般相对论性 MHD 的 ECHO 代码移植到加速设备上,只需基于本地 Fortran 语言的内置构造,特别是并发循环、少量 OpenACC 指令以及英伟达编译器统一内存选项提供的直接数据管理。由于对原始代码进行了这些微小的修改,新版ECHO在GPU平台上的运行速度比CPU平台至少快16倍。所选的基准是相对论MHD阿尔芬波的三维传播,为此提供了在CINECA的LEONARDO超大规模前超级计算机上进行的强弱扩展测试(使用多达256个节点,对应1024个GPU,超过140亿个单元)。最后,展示了一个高分辨率相对论 MHD Alfvénic 湍流模拟的例子,证明了基于 GPU 的新版 ECHO 在天体物理等离子体方面的潜力。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
A GPU-Accelerated Modern Fortran Version of the ECHO Code for Relativistic Magnetohydrodynamics
The numerical study of relativistic magnetohydrodynamics (MHD) plays a crucial role in high-energy astrophysics but unfortunately is computationally demanding, given the complex physics involved (high Lorentz factor flows, extreme magnetization, and curved spacetimes near compact objects) and the large variety of spatial scales needed to resolve turbulent motions. A great benefit comes from the porting of existing codes running on standard processors to GPU-based platforms. However, this usually requires a drastic rewriting of the original code, the use of specific languages like CUDA, and a complex analysis of data management and optimization of parallel processes. Here, we describe the porting of the ECHO code for special and general relativistic MHD to accelerated devices, simply based on native Fortran language built-in constructs, especially do concurrent loops, few OpenACC directives, and straightforward data management provided by the Unified Memory option of NVIDIA compilers. Thanks to these very minor modifications to the original code, the new version of ECHO runs at least 16 times faster on GPU platforms as compared to CPU-based ones. The chosen benchmark is the 3D propagation of a relativistic MHD Alfvén wave, for which strong and weak scaling tests performed on the LEONARDO pre-exascale supercomputer at CINECA are provided (using up to 256 nodes corresponding to 1024 GPUs, and over 14 billion cells). Finally, an example of high-resolution relativistic MHD Alfvénic turbulence simulation is shown, demonstrating the potential for astrophysical plasmas of the new GPU-based version of ECHO.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Fluids
Fluids Engineering-Mechanical Engineering
CiteScore
3.40
自引率
10.50%
发文量
326
审稿时长
12 weeks
期刊最新文献
Deeper Flow Behavior Explanation of Temperature Effects on the Fluid Dynamic inside a Tundish Continuous Eddy Simulation vs. Resolution-Imposing Simulation Methods for Turbulent Flows Application of Machine Learning Algorithms in Predicting Rheological Behavior of BN-diamond/Thermal Oil Hybrid Nanofluids A Spectral/hp-Based Stabilized Solver with Emphasis on the Euler Equations Quantitative Color Schlieren for an H2–O2 Exhaust Jet Developing in Air
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1