Lattice Boltzmann Simulation Method, Apparatus and System for Hiding Communication Delay

By employing CUDA streaming and event mechanisms in lattice Boltzmann simulations and utilizing host-side page-locked memory for asynchronous DMA transfers, concurrent execution of computational and communication streams is achieved. This solves the communication latency problem in multi-GPU parallelism, improves computational efficiency and resource utilization, and supports large-scale fluid simulations.

CN122450707BActive Publication Date: 2026-11-10ZHEJIANG YUANSUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610923265.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-11-10
Estimated Expiration
2046-06-25

AI Technical Summary

Technical Problem

In multi-GPU parallel lattice Boltzmann simulations, communication latency becomes the main bottleneck restricting parallel efficiency, leading to wasted computing resources and insufficient PCIe bandwidth utilization.

Method used

By employing CUDA streams and events, and using host-side page-locked memory as a buffer, asynchronous DMA transfer is achieved. This, combined with the concurrent execution of computation and communication streams, hides communication latency and optimizes the data exchange process.

Benefits of technology

It significantly reduces communication overhead, improves computational efficiency, achieves complete overlap between computation and communication, enhances overall simulation throughput and resource utilization, and supports large-scale fluid simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122450707B_ABST
    Figure CN122450707B_ABST
Patent Text Reader

Abstract

This invention provides a lattice Boltzmann simulation method, apparatus, and system that hides communication latency, relating to the technical field of simulation computing. The method includes: triggering the GPU to perform boundary collision calculations on the boundary columns of a subdomain within the computation stream, and continuing to launch a collision kernel within the computation stream for internal collision calculations; during the internal collision calculation process, concurrently packaging boundary data into the GPU's contiguous buffer via a communication stream and asynchronously copying it to the host's page-locked memory; receiving packaged data from neighboring GPUs sent by the host via a communication stream, asynchronously copying it to the GPU's video memory and writing it to the ghost layer; responding to the completion of the write operation, performing a pull-based streaming migration operation within the computation stream, and launching a boundary condition kernel to apply physical boundary constraints to complete the simulation process for that time step. During the computation process, communication overlap can be achieved, thereby significantly reducing the proportion of communication overhead and improving the overall simulation throughput and computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of simulation computing, and in particular to a lattice Boltzmann simulation method, apparatus and system that hides communication delays. Background Technology

[0002] Lattice Boltzmann (LBM) simulation is a mesoscale computational fluid dynamics method widely used for complex flow simulations due to its inherent parallelism. In recent years, GPUs (Graphics Processing Units) have become the mainstream hardware for accelerating LBM simulations thanks to their powerful Single Instruction, Multiple Threads (SIMT) architecture. Single-GPU LBM implementations can achieve speedups of hundreds of times, but limited by memory capacity, single GPUs cannot handle simulations with large-scale meshes (such as those with hundreds of millions of nodes).

[0003] To overcome the limitations of video memory, multi-GPU parallel solutions have been explored in related technologies. However, multi-GPU parallel solutions are often accompanied by significant communication overhead, making communication latency the main bottleneck restricting parallel efficiency and making it difficult to improve computational efficiency. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a lattice Boltzmann simulation method, apparatus and system for hiding communication delay, so as to alleviate the above-mentioned technical problem of communication delay.

[0005] In a first aspect, embodiments of the present invention provide a lattice Boltzmann simulation method that hides communication latency, applied to a GPU, wherein the GPU is pre-allocated with subdomains; and the GPU pre-creates CUDA streams and CUDA events for inter-stream synchronization; wherein the CUDA streams include computation streams and communication streams, and the CUDA events include boundary collision completion events and communication completion events; the method relies on page-locked memory on the host side as a transit buffer for data exchange between GPUs, the page-locked memory is used to support asynchronous DMA transfer, enabling memory copy operations to be executed concurrently with the GPU kernel; the method includes: within each time step, triggering the GPU to perform boundary collision calculations on the boundary columns of the subdomains in the computation stream to obtain boundary data, the boundary data being sent to neighboring GPUs of the current GPU; in response to the completion of the boundary collision calculation, continuing to start a collision kernel in the computation stream to perform boundary collision calculations on the subdomains; The internal collision calculation is performed on the internal columns of the subdomain of the GPU. During the internal collision calculation, the boundary data is concurrently packaged into the contiguous buffer of the GPU through the communication stream to obtain packaged data. The packaged data is then asynchronously copied from the contiguous buffer of the GPU to the page-locked memory on the host side. The host side is used to perform buffer swapping based on the packaged data of the GPU to send the packaged data to the neighboring GPU of the current GPU. The host side receives the packaged data of the neighboring GPU sent by the host side through the communication stream, asynchronously copies it to the GPU's video memory, and writes the packaged data of the neighboring GPU into the ghost layer of the GPU. In response to the completion of the ghost layer write, a pull-based streaming migration operation is performed in the computing stream, and a boundary condition kernel is started to apply physical boundary constraints to the entire domain to complete the simulation process of this time step.

[0006] In conjunction with the first aspect, the present invention provides a first possible implementation of the first aspect, wherein the method further includes: after applying the physical boundary constraints, starting a macroscopic quantity kernel in the computational flow; and calculating the macroscopic physical quantities of each grid point based on the updated global distribution function after applying the physical boundary constraints through the macroscopic quantity kernel.

[0007] In conjunction with the first aspect, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the method further includes: recording a boundary collision completion event in the computation stream after the boundary collision calculation is completed; responding to the boundary collision completion event through the communication stream to trigger the communication stream to perform the packaging and asynchronous copying operation of the boundary data; recording a communication completion event in the communication stream after the packaged data of the neighboring GPU is written to the ghost layer; and triggering the computation stream to perform the pull-based streaming migration operation in response to the communication completion event.

