This documentation is designed for beginners in Graphics Processing Unit (GPU)-programming and who want to get familiar with OpenACC and OpenMP offloading models. Here we present an overview of these two programming models as well as of the GPU-architectures. Specifically, we provide some insights into the functionality of these models and perform experiments involving different directives and discuss their performance. This is achieved through the use of a mini-application based on solving numerically the Laplace equation. Such experiments reveal the benefit of the use of GPU, which in our case manifests by an increase of the performance by almost a factor of 52. We further carry out a comparative study between the OpenACC and OpenMP models in the aim of converting OpenACC to OpenMP on heterogeneous systems. In this context, we present a short overview of the open-source OpenACC compiler Clacc, which is designed based on translating OpenACC to OpenMP in Clang.
Additional key features required for different directives based porting approaches
本文档是为ESCAPE项目创建的可交付成果报告之一。ESCAPE是Energy-efficient Scalable Algorithms for Weather Prediction at Exascale的缩写。该项目为欧洲业务数值天气预报和未来气候模型开发世界级的极端规模计算能力。这是通过识别天气和气候侏儒来完成的,这些侏儒是计算和通信方面的关键模式(本着伯克利侏儒的精神)。然后针对不同的硬件架构(单节点和多节点)优化这些侏儒,并探索替代算法。性能可移植性是通过使用领域特定的语言来解决的。本报告根据ESCAPE项目的经验总结了OpenMP和OpenACC指令所需的关键功能。对于OpenMP,最新的公共标准草案5.0包含了所需的深度复制和多级内存功能;对于OpenACC,技术报告16总结了标准版本2.6之外正在进行的讨论。本文件概述了我们对这一方法的建议。当同时使用OpenACC和OpenMP指令时,还需要在协调运行时和调试方面进行额外的工作;特别是用于OpenMP的新OPDT调试接口及其在混合指令程序中的语义的互操作性。
Validation-Centric AI-Assisted GPU Porting of a 250,000+ Line Legacy Weather Simulation Code
Information Technology Center Nagoya University(名古屋大学信息技术中心);Institute for Space-Earth Environmental Research Nagoya University(名古屋大学地球环境空间研究所);Information Technology Center The University of Tokyo(东京大学信息技术中心)