Simulation method of hydrological and hydrodynamic processes based on multi-GPU

Through multi-GPU parallel computing and data exchange, the problem of low simulation efficiency of large-scale regional hydrological and hydrodynamic processes is solved, and high-performance simulation is achieved. It is suitable for hydrological and hydrodynamic process simulation in large-scale cities and river basins, and improves flood disaster emergency decision-making. efficiency.

CN114385358BActive Publication Date: 2024-09-24INST OF EARTH ENVIRONMENT CHINESE ACAD OF SCI +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202111674002.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-09-24
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing numerical simulation methods for hydrological and hydrodynamic processes are inefficient in large-scale regional simulations, making it difficult to simulate large-scale cities and watersheds, and single-GPU parallel computing cannot significantly improve computing efficiency.

Method used

Using a multi-GPU parallel computing method, the total calculation area is divided into multiple sub-areas, each GPU performs parallel calculations, and achieves efficient hydrological and hydrodynamic process simulation through data exchange and communication, using the Godunov format finite volume method and steady seepage or The Green-Ampt infiltration method calculates the infiltration value and uses CUDA flow or P2P technology for data communication.

Benefits of technology

It achieves high-performance simulation of hydrological and hydrodynamic processes in large-scale cities and river basins, significantly improves calculation efficiency, can quickly simulate flood evolution processes, and provides technical support for flood disaster emergency decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114385358B
    Figure CN114385358B
Patent Text Reader

Abstract

The multi-GPU-based hydrological and hydrodynamic process simulation method of the present invention is specifically as follows: initial assignment of rainfall, infiltration, Manning coefficient, and terrain elevation; dividing the calculation area into sub-areas equal to the number of GPUs, the number of GPUs is not less than 2, and filling the single-row sub-areas where every two sub-areas overlap; copying each variable from the CPU to each GPU; calculating the hydrological process of rainfall and infiltration, and performing parallel calculation of flux terms and source terms in each GPU; using CUDA streams and P2P methods to achieve exchange and communication of flow and water depth data between multiple GPUs; after the calculation task is completed, copying the simulation data of each GPU to the CPU for merging; sorting and analyzing the simulation results, and drawing a dynamic diagram of the evolution of the surface runoff process. The present invention uses a multi-GPU parallel calculation method to realize a high-performance parallel calculation process of hydrological and hydrodynamic numerical simulation, with more significant acceleration of calculation performance, and can achieve rapid simulation of large-scale areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of numerical simulation of hydrological and hydrodynamic processes, and relates to a hydrological and hydrodynamic process simulation method based on multiple GPUs. Background Art

[0002] Global warming and urbanization have led to frequent floods. Severe floods can cause damage to buildings and facilities, deterioration of the ecological environment, casualties and economic losses, and a series of other disasters. By simulating the hydrological and hydrodynamic processes of the flood evolution process, the dynamic visualization analysis of the flood process can be realized, the prediction and response capabilities of flood disasters can be improved, and the losses of rainstorm floods can be greatly reduced. Numerical simulation of floods is an effective tool for flood risk assessment. Hydrological models and hydrodynamic models are often used to simulate flood processes. Hydrodynamic models have the advantage of accurately simulating the movement of floods compared to hydrological models, and hydrodynamic models are less dependent on too many parameters. By simulating the flood process under complex terrain conditions, the arrival time and flood depth of the flood event at a specific location at a certain moment are calculated. By building a numerical model that couples the hydrological and hydrodynamic processes, the model takes into account the infiltration process, rainfall process, surface process, etc., and can achieve accurate simulation of the flood process. At the same time, the rapid development and application of GPU parallel computing technology in recent years has provided a powerful technical means for realizing high-performance numerical simulation of hydrological and hydrodynamic processes.

[0003] Efficient simulation of flood hydrological and hydrodynamic processes can improve the efficiency of flood control and drainage work and save time costs. The existing numerical simulation methods of hydrological and hydrodynamic processes can accurately simulate the evolution of floods, but the computing performance is still insufficient, and the ability to predict hydraulic information of floods also needs to be improved. In terms of large-scale regional simulation, most numerical simulation methods cannot simulate large-scale urban areas and large-scale river basins; in terms of fine terrain simulation, there is also a problem of low simulation efficiency. At present, a few scholars have introduced GPU parallel computing technology in the simulation methods of hydrological and hydrodynamic processes, but they are mainly focused on the development and application of single GPU parallel computing technology. On the basis of ensuring high simulation accuracy, the numerical simulation method of hydrological and hydrodynamic processes using a single GPU cannot significantly improve the computational efficiency of the simulation of the research area; under the condition of limited hardware equipment conditions, the numerical simulation of large-scale areas cannot be successfully completed. Summary of the invention