[0008] In conjunction with the first aspect, the present invention provides a third possible implementation of the first aspect, wherein the above method further includes: after obtaining the macroscopic physical quantity, initiating the boundary column collision calculation of the next time step based on the macroscopic physical quantity, and through the coordination of the calculation flow and the communication flow, making the boundary column collision calculation and internal column collision calculation of the next time step overlap with the asynchronous copy and packet data transmission of the current time step in a cross-time step pipeline.

[0009] In conjunction with the first aspect, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the above method further includes: obtaining the number of available GPUs, dividing the global computing domain one-dimensionally along the main direction based on the number, so as to divide the global computing domain into multiple subdomains matching the number, and allocating a continuous subdomain to each GPU, each subdomain including multiple columns of grids, and additionally allocating a ghost layer on the left and right sides of each subdomain for storing boundary data of adjacent subdomains.

[0010] In conjunction with the fourth possible implementation of the first aspect, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the above method further includes: allocating video memory on each GPU to store data of the subdomain allocated by the GPU; and creating the CUDA stream and the CUDA event for inter-stream synchronization for each GPU, and allocating the page-locked memory on the host side as a transit buffer for data exchange between the GPUs.

[0011] In conjunction with the second possible implementation of the first aspect, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the above method further includes: collecting macroscopic physical quantity data of subdomains of each GPU to the host at specified time intervals, and merging them into global field data on the host; outputting a visualization format file containing the global field data, the visualization format file being used for visualization analysis.

[0012] Secondly, embodiments of the present invention also provide a lattice Boltzmann simulation device that hides communication latency, applied to a GPU, wherein the GPU is pre-allocated with subdomains; and the GPU pre-creates CUDA streams and CUDA events for inter-stream synchronization; wherein the CUDA streams include computation streams and communication streams, and the CUDA events include: boundary collision completion events and communication completion events; the device relies on page-locked memory on the host side as a transit buffer for data exchange between GPUs, the page-locked memory is used to support asynchronous DMA transfer, enabling memory copy operations to be executed concurrently with the GPU kernel; the device includes: a boundary calculation module, used to trigger the GPU to perform boundary collision calculation on the boundary columns of the subdomain in the computation stream at each time step, to obtain boundary data, the boundary data being sent to the neighboring GPUs of the current GPU; and an internal calculation module, used to respond to the completion of the boundary collision calculation, to continue starting a collision kernel in the computation stream to perform boundary collision calculation on the GPU. The internal columns in the subdomain of U are used for internal collision calculation; a packing module is used to concurrently and synchronously pack and send the boundary data to the contiguous buffer of the GPU through the communication stream during the internal collision calculation of the computing stream, to obtain packed data; and asynchronously copy the packed data from the contiguous buffer of the GPU to the page-locked memory of the host; wherein, the host is used to perform buffer swapping according to the packed data of the GPU to send the packed data to the neighboring GPU of the current GPU; a writing module is used to receive the packed data of the neighboring GPU sent by the host through the communication stream, asynchronously copy it to the GPU's video memory, and write the packed data of the neighboring GPU to the ghost layer of the GPU; a completion module is used to perform a pull-type streaming migration operation in the computing stream in response to the completion of the ghost layer write, and to start the boundary condition kernel to apply physical boundary constraints to the entire domain to complete the simulation process of this time step.

[0013] Thirdly, embodiments of the present invention also provide a lattice Boltzmann simulation system for hiding communication latency, the system comprising: multiple GPUs, each of the multiple GPUs being configured with a lattice Boltzmann simulation device for hiding communication latency as described in the second aspect; an asynchronous stream scheduling unit for managing the computational and communication streams of each GPU, achieving inter-stream dependency synchronization through CUDA events to ensure correct overlap between computation and communication; a page-locked memory buffer unit for providing page-locked memory on the host side and acting as an intermediary for data exchange between the GPUs; a host side for decomposing the global computational domain into multiple subdomains, distributing tasks to the GPUs, and performing buffer swapping based on the packaged data of each GPU to send the packaged data to the neighboring GPUs corresponding to each GPU, and collecting macroscopic physical quantity data of the subdomains of the GPUs; and a visualization output unit for saving the merged global field data as a visualization format file.

[0014] In conjunction with the third aspect, the present invention provides a first possible implementation of the third aspect, wherein the asynchronous flow scheduling unit is further configured to: trigger the communication flow to perform boundary data packaging and asynchronous copying through a boundary collision completion event, and trigger the computing flow to perform pull-type streaming migration operation after the ghost layer is updated through a communication completion event, so that the data exchange performed by the communication flow and the internal column collision calculation performed by the computing flow concurrently overlap in time, and a cross-time step pipeline is formed between adjacent time steps.

[0015] The embodiments of the present invention bring the following beneficial effects: This invention provides a lattice Boltzmann simulation method, apparatus, and system that hides communication latency. At each time step, the GPU is triggered to perform boundary collision calculations on the boundary columns of a subdomain within the computation stream to obtain boundary data, which is then sent to neighboring GPUs. Upon completion of the boundary collision calculation, a collision kernel is started within the computation stream to perform internal collision calculations on the internal columns of the GPU's subdomain. During the internal collision calculation, the boundary data is concurrently packaged into the GPU's contiguous buffer via the communication stream to obtain packaged data. This packaged data is then asynchronously copied from the GPU's contiguous buffer to the host's page-locked memory. Packaged data from neighboring GPUs sent by the host is received via the communication stream and asynchronously copied to the GPU's video memory. The packaged data from neighboring GPUs is also written to the GPU's ghost layer. Upon completion of the ghost layer write, a pull-based streaming migration operation is performed within the computation stream, and a boundary condition kernel is started to apply physical boundary constraints to the entire domain, thus completing the simulation process for that time step. The asynchronous computation process of the computation stream and the communication overlap achieved through the communication stream in the above process can significantly reduce the proportion of communication overhead, thereby improving the overall simulation throughput and computational efficiency.

