GPUs are increasingly adopted in data centers accelerating large workloads as found in the world of CFD. Currently, developers of established codes are still experimenting with GPU programming models such as OpenMP. This work develops an initial strategy to offload the CFD/CAA Fortran code MGLET to GPUs using OpenMP. We introduce a testing framework to evaluate the feasibility of using compiler directives to offload MGLET’s established data structures on different compilers and multiple GPU vendors focusing on portability. Additionally, a partially offloaded implementation of MGLET’s scalar solver in the open source code mglet-base is presented and benchmarked. It is shown that within the investigated compilers, only LLVM flang and Cray’s ftn can compile MGLET and sufficiently support all required OpenMP offloading features and portability requirements. Bugs and inconsistencies in compilers and OpenMP implementations mandate workarounds to obtain numerically correct results and to ensure portability. After the application of all required workarounds, MGLET’s partially offloaded scalar solver runs efficiently on APUs supporting unified shared memory, simplifying development by excluding data transfers. Offloaded compute routines scale well, independent of the grid configuration, only requiring a sufficient amount of total grids to saturate the parallel compute capabilities of GPUs. Future porting efforts for both the industrial and scientific adoptions of the MGLET code can build on the proposed implementation and offload remaining parts of the code as well as future extensions and expect reasonable performance.
«
GPUs are increasingly adopted in data centers accelerating large workloads as found in the world of CFD. Currently, developers of established codes are still experimenting with GPU programming models such as OpenMP. This work develops an initial strategy to offload the CFD/CAA Fortran code MGLET to GPUs using OpenMP. We introduce a testing framework to evaluate the feasibility of using compiler directives to offload MGLET’s established data structures on different compilers and multiple GPU vend...
»