The ISO C++17 standard introduces \emph{parallel algorithms}, a parallel programming model promising portability across a wide variety of parallel hardware including multi-core CPUs, GPUs, and FPGAs. Since 2019, the NVIDIA HPC SDK compiler suite supports this programming model for multi-core CPUs and GPUs. ExaHyPE is a solver engine for hyperbolic partial differential equations for complex wave phenomena. It supports multiple numerical methods including Finite Volumes and ADER-DG, and employs adaptive mesh refinement with dynamic load balancing via space-filling curves as well as task-based parallelism and offloading to GPUs. This study ports ExaHyPE's tasks over blocks of Finite Volumes to the ISO C++ parallel algorithms programming model, and compares its performance and usability against an OpenMP implementation with offloading via OpenMP target directives. It shows that ISO C++ is a feasible programming model for non-trivial applications like our task-based AMR code. The realisation is bare of vendor-specific or non-C++ extensions. It however is slower than its OpenMP counterpart. \vspace{-1cm}
翻译:ISO C++17标准引入了\emph{并行算法},这是一种并行编程模型,承诺在多种并行硬件(包括多核CPU、GPU和FPGA)上具有可移植性。自2019年起,NVIDIA HPC SDK编译器套件支持针对多核CPU和GPU的这种编程模型。ExaHyPE是一个用于复杂波动现象的双曲偏微分方程求解引擎。它支持多种数值方法,包括有限体积法和ADER-DG,并采用基于空间填充曲线动态负载均衡的自适应网格细化,以及基于任务的并行性和向GPU的卸载。本研究将ExaHyPE中基于有限体积块的任务移植到ISO C++并行算法编程模型,并对比了其与通过OpenMP目标指令实现卸载的OpenMP实现的性能和可用性。结果表明,对于像我们基于任务的自适应网格细化代码这类非平凡应用,ISO C++是一种可行的编程模型。该实现无需特定供应商或非C++扩展,但其性能逊于OpenMP对应实现。\vspace{-1cm}