[0016] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A schematic diagram of global computation domain decomposition in multi-GPU parallel processing is provided for an embodiment of the present invention; Figure 2 A schematic diagram of subdomain segmentation provided in an embodiment of the present invention; Figure 3 A flowchart of a lattice Boltzmann simulation method for hiding communication delays provided in an embodiment of the present invention; Figure 4 A schematic diagram of a lattice Boltzmann simulation device for hiding communication delay provided in an embodiment of the present invention; Figure 5 A structural block diagram of a lattice Boltzmann simulation system for hiding communication delays provided in an embodiment of the present invention; Figure 6 A comparative diagram of simulation performance provided for an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Currently, GPU parallel solutions are commonly used to implement the lattice Boltzmann method. However, common multi-GPU parallel solutions employ a domain decomposition strategy, which divides the computational domain into several subdomains, with each GPU responsible for one subdomain. A ghost layer is set at the subdomain boundary to store the distribution function data of adjacent subdomains. In each time step, each GPU independently computes collision, migration, and other steps within its own domain, and then exchanges boundary data through communication to update the ghost layer.

[0022] However, the above-mentioned GPU parallel solutions have the following shortcomings: The communication overhead is significant; that is, boundary data exchange between multiple GPUs typically uses a CPU-mediated approach (host-staged), requiring data to be transferred twice via PCIe (GPU→CPU→GPU). As the number of GPUs increases or the mesh size grows, communication latency becomes a major bottleneck restricting parallel efficiency.

[0023] In traditional implementations, computation and communication are executed serially. This means that communication operations, such as packing, copying from the GPU to the host, routing, copying from the host to the GPU, and unpacking, are executed serially with computational operations, such as collisions, streaming, and macroscopic quantity updates. During communication, the GPU is idle, resulting in a waste of computing resources.

[0024] The lack of fine-grained asynchronous pipeline design means that the existing solutions do not fully utilize the streaming mechanism and asynchronous copy capability of CUDA (Compute Unified Device Architecture), and cannot achieve concurrent execution of computing kernels and data transmission, and communication latency cannot be effectively hidden.

[0025] The memory copying process is inefficient, meaning that it uses pageable host memory for data transfer, which cannot overlap with GPU kernel execution, and the PCIe (Peripheral Component Interconnect Express) bandwidth utilization is insufficient.

[0026] Therefore, how to design a multi-GPU LBM parallel method that can hide communication latency and achieve complete overlap between computation and communication, break through the PCIe bandwidth limitation, and achieve near-linear acceleration of large-scale fluid simulation is a technical problem that urgently needs to be solved in this field.

[0027] Based on this, the lattice Boltzmann simulation method, apparatus and system for hiding communication delay provided by the embodiments of the present invention can effectively alleviate the above-mentioned technical problems.

[0028] To facilitate understanding of this embodiment, a lattice Boltzmann simulation method for hiding communication delay, disclosed in this embodiment of the invention, will first be described in detail.

[0029] In one possible implementation, this invention provides a lattice Boltzmann simulation method that hides communication latency, applied to a GPU. The GPU pre-allocates subdomains and pre-creates CUDA streams and CUDA events for inter-stream synchronization. The CUDA streams include computational and communication streams, and the CUDA events include boundary collision completion and communication completion events. Furthermore, in this embodiment, the GPU interacts with the host machine, and the lattice Boltzmann simulation method that hides communication latency relies on page-locked memory on the host machine as a buffer for data exchange between GPUs. The page-locked memory supports asynchronous DMA (Asynchronous Direct Memory Access Transfer), enabling memory copy operations to be executed concurrently with the GPU kernel.

[0030] In practical use, this embodiment of the invention is a multi-host GPU interaction process, where each GPU interacts with the host machine for data exchange. Specifically, before performing lattice Boltzmann simulation, preparatory work is required. Specifically, in this embodiment, the number of available GPUs can be obtained first. Based on this number, the global computation domain is divided one-dimensionally along the main direction (e.g., the X-axis) to divide the global computation domain into multiple subdomains matching the number of GPUs. Each GPU is allocated a contiguous subdomain, and each subdomain includes multiple columns of grids. Additionally, each subdomain is allocated one column of ghost layers on the left and right sides to store the boundary data of adjacent subdomains. Furthermore, when performing one-dimensional segmentation of the global computation domain, it is also possible to perform segmentation along the Y-axis, Z-axis, or in three dimensions, depending on the actual application. This embodiment of the invention does not impose any limitations on this.

[0031] For ease of understanding, Figure 1 A schematic diagram of global computation domain decomposition in multi-GPU parallelism is shown, wherein, Figure 1 In this example, taking two GPUs, GPU0 and GPU1, their corresponding subdomains are subdomain 0 (Device0) and subdomain 1 (Device1), respectively. Figure 1 The image also shows a ghost layer, namely, Figure 1 In this embodiment of the invention, ghost layers 0 (ghost0) and 1 (ghost1) are used to store boundary data of adjacent subdomains. Figure 1 In this context, Nx and Ny represent the ranges in the corresponding directions.

[0032] further, Figure 2A schematic diagram of subdomain segmentation is also shown, wherein each subdomain comprises multiple grids, and each subdomain is additionally allocated one column of grids on the left and one column on the right as ghost layers, i.e. Figure 2 The two ghost layers shown in the dashed box are used to store boundary data of adjacent subdomains. The number of columns of the real grid within a subdomain is denoted as L_x, and the total number of columns after adding the ghost layers is L_x+2. The existence of the ghost layers allows each subdomain to perform most of the computation independently, only needing to exchange data with its neighbors at the boundaries.

