On the performance of GPU accelerated q-LSKUM based meshfree solvers in Fortran, C++, Python, and Julia
This report presents a comprehensive analysis of the performance of GPU accelerated meshfree CFD solvers for two-dimensional compressible flows in Fortran, C++, Python, and Julia. The programming model CUDA is used to develop the GPU codes. The meshfree solver is based on the least squares kinetic upwind method with entropy variables (q-LSKUM). To assess the computational efficiency of the GPU solvers and to compare their relative performance, benchmark calculations are performed on seven levels of point distribution. To analyse the difference in their run-times, the computationally intensive kernel is profiled. Various performance metrics are investigated from the profiled data to determine the cause of observed variation in run-times. To address some of the performance related issues, various optimisation strategies are employed. The optimised GPU codes are compared with the naive codes, and conclusions are drawn from their performance.
From the conclusion:
Post optimisation, the Fortran code was more efficient than Python and Julia codes. However,
the C++ code is still the most efficient as the SASS code generated by its compiler is optimal
compared to other codes. The optimised Python code was computationally more expensive as
the SASS code generated by the Numba compiler was not efficient.
Language and compiler versions and options used:
Fortran 90 nvfortran 21.2 -O3 C++ 20 nvcc 21.2 -O3 -mcmodel=large Python 3.9.1 Numba 0.55.0 -O3 Julia 1.5.3 CUDA.jl 2.4.1 -O3 –check-bounds=no
The C++ code of the group is here.