• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2021, Vol. 43 ›› Issue (05): 773-781.

• 高性能计算 • 上一篇    下一篇

基于OPS的计算流体力学软件多平台自动并行

王巍,车永刚,徐传福,王正华   

  1. (国防科技大学计算机学院量子信息研究所兼高性能计算国家重点实验室,湖南 长沙 410073)
  • 收稿日期:2020-06-11 修回日期:2020-07-28 接受日期:2021-05-25 出版日期:2021-05-25 发布日期:2021-05-19
  • 基金资助:
    国防基础科研项目(WDZC614270301201906);国家自然科学基金(61561146395,61772542)

OPS based automatic parallelization of a computational fluid dynamics software on multiple platforms

WANG Wei,CHE Yong-gang,XU Chuan-fu,WANG Zheng-hua   

  1. (Institute of Quantum Information and State Key Laboratory of High Performance Computing,

    College of Computer Science and Technology,National University of Defense Technology,Changsha 410073,China)

  • Received:2020-06-11 Revised:2020-07-28 Accepted:2021-05-25 Online:2021-05-25 Published:2021-05-19

摘要: 当前高性能计算机体系结构呈现多样性特征,给并行应用软件开发带来巨大挑战。采用领域特定语言OPS对高阶精度计算流体力学软件HNSC进行面向多平台的并行化,使用OPS API实现了代码的重构,基于OPS前后端自动生成了纯MPI、OpenMP、MPI+OpenMP和MPI+CUDA版本的可执行程序。在一个配有2块Intel Xeon CPU E5-2660 V3 CPU和1块NVIDIA Tesla K80 GPU的服务器上的性能测试表明,基于OPS自动生成的并行代码性能与手工并行代码的性能可比甚至更优,并且OPS自动生成的GPU并行代码相对于其CPU并行代码有明显的性能加速。测试结果说明,使用OPS等领域特定语言进行面向多平台的计算流体力学并行软件开发是一种可行且高效的途径。


关键词: 领域特定语言, 计算流体力学软件, 多平台, 自动代码生成

Abstract: Current High Performance Computing (HPC) systems exhibit diverse architectures, posing great pressure to the development of parallel applications. This paper uses OPS (Oxford parallel library for structured mesh Solvers), a Domain Specific Language, to parallelize a Computational Fluid Dynamics (CFD) software named HNSC (High order Navier-Stokes simulator for Compressible flow). The code is restructured based on OPS API. The pure MPI, pure OpenMP, MPI + OpenMP and MPI+CUDA versions of executables are automatically generated based on OPS frontend and backend. Performance evaluation is performed on a server consisting of two Intel Xeon CPU E5-2660 V3 CPUs and one NVIDIA Tesla K80 GPU. The results show that the parallel codes generated automatically based on OPS have comparable or superior performance when compared to the manual versions of codes. Furthermore, the OPS generated GPU code achieves significant performance acceleration over the OPS generat- ed CPU codes. From the results, we can affirm that using OPS like DSLs for multiplatform oriented programming parallelizing of CFD application is feasible and efficient.




Key words: domain specific language, computational fluid dynamics software, multiple platforms, automatic code generation ,