[0033] Furthermore, in this embodiment of the invention, it is also necessary to allocate video memory on each GPU to store the data of the subdomain allocated to the GPU; and to create CUDA streams and CUDA events for inter-stream synchronization for each GPU, and allocate page-locked memory on the host side as a transit buffer for data exchange between GPUs. For example, the video memory allocated on the GPU can store the distribution function f of the subdomain, the post-collision distribution function f_star, macroscopic quantities (density ρ, velocity u_x, u_y), and the solid flag array solid. The fluid simulation model used by the lattice Boltzmann simulation method, such as the D2Q9 lattice model, and other discrete velocity vectors, weight coefficients, rebound directions, and other constant data, can be stored in the GPU's constant memory to accelerate access by all threads.

[0034] Furthermore, the CUDA streams created for the GPU include: the compute stream (streamComp): responsible for executing compute-intensive kernels (collisions, streaming, boundary conditions, macroscopic updates); and the communication stream (streamComm): responsible for executing communication-related kernels (packing, unpacking) and asynchronous memory copying operations. CUDA events created for each GPU are used for inter-stream synchronization, including: the boundary collision completion event (evBoundaryDone), used to mark the completion of boundary collision calculations, allowing the communication stream to begin packing; and the communication completion event (evCommDone), used to mark the completion of ghost layer data exchange, allowing the compute stream to begin streaming steps.

[0035] Furthermore, the page-locked memory allocated on the host side serves as a buffer for data exchange between GPUs, supporting asynchronous DMA transfers and enabling memory copy operations to be executed concurrently with the GPU kernel.

[0036] Furthermore, after completing the preparatory work before the aforementioned lattice Boltzmann simulation, the lattice Boltzmann simulation method for hiding communication delays according to the embodiments of the present invention can be executed. Specifically, as shown in the example... Figure 3 The flowchart shown illustrates a lattice Boltzmann simulation method for hiding communication delays. The method includes the following steps: In step S102, within each time step, the GPU is triggered to perform boundary collision calculation on the boundary column of the subdomain in the computation flow to obtain boundary data, which is used to send to the neighboring GPUs of the current GPU. Step S104: After the boundary collision calculation is completed, the collision kernel is started in the calculation flow to perform internal collision calculation on the internal columns in the subdomain of the GPU. In step S106, during the internal collision calculation process of the computing stream, the boundary data is concurrently packaged into the GPU's contiguous buffer through the communication stream to obtain the packaged data; and the packaged data is asynchronously copied from the GPU's contiguous buffer to the page-locked memory on the host side. The host is used to perform buffer swapping based on the GPU's packaged data in order to send the packaged data to the current GPU's neighboring GPUs. Step S108: Receive the packaged data of the neighboring GPU sent by the host through the communication stream, copy it asynchronously to the GPU's video memory, and write the packaged data of the neighboring GPU into the GPU's ghost layer. In step S110, in response to the completion of ghost layer writing, a pull-type streaming migration operation is performed in the computation stream, and the boundary condition kernel is started to apply physical boundary constraints to the entire domain to complete the simulation process of this time step.

[0037] In practice, for each time step, each GPU executes the above... Figure 3 The method shown achieves communication latency hiding through a two-stream design of computation and communication streams and CUDA event synchronization.

[0038] Furthermore, step S102 above executes the boundary column collision calculation process. In the computation flow of each GPU, a collision kernel is started to process the left and right boundary columns. These two columns of data will be sent to neighboring GPUs in subsequent communication steps. After the boundary column collision is completed, the GPU can respond, that is, after the boundary collision calculation is completed, it records the boundary collision completion event in the computation flow. At this time, it can also respond to the boundary collision completion event through the communication flow to trigger the communication flow to perform boundary data packing and asynchronous copying operations. After the neighboring GPU's packed data is written to the ghost layer, a communication completion event can also be recorded in the communication flow. Furthermore, the computation flow responds to the communication completion event to trigger the computation flow to perform a pull-based streaming migration operation. Moreover, the packing operation performed by the communication flow is performed within the communication flow and does not block the computation process of the computation flow. Therefore, the computation flow can continue to execute step S104 above to continue to start the collision kernel for internal collision calculation, which can achieve collision overlap between the communication flow and the computation flow. In other words, during the internal collision calculation process, the GPU simultaneously packages the calculated boundary data into a contiguous buffer and asynchronously copies it to the page-locked memory on the host side, executing the D2H (Device to Host) process to perform data exchange in the buffer on the host side. For example, the right boundary data of the current GPU is sent to the right neighbor GPU, and the left boundary data is sent to the left neighbor GPU. Subsequently, an asynchronous copy process is initiated in the communication stream, that is, the H2D (Host to Device) process in step S108 above is executed, which asynchronously copies the packaged data of the neighbor GPU from the page-locked memory on the host side to the GPU's video memory, and starts the unpacking kernel to unpack the packaged data to obtain the boundary data of the neighbor GPU, and writes it to the ghost layer. Then, a communication completion event is recorded in the communication stream.

[0039] Furthermore, after waiting for the communication completion event, the computational flow can ensure that the data of the ghost layer has been updated, and then start the streaming kernel (kStream) to perform pull-type streaming migration operations, and combine the bounce boundary processing of solid nodes. Subsequently, the boundary condition kernel (kBoundary) is started to apply physical boundary constraints, such as global entry (Zou-He velocity boundary), exit (first-order extrapolation), upper and lower wall (half-range bounce) boundary conditions, etc., to complete the simulation process of this time step.

[0040] Furthermore, in this embodiment of the invention, after applying physical boundary constraints, the update of macroscopic quantities can be implemented in the computational flow. Specifically, a macroscopic quantity kernel can be started in the computational flow; through the macroscopic quantity kernel, the macroscopic physical quantities of each grid point are calculated based on the updated global distribution function after applying physical boundary constraints. For example, the density and velocity of each grid point are calculated from the updated distribution function to prepare for collisions in the next time step.