[0004] The purpose of the present invention is to provide a multi-GPU based hydrological and hydrodynamic process simulation method, which solves the problem of difficulty in simulating large-scale regional flood surface hydrological and hydrodynamic processes and low simulation efficiency in the prior art.

[0005] The technical solution adopted by the present invention is a hydrological and hydrodynamic process simulation method based on multiple GPUs, which is specifically implemented according to the following steps:

[0006] Step 1: Initialize the initial variables and set the time step value and total duration value of the calculation;

[0007] Step 2: Divide the total computing area into sub-areas equal to the number of GPUs, which is no less than 2, and fill the outermost single-row sub-areas in the overlapping area of ​​every two sub-areas;

[0008] Step 3: Allocate memory for each variable in each GPU, and then copy it from the CPU to each GPU, setting the boundary conditions for multi-GPU parallel computing;

[0009] Step 4: parallel calculation of hydrological and hydrodynamic processes is performed in multiple GPUs. The flux and source term of each grid cell interface are calculated in each GPU according to the set time step, and a time step calculation is completed.

[0010] Step 5, calculate the flow and water depth data according to the calculation result of one time step, and exchange and communicate the flow and water depth data calculated by the single-row sub-area filled in each GPU among multiple GPUs;

[0011] Step 6: Repeat steps 4 and 5 according to the setting requirements of the total duration of numerical calculation, and perform cyclic calculations in sequence until the cyclic calculation tasks of all time steps are completed, and then copy the flow and water depth data calculated by each GPU to the CPU for merging and output;

[0012] Step 7, sort and analyze the flow and water depth simulation data results output by the CPU, draw a dynamic diagram of the evolution of the surface runoff process, and count the time to complete the numerical calculation in multiple GPUs.

[0013] The present invention is also characterized in that:

[0014] In step 1, the initial variables include: rainfall, infiltration, Manning coefficient and terrain elevation.

[0015] Step 2 is implemented as follows:

[0016] Step 2.1, set the number of GPUs to k, k ≥ 2, the number of rows and columns of the total computing area to c rows and d columns respectively, the total number of grids in the total computing area to c × d, divide the total computing area into k sub-areas, and the computing area size of each sub-area is c / k rows × d columns;

[0017] Step 2.2, fill the outermost single-row sub-region where every two sub-regions intersect, and in the overlapping area of ​​two adjacent sub-regions, copy their outer single-row calculation units to the outermost layer of the opposite sub-region to form a new sub-calculation region.

[0018] In step 3, all variables are allocated to memory in each GPU, including rainfall, infiltration, Manning coefficient, terrain elevation, flow rate and water depth. Then, each variable is copied from the CPU to each GPU. At the same time, the above variables in the fill area are allocated to memory in the GPU, and the flow rate and water depth data are defined and stored in multiple GPUs, and the boundary conditions for multi-GPU parallel computing are set.

[0019] In step 4, the parallel calculation method is: using the finite volume method in Godunov format to solve the control equation, and further using the steady infiltration or Green-Ampt infiltration method in the control equation to calculate the infiltration value;

[0020] The control equation is specifically expressed as:

[0021]

[0022]

[0023]

[0024] Where:

[0025] q——for q x ,q y , h variable vector, where q x ,q y are the single width flow in x and y directions respectively, and h is the water depth;

[0026] f, g——flux vectors in x and y directions;

[0027] S——is the source term vector, where S=S b +S f Including bottom slope source term S b , friction source term S f ;

[0028] z b —— is the terrain elevation;

[0029] u, v——flow velocity in x and y directions, where q x =uh and q y =vh;

[0030] g——Gravity coefficient, g=9.81m / s 2 ;

[0031] C f ——is the groove bottom roughness coefficient, where C f =gn 2 / h 1 / 3 , n is the Manning coefficient;

[0032] i——rainfall P and infiltration f p The source term generated, where i = Pf p , respectively represent net rainfall, rainfall, and infiltration, mm / h;

[0033] Infiltration p The calculation method is as follows: if the study area is an urban area, the steady infiltration method is used, and the infiltration value is a constant, which is equivalent to the rainfall value of the municipal pipe network drainage standard in the study area; if the study area is a non-urban watershed area, the Green-Ampt infiltration method is used. The specific expression of the Green-Ampt infiltration method is:

[0034]

[0035] Where:

[0036] f p ——Soil infiltration rate, cm / min;

[0037] K s ——Saturated hydraulic conductivity value, cm / min;

[0038] d——depth of water accumulation on the soil surface, cm;

[0039] L s —— is the depth of the wetting front, cm;

[0040] —— is capillary suction, cm.

[0041] In step 5, when the number of GPUs is not greater than 5, CUDA stream technology is used to control multiple GPUs. The intermediate process requires CPU communication. First, the flow and water depth data of each filled single-row sub-area obtained after a time step calculation are copied from each GPU to the CPU for storage, and then the values ​​in the CPU are copied to the boundary of each GPU for data filling and exchange communication calculations again.

[0042] In step 5, when the number of GPUs is greater than 5, in order to reduce the communication time between GPU and CPU, P2P or Peer to Peer technology is used to realize direct data communication between multiple GPUs. The outer single-row computing units of two adjacent sub-areas are directly copied to the outermost layer of the opposite sub-area in the GPU, and the flow and water depth data are directly filled and exchanged through GPU-GPU.

[0043] The specific method of step 6 is as follows:

[0044] Step 6.1, according to the setting requirements of the total duration of numerical calculation, perform cyclic calculations in accordance with steps 4 and 5 in sequence until all cyclic calculation tasks are completed;

[0045] Step 6.2, copy the flow and water depth data results calculated by k GPUs to the CPU for merging, copy the latest numerical results of the sub-calculation area c / k rows × d columns before filling each sub-area to the CPU, merge the data into the entire calculation unit c rows × d columns, and then write the merged flow and water depth simulation data into the .dat file.

[0046] In step 7, the flow and water depth simulation data output by the CPU are sorted and analyzed, and a dynamic result diagram of the evolution of the surface runoff process is drawn based on the simulation results. The time to complete the numerical calculation in multiple GPUs is counted, and the accelerated computing efficiency of this simulation can be calculated.

[0047] The beneficial effects of the present invention are as follows: the hydrological and hydrodynamic process simulation method based on multiple GPUs can not only accurately simulate the surface hydrological and hydrodynamic process, but also realize high-performance simulation of the hydrological and hydrodynamic process, and can also carry out high-performance simulation of the surface runoff process during floods; at the same time, the high-performance simulation method has more significant accelerated computing performance than the existing single-GPU and multi-CPU parallel computing hydrological and hydrodynamic process simulation method, and can also realize high-performance simulation of the hydrological and hydrodynamic process of large-scale cities and river basins; the multi-GPU parallel computing method is adopted to realize the data exchange and communication process involving multiple GPUs in the hydrological and hydrodynamic process simulation, and also realize the multi-GPU parallel computing of the hydrological and hydrodynamic process. The high-performance simulation method realizes the rapid simulation of the hydrological and hydrodynamic process in the process of flood evolution, providing strong technical support for improving the time and efficiency of emergency decision-making in flood disasters. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of a hydrological and hydrodynamic process simulation method based on multiple GPUs of the present invention;

[0049] Figure 2 It is a schematic diagram of sub-area division and data communication process of multi-GPU parallel computing based on CUDA stream in the hydrological and hydrodynamic process simulation method based on multi-GPU of the present invention;

[0050] Figure 3 It is a schematic diagram of sub-area division and data communication process of multi-GPU parallel computing based on P2P in the hydrological and hydrodynamic process simulation method based on multi-GPU of the present invention;

[0051] Figure 4This is a diagram of the simulation results of the watershed flood process in the hydrological and hydrodynamic process simulation method based on multiple GPUs of the present invention. DETAILED DESCRIPTION

[0052] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0053] The present invention provides a method for simulating hydrological and hydrodynamic processes based on multiple GPUs, such as Figure 1 As shown, the implementation is carried out according to the following steps:

[0054] Step 1: Initialize the initial variables rainfall, infiltration, Manning coefficient and terrain elevation, set the time step value and total duration value of the calculation, use CUDAC++ language to write a program to perform numerical calculations of hydrological and hydrodynamic processes, and initialize all variables involved in the calculation, including terrain elevation, water level, rainfall, infiltration, flow, etc.;

[0055] Step 2: Divide the total computing area into sub-areas equal to the number of GPUs, which should be no less than 2, and fill the outermost single-row sub-areas in the overlapping area of ​​every two sub-areas. The specific method is as follows:

[0056] Step 2.1, set the number of GPUs to k, k ≥ 2, the number of rows and columns of the total computing area to c rows and d columns respectively, the total number of grids in the total computing area to c × d, divide the total computing area into k sub-areas, and the computing area size of each sub-area is c / k rows × d columns;

[0057] Step 2.2, fill the outermost single-row sub-region where every two sub-regions intersect, and in the overlapping area of ​​two adjacent sub-regions, copy their outer single-row calculation units to the outermost layer of the opposite sub-region to form a new sub-calculation region.

[0058] Step 3: All variables are allocated to memory in each GPU, including rainfall, infiltration, Manning coefficient, terrain elevation, flow rate, and water depth. Then, each variable is copied from the CPU to each GPU. At the same time, the above variables in the fill area are allocated to memory in the GPU. The flow rate and water depth data are defined and stored in multiple GPUs, and the boundary conditions for multi-GPU parallel computing are set.

[0059] Step 4: Based on CUDA stream control, each GPU is used to perform multi-GPU parallel computing of hydrological and hydrodynamic processes. The hydrological processes and surface hydrodynamic processes such as rainfall, infiltration, runoff and runoff in the entire study area are parallelized, and the flux and source term of each grid cell interface are calculated in each GPU according to the set time step to complete a time step calculation.

[0060] The parallel calculation method is: using the Godunov format finite volume method to solve the control equation, and further using the steady infiltration or Green-Ampt infiltration method in the control equation to calculate the infiltration value;

[0061] The control equation is specifically expressed as:

[0062]

[0063]

[0064]

[0065] Where:

[0066] q——for q x ,q y , h variable vector, where q x ,q y are the single width flow in x and y directions respectively, and h is the water depth;

[0067] f, g——flux vectors in x and y directions;

[0068] S——is the source term vector, where S=S b +S f Including bottom slope source term S b , friction source term S f ;

[0069] z b —— is the terrain elevation;

[0070] u, v——flow velocity in x and y directions, where q x =uh and q y =vh;

[0071] g——Gravity coefficient, g=9.81m / s 2 ;

[0072] C f ——is the groove bottom roughness coefficient, where C f =gn 2 / h 1 / 3 , n is the Manning coefficient;

[0073] i——rainfall P and infiltration f p The source term generated, where i = Pf p , respectively represent net rainfall, rainfall, and infiltration, mm / h;

[0074] Infiltration pThe calculation method is as follows: if the study area is an urban area, the steady infiltration method is used, and the infiltration value is a constant, which is equivalent to the rainfall value of the municipal pipe network drainage standard in the study area; if the study area is a non-urban watershed area, the Green-Ampt infiltration method is used. The specific expression of the Green-Ampt infiltration method is:

[0075]

[0076] Where:

[0077] f p ——Soil infiltration rate, cm / min;

[0078] K s ——Saturated hydraulic conductivity value, cm / min;

[0079] d——depth of water accumulation on the soil surface, cm;

[0080] L s —— is the depth of the wetting front, cm;

[0081] —— is capillary suction, cm.

[0082] Step 5, calculate the flow and water depth data according to the calculation result of one time step, and exchange and communicate the flow and water depth data calculated by the single-row sub-area filled in each GPU among multiple GPUs;

[0083] CUDA stream or P2P is used to implement data communication between multiple GPUs. Figure 2 As shown in the figure, when the number of GPUs is not greater than 5, CUDA stream technology is used to control multiple GPUs. The intermediate process needs to go through CPU communication. First, the flow and water depth data of each filled single-row sub-area obtained after a time step calculation are copied from each GPU to the CPU for storage, and then the values ​​in the CPU are copied to the boundary of each GPU for data filling and exchange communication calculation again;

[0084] like Figure 3 As shown in the figure, when the number of GPUs is greater than 5, in order to reduce the communication time between GPU and CPU, P2P or Peer to Peer technology is used to realize direct data communication between multiple GPUs. The outer single-row computing units of two adjacent sub-areas are directly copied to the outermost layer of the opposite sub-area in the GPU, and the flow and water depth data are directly filled and exchanged through GPU-GPU.

[0085] The flow rate and water depth calculation formula is:

[0086]

[0087] Where:

[0088] ——single-width flow at time m+1 and time m;

[0089] Δt——time step;

[0090] F w (q m )——interface flux of grid cell;

[0091] S——source term vector;

[0092] Ω——the volume of control volume j;

