Can Fortran’s ‘do concurrent’ Replace Directives for Accelerated Computing?
Can Fortran’s ‘do concurrent’ Replace Directives for Accelerated Computing?
复制标题
Fortran 的“并发”能否取代加速计算指令?
DOI:
10.1007/978-3-030-97759-7_1
复制
发表时间:
2022
期刊:
影响因子:
--
通讯作者:
Stulajter, M. M.
中科院分区:
文献类型:
--
作者:
Stulajter, M. M.
Recently, there has been growing interest in using standard language constructs (e.g. C++’s Parallel Algorithms and Fortran’sdo concurrent) for accelerated computing as an alternative to directive-based APIs (e.g. OpenMP and OpenACC). These constructs have the potential to be more portable, and some compilers already (or have plans to) support such standards. Here, we look at the current capabilities, portability, and performance of replacing directives with Fortran’sdo concurrentusing a mini-app that currently implements OpenACC for GPU-acceleration and OpenMP for multi-core CPU parallelism. We replace as many directives as possible withdo concurrent, testing various configurations and compiler options within three major compilers: GNU’sgfortran, NVIDIA’snvfortran, and Intel’sifort. We find that with the right compiler versions and flags, many directives can be replaced without loss of performance or portability, and, in the case ofnvfortran, they can all be replaced. We discuss limitations that may apply to more complicated codes and future language additions that may mitigate them. The software and Singularity/Apptainer containers are publicly provided to allow the results to be reproduced.