[0041] Furthermore, after obtaining the aforementioned macroscopic physical quantities, boundary column collision calculations for the next time step can be initiated based on these quantities. Through the coordination of computation and communication flows, the boundary column collision calculations and internal column collision calculations for the next time step can overlap with the asynchronous copy and packet data transmission of the current time step, forming a cross-time step pipeline. That is, the above process is repeated. Figure 3 The process forms a two-stage pipeline: the communication of the current time step and the internal column collision of the next time step automatically overlap, thereby achieving continuous hiding of communication delay.

[0042] Furthermore, in this embodiment of the invention, macroscopic physical quantity data of each GPU's subdomain can be collected to the host at specified time intervals and merged into global field data on the host; and a visualization format file containing the global field data can be output, which is used for visualization analysis.

[0043] In practice, VTK (Visualization Toolkit) format files can be output for visualization analysis.

[0044] In practical use, in this embodiment of the invention, the pre-built bounce direction mapping table can also be stored in the constant memory of the GPU, so that the migration process can quickly obtain the bounce direction of the solid node.

[0045] Furthermore, the above-described embodiments of the present invention... Figure 3 The collision calculations shown typically employ a column splitting strategy, separating boundary columns from internal columns for processing. This creates opportunities for communication and computational overlap. When the actual number of columns L_x in the subdomain is large, internal column calculations dominate, making the overlap effect more significant. Furthermore, the communication flow can adopt a bidirectional buffer design, i.e., independently packaged and transmitted at the left and right boundaries, supporting simultaneous data exchange with left and right neighboring GPUs to maximize the bidirectional bandwidth utilization of PCIe. Further, in this embodiment of the invention, host-side routing uses pointer swapping to avoid data copying and reduce CPU overhead.

[0046] Furthermore, based on the above embodiments, this invention also provides a lattice Boltzmann simulation device that hides communication latency, applied to a GPU, wherein the GPU is pre-allocated with subdomains; and the GPU pre-creates CUDA streams and CUDA events for inter-stream synchronization; wherein the CUDA streams include computation streams and communication streams, and the CUDA events include boundary collision completion events and communication completion events; the device relies on page-locked memory on the host side as a transit buffer for data exchange between GPUs, and the page-locked memory is used to support asynchronous DMA transfer, enabling memory copy operations to be executed concurrently with the GPU kernel; specifically, as shown... Figure 4The diagram shows a structural schematic of a lattice Boltzmann simulation device for hiding communication delays. The device includes: Boundary calculation module 40 is used to trigger the GPU to perform boundary collision calculation on the boundary column of the subdomain in the calculation flow at each time step to obtain boundary data, and the boundary data is used to send to the neighboring GPUs of the current GPU; The internal computing module 42 is used to respond to the completion of the boundary collision calculation and continue to start the collision kernel in the computing flow to perform internal collision calculation on the internal columns in the subdomain of the GPU; Packaging module 44 is used to concurrently and synchronously pack and send the boundary data to the contiguous buffer of the GPU through the communication stream during the internal collision calculation process of the computing stream to obtain packaged data; and asynchronously copy the packaged data from the contiguous buffer of the GPU to the page-locked memory on the host side; wherein, the host side is used to perform buffer swap according to the packaged data of the GPU to send the packaged data to the neighboring GPU of the current GPU; The writing module 46 is used to receive the packaged data of the neighboring GPU sent by the host through the communication stream, asynchronously copy it to the GPU's video memory, and write the packaged data of the neighboring GPU into the GPU's ghost layer; The completion module 48 is used to respond to the completion of the ghost layer write, perform a pull-type streaming migration operation in the computation stream, and start the boundary condition kernel to apply physical boundary constraints to the entire domain to complete the simulation process of that time step.

[0047] Furthermore, embodiments of the present invention also provide a lattice Boltzmann simulation system that hides communication delays, specifically, as follows: Figure 5 The diagram shown is a block diagram of a lattice Boltzmann simulation system that hides communication delays. The system includes: Multiple GPUs 500, wherein each of the multiple GPUs is configured with the aforementioned lattice Boltzmann simulation device for hiding communication delays; wherein, for ease of explanation, Figure 5 The example uses two GPUs. In other embodiments, the number of GPUs can be set according to actual usage. This embodiment of the invention does not limit this.

[0048] The asynchronous stream scheduling unit 501 is used to manage the computing streams and communication streams of each GPU, and realizes inter-stream dependency synchronization through CUDA events to ensure that computing and communication are correctly overlapped. Page-locked memory buffer unit 502 is used to provide page-locked memory on the host side and to act as an intermediary for data exchange between the GPUs; The host 503 is used to decompose the global computing domain into multiple subdomains, distribute tasks to the GPUs, perform buffer swapping based on the packaged data of each GPU to send the packaged data to the neighboring GPUs corresponding to each GPU, and collect macroscopic physical quantity data of the subdomains of the GPUs. The visualization output unit 504 is used to save the merged global field data as a visualization format file.

[0049] Furthermore, the aforementioned asynchronous flow scheduling unit is also used to: trigger the communication flow to perform boundary data packaging and asynchronous copying through the boundary collision completion event, and trigger the computing flow to perform pull-type streaming migration operation after the ghost layer is updated through the communication completion event, so that the data exchange performed by the communication flow and the internal column collision calculation performed by the computing flow concurrently overlap in time, and a cross-time step pipeline is formed between adjacent time steps.

