Abstract:To accelerate the solution of computational fluid dynamics (CFD), parallel execution is commonly used. However, the diversity of computing hardware architectures and programming languages poses challenges to program portability. In this study, the Kokkos framework is used to implement heterogeneous parallel CFD computing. Moreover, the reduction method, atomic operations, and the coloring approach are employed to address data conflicts in the process of parallel computing. A specific algorithmic solution for data conflict in heterogeneous parallel computing under this framework is proposed. Given the architectural characteristics of the graphics processing unit (GPU), the speedup ratios of single-precision and double-precision calculations on different hardware are analyzed, and optimal parallel strategies on different computing hardware are obtained. The study demonstrates that using atomic operations for single-precision computations on GPUs significantly enhances CFD solving efficiency.