Due to the complex topological relationship, poor data locality, and data racing problems in unstructured CFD computing, how to parallelize the finite volume method algorithms in shared memory to efficiently explore the hardware capabilities of many-core GPUs has become a significant challenge. Based on a production-level unstructured CFD software, three shared memory parallel programming strategies, atomic operation, colouring, and reduction were designed and implemented by deeply analysing its computing behaviour and memory access mode. Several data locality optimization methods—grid reordering, loop fusion, and multi-level memory access—were proposed. Aimed at the sequential attribute of LU-SGS solution, two methods based on cell colouring and hyperplane were implemented. All the parallel methods and optimization techniques implemented were comprehensively analysed and evaluated by the three-dimensional grid of the M6 wing and CHN-T1 aeroplane. The results show that using the Cuthill–McKee grid renumbering and loop fusion optimization techniques can improve memory access performance by 10%. The proposed reduction strategy, combined with multi-level memory access optimization, has a significant acceleration effect, speeding up the hot spot subroutine with data races three times. Compared with the serial CPU version, the overall speed-up of the GPU codes can reach 127. Compared with the parallel CPU version, the overall speed-up of the GPU codes can achieve more than thirty times the result in the same Message Passing Interface (MPI) ranks.
Due to data conflicts or data dependences, exploiting shared memory parallelism on unstructured mesh applications is highly challenging. The prior approaches are neither general nor scalable on emerging many-core processors. This paper presents a general and scalable shared memory approach for unstructured mesh computations. We recursively divide and reorder an unstructured mesh to construct a task dependency tree (TDT), where massive parallelism is exposed and data conflicts as well as data dependences are respected. We propose two recursion strategies to support popular programming models on both CPUs and GPUs for TDT. We evaluate our approach by applying it to an industrial unstructured Computational Fluid Dynamics (CFD) software. Experimental results show that our approach significantly outperforms the prior shared memory approaches, delivering up to 8.1× performance improvement over the engineer-tuned implementations.
The computational cost of computational fluid dynamics (CFD) simulation is relatively high due to its computational complexity. To reduce the computing time required by CFD, researchers have proposed various methods, including efficient time advancement methods, correction methods for discrete control equations, multigrid methods, reasonable initial field setting methods, and parallel methods. Among these methods, the initial field setting method can provide significant performance improvements, but there is little work on it. Existing CFD industrial software typically uses inflow conditions for the initial flow field or applies empirical methods, which can cause instability in the CFD calculation process and make convergence difficult. With the rapid development of deep learning, researchers are increasingly attempting to replace CFD simulations with deep neural networks and have achieved significant performance improvements. However, these methods still face some challenges. First, they can only predict the computational flow field on regular grids. They cannot directly make predictions for irregular grids such as multi-block grids and unstructured grids, so the final flow field can only be obtained through interpolation and similar methods. Second, although these methods have been claimed to provide high accuracy, there is still a significant gap in performance with CFD and they cannot yet be applied to real scenarios. To address these issues, we propose a Residual Graph Convolutional Network for Initial Flow Field Setting (RGCN-IFS) in CFD simulations. This method converts the grid into a graph structure and uses an improved graph neural network to predict the flow field. In this way, we can predict the flow field on any type of grid. More importantly, this method does not directly replace CFD simulations, but it rather serves in an auxiliary role, providing appropriate initial flow fields for the CFD calculations, improving the convergence efficiency while ensuring calculation accuracy, and directly bridging the accuracy gap between intelligent surrogate models and CFD simulations.
15 October 2021 in Software: Practice and Experience
Sparse iterative solvers are commonly used in various fields. However, certain essential kernels of these solvers, such as sparse triangular solves (SpTRSV), present significant challenges for efficient parallelization due to data dependencies . Previous methods, like level-scheduling or multi-coloring, typically involve creating a Task Dependency Graph (TDG) to represent data dependencies and identify independent sets from the TDG for parallel execution. However, these approaches often result in limited parallelism with substantial synchronization overheads or negatively impact the solver convergence rate. This article introduces DCSolver , a Divide-and-Conquer (DC) framework designed to efficiently parallelize sparse solvers with data dependencies on GPUs. To achieve this, we break down the solver TDG into independent subgraphs, allowing us to exploit both coarse-grained and fine-grained parallelism. To efficiently allocate GPU threads for subgraphs with varying degrees of parallelism, we have developed an adaptive in-warp scheduling strategy. Additionally, we propose a hybrid parallelization scheme in DCSolver, which involves employing different parallel approaches for different DC recursions to achieve a more optimal balance between parallelism and convergence for solvers. To evaluate the effectiveness of DCSolver, we apply it to two preconditioned Krylov subspace solvers and an unstructured mesh Computational Fluid Dynamics (CFD) solver. Our results show that when compared with the state-of-the-art methods, DCSolver accelerates the time-to-solution of solvers by an average speedup of up to 26.19X.
22 March 2026 in ACM Transactions on Architecture and Code Optimization
Computational Fluid Dynamics (CFD) on unstructured meshes are widely used to simulate complex flow problems. Geometric Multigrid (GMG) is an essential method to accelerate CFD simulations. However, achieving high efficiency and scalability for unstructured geometric multigrid CFD is very challenging, due to data conflicts or data dependencies at shared-memory level as well as communication bottlenecks at distributed-memory level. Traditional hybrid parallelization schemes, which typically employ domain decomposition for MPI at distributed-memory level and mesh coloring for OpenMP at shared-memory level, fail to scale on modern HPC architectures. This article proposes an efficient and scalable hybrid parallelization scheme for unstructured geometric multigrid CFD. To begin with, we extend our previous work, 1 the Task Dependency Tree (TDT) approach [ 33 ], to expose shared-memory parallelism from unstructured mesh computations while respecting both data conflicts and data dependencies. We adapt TDT to handle multiple GMG levels with complex mesh boundaries. TDT can be implemented using a task-based programming model such as OpenMP task , which offers a unique opportunity to fine-grained computation-communication overlap in hybrid parallelization. Therefore, at distributed-memory level we introduce the one-sided asynchronous multithreaded Partitioned Global Address Space (PGAS) model, and develop a PGAS+TDT hybrid scheme. We propose an adaptive scheduling strategy to maximize the overlap of communication and computation tasks in our hybrid scheme. Our work was implemented and evaluated in a production-level unstructured CFD software on both x86 and ARM multi-core architectures. On a single compute node, TDT dramatically outperforms the prior shared-memory approaches, delivering a speedup of up to 5.2×. For large-scale tests, our PGAS+TDT hybrid scheme enhances performance by up to 2.0× over the engineer-tuned MPI-only version, with a strong scalability of about 70% when scaling to 128 compute nodes.