[0050] Furthermore, for ease of understanding, the following uses a dual-GPU asynchronous parallel simulation of flow around a cylinder to further illustrate the lattice Boltzmann simulation method for hiding communication delays in this embodiment of the invention. Specifically, it includes two GPUs: GPU0 and GPU1. A two-dimensional flow around a cylinder is used as the test case, with a computational domain size of 20D×20D, a cylinder diameter D=500 (lattice unit), a grid size of 10000×10000 (i.e., 100 million nodes), a Reynolds number Re=200, and an inlet velocity u0=0.04. Parallel simulation is performed using dual NVIDIA RTX 4090 GPUs on the CUDA 12.0 software platform. The specific steps include: Step 1: Domain Decomposition and Ghost Layer Assignment: Specifically, the global computation domain has a grid width of Nx = 10000 along the X-axis, allocated to two GPUs, with each GPU responsible for 5000 columns of the actual grid. The subdomain has 5000 actual columns, and after adding the left and right ghost layers, the allocated column count is anx = 5002. The ghost layers are used to store the boundary data of adjacent subdomains.

[0051] GPU0: Global X-axis range [0, 5000), real column index 1~5000, left ghost column index 0, right ghost column index 5001; GPU1: Global X-axis range [5000, 10000), real column index 1~5000, left ghost column index 0, right ghost column index 5001; Step 2: Resource allocation and optimization configuration on the GPU side: Allocate video memory on each GPU, including the following: Distribution function arrays: f[9][5002×10000] and fs[9][5002×10000] (double precision); Macroscopic quantity array: rho[5002×10000], ux[5002×10000], uy[5002×10000]; Solid marker array: solid[5002×10000] (integer); Communication buffers: d_bufL[9×10000], d_bufR[9×10000] (double precision); The constant data of the fluid simulation model is stored in constant content. For example, taking the D2Q9 lattice model as an example, the constant data (cx[9], cy[9], w[9], opp[9]) of the D2Q9 lattice model is copied to the constant memory of the GPU.

[0052] Create two streams for each GPU: Computation stream (streamComp): cudaStreamCreate(&streamComp[g]); Communication stream (streamComm): cudaStreamCreate(&streamComm[g]); Create two events for each GPU: Boundary collision complete event (evBoundaryDone): cudaEventCreate(&evBoundaryDone[g]); Communication completion event (evCommDone): cudaEventCreate(&evCommDone[g]); Allocate page-locked memory on the host side: cudaMallocHost(&h_bufL[g], sizeof(double) * 9 * Ny); cudaMallocHost(&h_bufR[g], sizeof(double) * 9 * Ny); Step 3: Initialize the flow field: Initialize on each GPU: Density field: rho is set to 1.0; Velocity field: ux, uy are set to 0.0; Inlet boundary column (global x=0) ux is set to u0=0.04; Solid marking: Mark solid nodes based on cylindrical geometry (center (2500, 5000), radius 250); Distribution function f: initialized from equilibrium state, f_eq = w[q] * rho * (1 + 3(cx*u+cy*v) + 4.5*(cx*u+cy*v)^2 - 1.5*(u^2+v^2)); Step 4: Asynchronous parallel iterative computation; Set the total number of iterations maxIter=10000, and perform the following operations at each time step (taking GPU0 as an example, GPU1 is symmetrical): (4.1) Boundary column collision (computation flow); Perform boundary collision calculations for the boundary columns in the computation flow, and record the boundary collision completion event after the calculation is complete.

[0053] (4.2) Packaging and Asynchronous D2H: After the boundary collision calculation is completed, the communication stream concurrently executes the boundary data packing into the GPU's contiguous buffer, and then asynchronously copies the packed data from the contiguous buffer to the host's page-locked memory; (4.3) Internal column collision: After the boundary collision calculation is completed, the collision kernel is started again in the computation flow to perform internal collision calculation on the internal columns in the subdomain of the GPU; (4.4) Host-side routing and asynchronous H2D: After receiving the packaged data, the host performs a buffer swap and sends the packaged data to the neighboring GPU of the current GPU. That is, in this embodiment of the invention, the packaged data of GPU0 is sent to GPU1.

[0054] (4.5) Flow cytometry and boundary conditions: After the computation stream waits for the communication completion time, it starts the streaming kernel to perform pull-based streaming migration operations, and combines bounce boundary processing for solid nodes. Then, it starts the boundary condition kernel to apply physical boundary constraints. (4.6) Macroeconomic quantity update: The update of macroscopic quantities is implemented in the computation flow. Specifically, the macroscopic quantity kernel is started in the computation flow. Through the macroscopic quantity kernel, the macroscopic physical quantities of each grid point are calculated based on the updated global distribution function after applying physical boundary constraints.

[0055] (4.7) Synchronization and Monitoring: In practice, synchronization occurs every 2000 steps, outputting the velocity value of the probe point (global coordinates (5000, 5000)) to monitor convergence. A VTK format file is output every 10000 steps.

[0056] Step 5: Performance Statistics In this embodiment of the invention, the time consumption of each stage can also be recorded, such as calculating MLUPS (Million LatticeUpdates Per Second). In this embodiment, the asynchronous version clock time is 366.317 seconds, and the MLUPS is 2729.87, which is an improvement of approximately 4.1% compared to the baseline version (381.286 seconds, 2622.70 MLUPS). Communication overhead is effectively hidden, and the collision calculation + communication stage accounts for 28.3%, indicating that the internal column calculation and communication achieve good overlap.

[0057] Furthermore, for ease of explanation, Figure 6 A comparative diagram of simulation performance is also shown, corresponding to the aforementioned two-dimensional flow around a cylinder. Figure 6 The x-coordinate represents the diameter D of the cylinder. Figure 6 In the graph, (a) represents the total time spent, and the vertical axis represents the total time spent; where, Figure 6 Figure (a) shows the time consumption as the cylinder diameter D increases from 100 to 600 and the corresponding number of grids increases. In Figure (a), (1) bar chart represents the time consumption of the traditional calculation method, and (2) bar chart represents the time consumption of the lattice Boltzmann simulation method with hidden communication delay provided in the embodiment of the present invention. It can be seen that the total time consumption of the lattice Boltzmann simulation method with hidden communication delay provided in the embodiment of the present invention is shortened.