[0093] l w ——is the w-th side length of the grid cell;

[0094] n w ——is the unit normal vector of the boundary of the grid cell.

[0095] h=max(0,z b -max(z bL ,z bR )) (6)

[0096] Where:

[0097] h is the water depth at the centroid of each grid cell;

[0098] z b ——is the bottom elevation at the centroid of each grid cell;

[0099] z bL 、z bR ——The bottom elevation of the left and right centroids of each grid cell.

[0100] Step 6: Calculate the flow and water depth data based on the calculation result of one time step, and exchange and communicate the flow and water depth data calculated for the single-row sub-area filled in each GPU among multiple GPUs. The specific method is as follows:

[0101] Step 6.1, according to the setting requirements of the total duration of numerical calculation, perform cyclic calculations in accordance with steps 4 and 5 in sequence until all cyclic calculation tasks are completed;

[0102] Step 6.2, copy the flow and water depth data results calculated by k GPUs to the CPU for merging, copy the latest numerical results of the sub-calculation area c / k rows × d columns before filling each sub-area to the CPU, merge the data into the entire calculation unit c rows × d columns, and then write the merged flow and water depth simulation data into the .dat file.

[0103] Step 7, sort and analyze the flow and water depth simulation data results output by the CPU, draw a dynamic diagram of the evolution of the surface runoff process, and count the time to complete the numerical calculation in multiple GPUs.

[0104] The flow and water depth simulation data output by the CPU are sorted and analyzed, and a dynamic result diagram of the surface runoff process evolution is drawn based on the simulation results, such as Figure 4 As shown in the figure, the time to complete the numerical calculation in multiple GPUs is counted, and the accelerated computing efficiency of this simulation can be calculated.

[0105] A multi-GPU-based hydrological and hydrodynamic process simulation method can not only accurately simulate the surface hydrological and hydrodynamic process, but also achieve high-performance simulation of the hydrological and hydrodynamic process, and can also carry out high-performance simulation of the surface runoff process during floods; at the same time, the high-performance simulation method has more significant acceleration computing performance than the existing single-GPU and multi-CPU parallel computing hydrological and hydrodynamic process simulation methods, and can also achieve high-performance simulation of the hydrological and hydrodynamic process of large-scale cities and river basins; the multi-GPU parallel computing method is adopted to realize the data exchange and communication process involving multiple GPUs in the hydrological and hydrodynamic process simulation, and also realize the multi-GPU parallel computing of the hydrological and hydrodynamic process. Through this high-performance simulation method, the rapid simulation of the hydrological and hydrodynamic process in the flood evolution process is realized, providing strong technical support for improving the time and efficiency of emergency decision-making in flood disasters.

Claims

1. A multi-GPU based hydrological and hydrodynamic process simulation method, characterized in that: Follow the steps below to implement it: Step 1: Initialize the initial variables and set the time step value and total duration value of the calculation; Step 2: Divide the total computing area into sub-areas equal to the number of GPUs, which is no less than 2, and fill the outermost single-row sub-areas in the overlapping area of ​​every two sub-areas; Step 3: Allocate memory for each variable in each GPU, and then copy it from the CPU to each GPU, setting the boundary conditions for multi-GPU parallel computing; Step 4: parallel calculation of hydrological and hydrodynamic processes is performed in multiple GPUs. The flux and source term of each grid cell interface are calculated in each GPU according to the set time step, and a time step calculation is completed. The parallel calculation method is: using the finite volume method in Godunov format to solve the control equation, and further using the steady infiltration or Green-Ampt infiltration method in the control equation to calculate the infiltration value; The control equation is specifically expressed as: (1) (2) (3) Where: q --for q x , q y 、h A variable vector, where q x , q y They are x and y Single-width flow in one direction, h for water depth; F , G --for x and y Directional flux vector; S ——is the source term vector, where Include bottom slope source term S b , friction source term S f ; z b —— is the terrain elevation; u , v --for x and y The flow velocity in the direction of and ; g ——is the gravity coefficient, m / s 2 ; C f ——is the groove bottom roughness coefficient, where , n is the Manning coefficient; i ——For rainfall P and infiltration rate The source term generated is , i Indicates net rainfall, P Indicates rainfall, represents the infiltration rate, cm / min; The infiltration rate The calculation method is as follows: if the study area is an urban area, the steady infiltration method is used, and the infiltration value is a constant, which is equivalent to the rainfall value of the municipal pipe network drainage standard in the study area; if the study area is a non-urban watershed area, the Green-Ampt infiltration method is used, and the Green-Ampt infiltration method is specifically expressed as: (4) Where: ——Soil infiltration rate, cm / min; ——Saturated hydraulic conductivity value, cm / min; d s ——The depth of water on the soil surface, cm; —— is the depth of the wetting front, cm; ——capillary suction, cm; Step 5, calculate the flow and water depth data according to the calculation result of one time step, and exchange and communicate the flow and water depth data calculated by the single-row sub-area filled in each GPU among multiple GPUs; Step 6: Repeat steps 4 and 5 according to the setting requirements of the total duration of numerical calculation, and perform cyclic calculations in sequence until the cyclic calculation tasks of all time steps are completed, and then copy the flow and water depth data calculated by each GPU to the CPU for merging and output; Step 7, sort and analyze the flow and water depth simulation data results output by the CPU, draw a dynamic diagram of the evolution of the surface runoff process, and count the time to complete the numerical calculation in multiple GPUs.