[0058] further, Figure 6 (b) in the figure represents the comparison curve of computing power, that is, the vertical axis corresponds to computing power, as shown in MLUPS above, where, Figure 6 In (b), curve (1) represents the computing power of the lattice Boltzmann simulation method with hidden communication delay provided in the embodiments of the present invention, and curve (2) represents the computing power of the traditional computing method. Figure 6 The traditional computing method in this context refers to the traditional synchronous computing method, where computation and communication are performed serially. Figure 6 It can be seen that the lattice Boltzmann simulation method for hiding communication delay provided in the embodiments of the present invention is superior to the traditional calculation method in terms of computing power. It can not only reduce waiting time and hide communication delay, but also significantly improve effective computing power.

[0059] In summary, the lattice Boltzmann simulation method, apparatus, and system for hiding communication delays provided in the embodiments of the present invention have the following beneficial effects: (1) Significantly reduce the proportion of communication overhead: By overlapping asynchronous computation and communication, communication time is effectively hidden within computation. Real-world testing shows that for a dual-GPU system, as the mesh size increases from 2000×2000 (4 million nodes) to 12000×12000 (144 million nodes), the proportion of pure communication (Halo exchange) in the clock time decreases from 6.1% to 1.8% in the baseline version. Meanwhile, in the asynchronous version, the total time spent on boundary column collisions and communication (Collision + Halo) remains stable at 28%-30%, demonstrating a good overlap between internal column computation and communication, and successfully hiding communication latency.

[0060] (2) It can improve the overall throughput of the simulation; (3) It can achieve near-linear weak scalability; That is, as the mesh size increases from 4 million to 144 million nodes (36 times larger), the clock time of the dual-GPU system increases from 15 seconds to 528 seconds (35.2 times larger), while MLUPS remains between 2600 and 2750, indicating good weak scalability and the ability to efficiently handle large-scale simulation problems.

[0061] (4) It helps to maximize resource utilization; Through dual-stream design and asynchronous memory copying, the GPU continuously performs internal column collision calculations during communication, achieving near 100% computational resource utilization. The issue of GPU idleness during communication in the baseline version is fundamentally resolved.

[0062] (5) The programming model is simple and highly portable; The asynchronous model based on CUDA streams and events allows for clear code structure and easy expansion to more GPUs (e.g., 4-card, 8-card) and different hardware platforms (e.g., AMD ROCm). The column collision strategy and ghost layer design are universal and can be extended to 3D LBM and other parallel computing models based on neighborhood communication.

[0063] (6) The simulation results are accurate and reliable; The simulation results, as shown by probe point velocity monitoring, converge stably at various grid sizes and qualitatively match those of relevant standard examples (such as the flow around a cylinder in DOI:10.1063 / 5.0195370), verifying the correctness of the method provided in this embodiment of the invention.

[0064] The apparatus and system provided in this invention have the same technical features as the lattice Boltzmann simulation method for hiding communication delay provided in the above embodiments, so they can also solve the same technical problems and achieve the same technical effects.

[0065] Furthermore, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0066] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.

[0067] Furthermore, embodiments of the present invention also provide a schematic diagram of the structure of an electronic device, such as... Figure 7 The diagram shows the structure of the electronic device, which includes a processor 71 and a memory 70. The memory 70 stores computer-executable instructions that can be executed by the processor 71, and the processor 71 executes the computer-executable instructions to implement the above-described method.

[0068] exist Figure 7 In the illustrated embodiment, the electronic device further includes a bus 72 and a communication interface 73, wherein the processor 71, the communication interface 73, and the memory 70 are connected via the bus 72.

[0069] The memory 70 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 73 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 72 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 72 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0070] Processor 71 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 71 or by software instructions. The processor 71 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor 71 reads the information in the memory and uses its hardware to complete the aforementioned method.

[0071] The computer program product of the lattice Boltzmann simulation method, apparatus and system for hiding communication delay provided by the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0072] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0073] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0074] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0075] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0076] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A lattice Boltzmann simulation method for hiding communication delay, characterized in that, The method is applied to GPUs, which are pre-allocated with subdomains and pre-created with CUDA streams and CUDA events for inter-stream synchronization. The CUDA streams include computation streams and communication streams, and the CUDA events include boundary collision completion events and communication completion events. The method relies on page-locked memory on the host side as a buffer for data exchange between GPUs. This page-locked memory supports asynchronous DMA transfers, enabling memory copy operations to be executed concurrently with the GPU kernel. The method includes: Within each time step, the GPU is triggered to perform boundary collision calculation on the boundary column of the subdomain in the computation flow to obtain boundary data, which is used to send to the neighboring GPUs of the current GPU; In response to the completion of the boundary collision calculation, the collision kernel is started again in the calculation flow to perform internal collision calculation on the internal columns in the subdomain of the GPU; During the internal collision calculation process, the boundary data is concurrently packaged into the GPU's contiguous buffer via the communication stream to obtain packaged data. The packaged data is then asynchronously copied from the GPU's contiguous buffer to the host's page-locked memory. The host performs buffer swapping based on the GPU's packaged data to send the packaged data to the current GPU's neighboring GPUs. Furthermore, the communication stream employs a bidirectional buffer design, independently packaging and transmitting the packaged data at the left and right boundaries, supporting simultaneous data exchange with both the left and right neighboring GPUs. The system receives the packaged data of the neighboring GPU sent by the host through the communication stream, copies it asynchronously to the GPU's video memory, and writes the packaged data of the neighboring GPU into the GPU's ghost layer. In response to the completion of the ghost layer write, a pull-type streaming migration operation is performed on the computation stream, and a boundary condition kernel is started to apply physical boundary constraints to the entire domain to complete the simulation process of this time step; After applying the physical boundary constraints, a macroscopic kernel is initiated in the computational flow; The macroscopic physical quantities at each grid point are calculated using the macroscopic kernel based on the updated global distribution function after applying the physical boundary constraints. After obtaining the macroscopic physical quantity, the boundary column collision calculation for the next time step is initiated based on the macroscopic physical quantity. Through the coordination of the computation flow and the communication flow, the boundary column collision calculation and internal column collision calculation for the next time step are overlapped with the asynchronous copy and packet data transmission for the current time step in a cross-time step pipeline.

2. The method according to claim 1, characterized in that, The method further includes: After the boundary collision calculation is completed, the boundary collision completion event is recorded in the calculation stream. The communication stream responds to the boundary collision completion event to trigger the communication stream to perform the packaging and asynchronous copying operation of the boundary data; After the packaged data of the neighboring GPU is written to the ghost layer, the communication completion event is recorded in the communication stream; The computing stream responds to the communication completion event to trigger the computing stream to perform the pull-based streaming migration operation.

3. The method according to claim 1, characterized in that, The method further includes: The number of available GPUs is obtained, and the global computing domain is divided into multiple subdomains matching the number of GPUs in one dimension along the main direction based on the number. Each GPU is assigned a continuous subdomain, each subdomain includes multiple columns of grids, and each subdomain is additionally assigned a ghost layer with one column on the left and one column on the right to store the boundary data of adjacent subdomains.

4. The method according to claim 3, characterized in that, The method further includes: Allocate video memory on each GPU to store data in the subdomain allocated to that GPU; and, The CUDA stream and the CUDA event for inter-stream synchronization are created for each GPU, and the page-locked memory is allocated on the host side as a transit buffer for data exchange between the GPUs.

5. The method according to claim 1, characterized in that, The method further includes: At specified time intervals, macroscopic physical quantity data of each GPU subdomain are collected to the host and merged into global field data on the host. Output a visualization format file containing the global field data, which is used for visualization analysis.

6. A lattice Boltzmann simulation device for hiding communication delay, characterized in that, Applied to a GPU, the GPU is pre-allocated with subdomains; and the GPU pre-creates CUDA streams and CUDA events for inter-stream synchronization; wherein, the CUDA streams include computation streams and communication streams, and the CUDA events include boundary collision completion events and communication completion events; the device relies on page-locked memory on the host side as a transit buffer for data exchange between GPUs, and the page-locked memory is used to support asynchronous DMA transfer, enabling memory copy operations to be executed concurrently with the GPU kernel; The device includes: The boundary calculation module is used to trigger the GPU to perform boundary collision calculation on the boundary column of the subdomain in the calculation flow at each time step to obtain boundary data, which is used to send to the neighboring GPUs of the current GPU; An internal computing module is used to respond to the completion of the boundary collision calculation and continue to start a collision kernel in the computing flow to perform internal collision calculation on the internal columns in the subdomain of the GPU. A packing module is used to concurrently and synchronously pack and send the boundary data to the GPU's contiguous buffer via the communication stream during the internal collision calculation process of the computing stream, obtaining packed data; and asynchronously copy the packed data from the GPU's contiguous buffer to the page-locked memory on the host side; wherein, the host side is used to perform buffer swapping based on the GPU's packed data to send the packed data to the current GPU's neighboring GPUs; and the communication stream adopts a bidirectional buffer design, independently packing and transmitting the packed data at the left and right boundaries, supporting simultaneous data exchange with the left neighboring GPU and the right neighboring GPU; The writing module is used to receive the packaged data of the neighboring GPU sent by the host through the communication stream, asynchronously copy it to the GPU's video memory, and write the packaged data of the neighboring GPU into the GPU's ghost layer; The completion module is used to respond to the completion of the ghost layer write, perform a pull-type streaming migration operation in the computation stream, and start the boundary condition kernel to apply physical boundary constraints to the entire domain to complete the simulation process of this time step; The device is also used to: initiate a macroscopic kernel in the computational flow after the physical boundary constraints are applied; The macroscopic physical quantities at each grid point are calculated using the macroscopic kernel based on the updated global distribution function after applying the physical boundary constraints. After obtaining the macroscopic physical quantity, the boundary column collision calculation for the next time step is initiated based on the macroscopic physical quantity. Through the coordination of the computation flow and the communication flow, the boundary column collision calculation and internal column collision calculation for the next time step are overlapped with the asynchronous copy and packet data transmission for the current time step in a cross-time step pipeline.

7. A lattice Boltzmann simulation system that hides communication delay, characterized in that, The system includes: Multiple GPUs, each of the multiple GPUs being configured with the lattice Boltzmann simulation device for hiding communication delays as described in claim 6; The asynchronous stream scheduling unit is used to manage the computation and communication streams of each GPU. It achieves inter-stream dependency synchronization through CUDA events to ensure that computation and communication are correctly overlapped. Page-locked memory buffer unit, used to provide page-locked memory on the host side and act as an intermediary for data exchange between the GPUs; On the host side, it is used to decompose the global computing domain into multiple subdomains, distribute tasks to the GPUs, and perform buffer swapping based on the packaged data of each GPU to send the packaged data to the neighboring GPUs corresponding to each GPU, as well as collect macroscopic physical quantity data of the subdomains of the GPUs. The visualization output unit is used to save the merged global field data as a visualization format file.

8. The system according to claim 7, characterized in that, The asynchronous stream scheduling unit is also used for: The boundary collision completion event triggers the communication stream to perform boundary data packaging and asynchronous copying, and the communication completion event triggers the computing stream to perform pull-based streaming migration operation after the ghost layer is updated, so that the data exchange performed by the communication stream and the internal column collision calculation performed by the computing stream concurrently overlap in time, and a cross-time step pipeline is formed between adjacent time steps.