2. The method for simulating hydrological and hydrodynamic processes based on multiple GPUs according to claim 1, characterized in that: In step 1, the initial variables include: rainfall, infiltration, Manning coefficient and terrain elevation.

3. The multi-GPU based hydrological and hydrodynamic process simulation method according to claim 1, characterized in that: The step 2 is specifically implemented according to the following steps: Step 2.1, set the number of GPUs to k , k≥ 2 , The number of rows and columns in the total calculation area is c rows and d columns respectively, and the total number of grids in the total calculation area is c×d. The total calculation area is divided into k sub-regions, and the calculation area size of each sub-region is rows × d columns; Step 2.2, fill the outermost single-row sub-region where every two sub-regions intersect, and in the overlapping area of ​​two adjacent sub-regions, copy their outer single-row calculation units to the outermost layer of the opposite sub-region to form a new sub-calculation region.

4. The method for simulating hydrological and hydrodynamic processes based on multiple GPUs according to claim 1, characterized in that: In step 3, all variables are allocated to memory in each GPU, including rainfall, infiltration, Manning coefficient, terrain elevation, flow rate and water depth. Each variable is then copied from the CPU to each GPU, and the above variables in the fill area are allocated to memory in the GPU. The flow rate and water depth data are defined and stored in multiple GPUs, and the boundary conditions for multi-GPU parallel computing are set.

5. The method for simulating hydrological and hydrodynamic processes based on multiple GPUs according to claim 1, characterized in that: In step 5, when the number of GPUs is not greater than 5, CUDA stream technology is used to control multiple GPUs, and the intermediate process needs to go through CPU communication. First, the flow and water depth data of each filled single-row sub-area obtained after a time step calculation are copied from each GPU to the CPU for storage, and then the values ​​in the CPU are copied to the boundary of each GPU for data filling and exchange communication calculation again.

6. The method for simulating hydrological and hydrodynamic processes based on multiple GPUs according to claim 1, characterized in that: In step 5, when the number of GPUs is greater than 5, in order to reduce the communication time between the GPU and the CPU, P2P or Peer to Peer technology is used to realize direct data communication between multiple GPUs. The outer single-row computing units of two adjacent sub-areas are directly copied to the outermost layer of the opposite sub-area in the GPU, and the flow and water depth data are directly filled and exchanged through GPU-GPU. Communication calculation.

7. The method for simulating hydrological and hydrodynamic processes based on multiple GPUs according to claim 2, characterized in that: The specific method of step 6 is as follows: Step 6.1, according to the setting requirements of the total duration of numerical calculation, perform cyclic calculations in accordance with steps 4 and 5 in sequence until all cyclic calculation tasks are completed; Step 6.2, k The flow and water depth data results calculated by the GPU are copied to the CPU for merging, and each sub-area is filled with the previous sub-calculation area. The latest numerical results of rows × d columns are copied to the CPU, and the data is merged into the entire calculation unit c rows × d columns, and then the merged flow and water depth simulation data are written into the .dat file.

8. The method for simulating hydrological and hydrodynamic processes based on multiple GPUs according to claim 1, characterized in that: In step 7, the flow and water depth simulation data output by the CPU are sorted and analyzed, a dynamic result diagram of the evolution of the surface runoff process is drawn based on the simulation results, and the time to complete the numerical calculation in multiple GPUs is counted to calculate the accelerated computing efficiency of this simulation.

Citation Information

Cited By

  • Convolutional neural network accelerated open channel water flow model finite volume solving method

    CN122197621A