Thermal fluid high-order DNS large-scale parallel computing method based on domestic supercomputing

Through the large-scale parallel computing method of thermal fluid high-order DNS based on domestic supercomputer, using the recursive spectral bisection method and virtual segment grid construction, the problem of huge number of grids and huge computing requirements in reactor thermal hydraulic simulation has been solved, and improved It improves computing efficiency and resource utilization, and achieves high-precision DNS simulation.

CN118690679AInactive Publication Date: 2024-09-24UNIV OF SCI & TECH BEIJING +1

Patent Information

Application Number
CN202410722133.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively cope with the huge number of grids and huge computational requirements in high-order direct numerical simulation (DNS), especially in reactor thermal and hydraulic simulations, resulting in low computational efficiency.

Method used

The high-order DNS large-scale parallel computing method of thermal fluids based on domestic supercomputer is adopted, and the minimum basic unit segment grid is generated through professional grid generation tools. The recursive spectral bisection method is used for static area decomposition and dynamic load balancing to optimize distributed computing. and heterogeneous acceleration, building a grid of virtual segments to reduce storage requirements and I/O operations.

Benefits of technology

It significantly reduces grid generation and calculation complexity, improves calculation efficiency, optimizes resource utilization, meets the needs of high-precision DNS, and solves the challenges of traditional CFD in reactor core meshing and thermal fluid calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690679A
    Figure CN118690679A
Patent Text Reader

Abstract

The invention discloses a thermal fluid high-order DNS large-scale parallel computing method based on domestic supercomputing, and belongs to the field of high-performance computing and numerical simulation. According to the homemade supercomputing-based high-order DNS large-scale parallel computing method for the thermal fluid, the mapping process from the minimum basic unit section to the whole reactor core is realized aiming at the isomorphism characteristic of the reactor core, and the challenge faced by the traditional CFD when the grid division of the reactor core and the thermal fluid calculation are processed is solved. Compared with a traditional CFD calculation method, the method does not depend on generation and storage of a complete grid file of the whole reactor core, a grid generation and virtual segment construction strategy based on unit segments is adopted, and fine-grained optimization of the calculation process is performed based on a domestic super computer, so that the calculation efficiency is improved, and the calculation resource requirement is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of high performance computing and numerical simulation, and in particular to a large-scale parallel computing method for high-order DNS of thermal fluid based on a domestic supercomputer. Background Art

[0002] Numerical reactor thermal hydraulics has a strong engineering demand for high-order direct numerical simulation (DNS). In the reactor, the turbulence formed by complex geometry changes the flow and heat transfer characteristics of the coolant, which has an important impact on the safety and design of the reactor. The Reynolds-averaged Navier-Stokes (RANS) method commonly used in engineering has limited calculation accuracy and cannot perform high-fidelity simulation of reactor turbulence. In contrast, DNS has much smaller uncertainty and can provide more detailed and accurate flow field information. Although the low-order methods (first order and second order) commonly used in engineering are simple and stable in calculation, they cannot accurately capture turbulence. High-order methods have lower numerical dissipation and dispersion, and are more suitable for high-precision DNS. In addition, high-order methods can more accurately simulate the complex thermal hydraulic phenomena of reactors in small-scale and non-uniform fields (characteristics of the cooling circuit of compact cores), and can better meet the requirements of thermal fluid simulation of reactors.

[0003] Although many countries are actively researching high-order DNS for reactor thermal hydraulics (such as the NEAMS[1] project and the ECP[2] project), the development of technology in this field still faces many challenges. The main problems include the huge number of grids required for high-order DNS simulation and the extremely large corresponding computing requirements, which are difficult to effectively cope with with existing technologies. Figure 1 As shown in the figure, DNS is used to directly simulate full-scale vortices, and the grid scale needs to be smaller than the Kolmogorov scale. Large eddy simulation (LES) directly simulates large-scale vortices, and small-scale vortices are modeled through turbulence models. The required grid scale needs to reach the Taylor microscale. For the problem with an internal Reynolds number of 100,000, referring to Pope's [3] estimation method, the number of grids required for using DNS reaches 4.4 billion to 780 billion, which is undoubtedly a huge challenge for grid generation and computation.

[0004] On the other hand, domestic supercomputers, with their significant computing power advantages and heterogeneous architecture (CPU + domestic GPU accelerator), especially more than 95% of the computing power comes from the acceleration core, provide new possibilities for solving the above problems. In view of this, the present invention proposes a large-scale parallel computing method for high-order DNS of thermal fluid based on domestic supercomputers. Summary of the invention

[0005] The purpose of the present invention is to provide a large-scale parallel computing method for high-order DNS of thermal fluid based on domestic supercomputer to solve the key technical problems in the existing high-order direct simulation mentioned in the background technology.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] The large-scale parallel computing method of high-order DNS for thermal fluid based on domestic supercomputers specifically includes the following contents:

[0008] (1) To solve the problem of large-scale mesh generation, a professional mesh generation tool is used to generate the minimum basic unit segment mesh to ensure that the meshes on the top and bottom surfaces are consistent. In the main solution, the mapping from the minimum basic unit segment to the entire core is achieved by breaking the whole into parts.

[0009] (2) To address the problem of large-scale, multi-file regional decomposition, we focus on load balancing at the unit segment level and simplify the partitioning process: for unit segment grids, we read grid files in parallel and use recursive spectral bisection to perform static regional decomposition of the grids. We then perform dynamic load balancing based on the grids within the processor component group. At the same time, we assign a global number to each grid point to establish a small communication domain.

[0010] (3) In response to the challenges of distributed computing and heterogeneous acceleration optimization, the boundary conditions of the unit segment and the virtual segment are precisely set to ensure the accuracy of the simulation; the fluid dynamics and heat transfer equations are solved in a distributed computing environment, the communication protocol is used to optimize the data exchange between processors, and the computing process is optimized for fine-grained heterogeneous acceleration.

[0011] Preferably, the (1) specifically includes the following contents:

[0012] 1.1) Parallel I / O: Using the parallel grid file reading method, all processors read the unit segment grid file in parallel, store it in the grid position information array, and then collect the read grid position information variables into the P0 processor;

[0013] 1.2) “Virtual segment” mesh construction: In the main solver, the required “virtual segment” mesh is constructed by copying and translating the basic unit segments.

[0014] Preferably, the (2) specifically includes the following contents:

[0015] 2.1) Load balancing division: Load balancing division is performed based on the complexity of the computing task and the availability of parallel computing resources. Specifically, it includes the following two load balancing processes:

[0016] Process 1: Use recursive spectral bisection to divide the unit segment grid into several sub-regions to obtain a static region decomposition file;

[0017] Process 2: First, divide the processors into several groups, each group corresponds to a grid segment, then perform grid-processor mapping in each processor group, and finally assign all grids to different computing nodes to ensure that each node has the same computing load and reduce computing time;

[0018] 2.2) Globally number all grid points so that points with the same global number on different processors form small communication domains Gj=(p,i), where j represents the global number of the grid point, p represents the processor number, and i represents the vertex number in the processor.

[0019] Preferably, the (3) specifically includes the following contents:

[0020] 3.1) Virtual segment boundary condition setting: For the overall grid file, directly specify the boundary condition type of each surface; for the segmentation strategy, assign boundary condition types and specific values ​​to certain surfaces of the unit segment and virtual segment respectively;

[0021] 3.2) Distributed equation heterogeneous acceleration solution: In a distributed computing environment, the fluid dynamics and heat transfer equations are solved. Each processor communicates through the nearest neighbor communication domain and the global communication domain, and fine-grained heterogeneous acceleration optimization is performed on the three small matrix-matrix multiplications in the calculation process;

[0022] 3.3) Visualization file generation: After each processor completes the calculation, it transmits the result back to processor No. 0 of each processor group, and processor No. 0 selectively generates a visualization file.

[0023] Compared with the prior art, the present invention provides a large-scale parallel computing method for high-order DNS of thermal fluid based on domestic supercomputer, which has the following beneficial effects:

[0024] (1) Solve the meshing problem of high-order direct simulation: The present invention uses professional mesh generation tools (such as ICEM) to perform high-quality meshing on only the smallest basic unit segment, thereby reducing the complexity and time of meshing. Operators can focus on improving mesh quality to meet the meshing requirements of high-order direct simulation. Without generating a complete core mesh, the basic unit segment is copied and translated to construct a virtual segment mesh representing the entire core geometry, significantly reducing storage requirements and I / O operations, and solving the meshing problem.

[0025] (2) Optimized load balancing and parallel processing: The present invention introduces parallel I / O to read the basic unit segment grid, combines static and dynamic load balancing strategies, and efficiently distributes computing tasks in a multi-processor system to optimize resource utilization and improve computing efficiency. Unlike traditional CFD methods that perform heavy load balancing division at the whole core level, the present invention focuses on load balancing at the unit segment level, greatly simplifies the division process, and significantly reduces the time required for static load balancing.

[0026] (3) Combination of large-scale parallelism and domestic heterogeneous architecture: The present invention improves data locality and reduces communication overhead by adopting a two-region decomposition strategy of first segmenting and then partitioning within the segment. While maintaining the calculation accuracy, it significantly improves the efficiency of thermal fluid calculations. In terms of fine-grainedness, heterogeneous acceleration is performed on three small matrix-matrix multiplications of hot functions in the calculation process, further improving the calculation efficiency.

[0027] (4) Flexible output file generation: The present invention provides flexible visualization file generation options, allowing users to choose to generate partial unit segment grid files or overall grid files, as well as output files of partial or all grid segments, to meet different analysis and visualization requirements.

[0028] In summary, the present invention proposes a large-scale parallel computing method for high-order DNS of thermal fluid based on domestic supercomputers. Aiming at the isomorphism characteristics of the reactor core, the mapping process from the minimum basic unit segment to the whole core is realized, which solves the challenges faced by traditional CFD in dealing with reactor core meshing and thermal fluid calculations. Compared with traditional CFD calculation methods, the present invention does not rely on generating and storing complete mesh files for the entire core, but adopts a unit segment-based mesh generation and virtual segment construction strategy, and performs fine-grained optimization of the calculation process based on domestic supercomputers, thereby improving calculation efficiency and reducing computing resource requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is the energy spectrum diagram of DNS, LES and RANS mentioned in the background technology of the present invention: DNS is used to directly simulate full-scale vortices, and the grid scale needs to be smaller than the Kolmogorov scale; LES directly simulates large-scale vortices and models small-scale vortices through turbulence models, and the required grid scale needs to reach Taylor microscale; RANS models all vortices, and the grid scale can be larger than the largest vortex.

[0030] Figure 2Schematic diagram of the difference between the method mentioned in Example 1 of the present invention and the traditional CFD calculation mode; wherein, the upper figure is a traditional CFD calculation mode, which clearly divides the process into pre-processing and main solution parts, but for the full core simulation, the pre-processing full core mesh division and full core mesh file output are time-consuming and unbearable, and massive storage is also a major challenge. The full core mesh reading during the main solution and the full core solution variable mesh output after the solution are completed are also problems; the lower figure is a new calculation mode proposed by the present invention, which separates a part of the pre-processing into pre-pre-processing, and only performs fine geometric modeling and mesh division of the unit segment during the pre-pre-processing process, and only stores the unit segment mesh file, which greatly reduces the pre-processing calculation and storage pressure; the second half of the pre-processing is connected to the solution part, based on the idea of ​​unit segment replication and translation, with the help of supercomputing, large-scale mesh generation and equation solving calculations for the whole core are performed, reducing storage and I / O time.

[0031] Figure 3 It is a schematic diagram of the axial and radially repeating structure of the fast reactor core mentioned in Example 1 of the present invention, wherein the left 1 (Channel configuration) shows that in the axial direction, the components can be split into units of one pitch of the winding wire, and the left 2 (Assembly configuration) shows that in the radial direction, the core can be split into several types of repeatable components.

[0032] Figure 4 This is a flow chart of the large-scale parallel computing method for high-order DNS of reactor thermal fluid mentioned in Example 1 of the present invention.

[0033] Figure 5 Schematic diagram of the processor communication initialization method mentioned in Example 2 of the present invention, wherein there are 6 grid units in total, 1, 2, and 4 are assigned to processor 1, and 3, 5, and 6 are assigned to processor 2; each vertex has its global vertex number in the overall 6 grids and its local number in the processor where it is located; each grid stores its vertices in the form of a quadruple, in the order of lower left-lower right-upper left-upper right, such as element 1 is (1, 4, 2, 5); each processor stores the global vertex number tuple of each element's 4 vertices in order to the global_index array, and forms Group_j:(p,i) according to the global_index array, the processor number, and the local_index array (each element vertex local number); wherein j is the vertex global number, p is the processor number, and i is the vertex local number. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0035] Embodiment 1:

[0036] The present invention proposes a large-scale parallel computing method for high-order DNS of thermal fluid based on domestic supercomputer, which realizes the mapping of the smallest basic unit segment to the whole core and efficient heterogeneous computing of reactor thermal fluid, so as to improve the efficiency of overall CFD computing and reduce the demand for computing resources. The method proposed by the present invention is different from the traditional CFD computing mode as follows: Figure 2 shown.

[0037] The present invention focuses on how to use the isomorphism of the reactor core to perform large-scale parallel calculations of thermal fluids after obtaining the basic unit segment grid. For the sake of convenience, taking the fast reactor as an example, assuming that the actual component length is an integer multiple of the basic unit segment, the schematic diagram of the axial translation of the basic unit segment into the component and the radial translation of the component into the full core is as shown in Figure 3 As shown, the overall technical solution is as follows Figure 4 shown.

[0038] The high-order DNS large-scale parallel computing method for thermal fluid based on domestic supercomputer proposed in the present invention specifically includes the following contents:

[0039] In order to solve the problem of large-scale mesh generation, professional mesh generation tools (such as ICEM) are used to generate the minimum basic unit segment mesh to ensure the consistency of the mesh on the top and bottom surfaces and maintain high quality. In the main solution, the mapping from the minimum basic unit segment to the entire core is achieved through the idea of ​​breaking the whole into parts. This method can not only ensure the quality of the mesh, but also meet the number requirements of large-scale meshes. In the main solution, the specific solution is (the step number in the brackets is Figure 4 Step number):

[0040] (1) Parallel I / O (step 1-2):

[0041] DNS has high requirements for grid resolution. Even the grid of a unit segment may have a volume of hundreds of megabytes to GB. Therefore, a parallel grid file reading method is adopted. All processors read the unit segment grid file in parallel and store it in the grid position information array. Then, this array variable is gathered to the P0 processor.

[0042] (2) Virtual segment grid construction (step 5):

[0043] In the main solver, the required "virtual segment" mesh is constructed by copying and translating the basic unit segments. These virtual segments together represent the geometry of the entire core, but do not require the complete core mesh to be stored on the physical storage medium, thus significantly reducing storage requirements and I / O operations.

[0044] In order to solve the problem of large-scale, multi-file regional decomposition, we focus on load balancing at the unit segment level and simplify the partitioning process. For the unit segment grid, we read the grid files in parallel, use the recursive spectral bisection method to perform static regional decomposition on the grid, and perform dynamic load balancing based on the grids between and within processor groups to achieve efficient load balancing. We assign a global number to each grid point and establish a small communication domain to achieve efficient communication between processors. The specific solutions are:

[0045] (1) Load balancing partition (step 3-4):

[0046] In order to optimize the use of computing resources and improve computing efficiency, the basic unit segment grid and the subsequently generated virtual segment grid will be load-balanced according to the complexity of the computing task and the availability of parallel computing resources. This step involves two load balancing processes: the first is the independent region decomposition process after the basic unit segment is obtained. This process uses the recursive spectral bisection method to divide the unit segment grid into several sub-regions to obtain a static region decomposition file; the second is that in the main solution process, the processors are first divided into several groups, each group corresponds to a grid segment, and then the grid-processor mapping is performed in each processor group. The ultimate goal is to assign all grids to different computing nodes to ensure that the computing load of each node is roughly the same, thereby reducing computing time and improving efficiency.

[0047] (2) Processor communication (step 6):

[0048] Give all grid points a global number, so that points with the same global number on different processors form small communication domains G j =(p,i), where j is the global index of the grid point, p is the processor index, and i is the index of the vertex in the processor.

[0049] In response to the challenges of distributed computing and heterogeneous acceleration optimization, first of all, in order to ensure the accuracy of the simulation, the boundary conditions of the unit segment and the virtual segment need to be accurately set to ensure the accuracy of the simulation; secondly, the fluid dynamics and heat transfer equations are solved in a distributed computing environment, and efficient communication protocols are used to optimize data exchange between processors, and fine-grained heterogeneous acceleration optimization is performed on the computing process.

[0050] (1) Setting virtual segment boundary conditions (step 7):

[0051] For the overall mesh file, the boundary condition type of each face can be directly specified. However, for the segmentation strategy, the real object surface is not generated at the beginning. It is necessary to assign boundary condition types and specific values ​​to certain faces of unit segments and virtual segments respectively.

[0052] (2) Distributed equation heterogeneous accelerated solution (step 8):

[0053] Finally, the fluid dynamics and heat transfer equations are solved in a distributed computing environment. j =(p,i) communication domain (nearest neighbor communication) and MPI_COMM_WORLD communication domain (global communication), and performs fine-grained heterogeneous acceleration optimization on the three small matrix-matrix multiplications in the calculation process.

[0054] (3) Visualization file generation (step 9):

[0055] After each processor completes the calculation, the result is transmitted back to processor No. 0 of each processor group, and processor No. 0 selectively generates a visualization file.

[0056] In summary, the present invention proposes an innovative high-order DNS large-scale distributed parallel computing technology based on domestic supercomputers. Aiming at the isomorphic characteristics of the reactor core, the mapping process from the smallest basic unit segment to the entire core is realized to solve the challenges faced by traditional CFD in dealing with reactor core meshing and thermal fluid calculations. Compared with traditional CFD calculation methods, the innovation of the present invention is that it does not rely on generating and storing complete mesh files for the entire core, but adopts a unit segment-based mesh generation and virtual segment construction strategy, and performs fine-grained optimization of the calculation process based on domestic supercomputers, thereby improving computing efficiency and reducing computing resource requirements.

[0057] Embodiment 2:

[0058] Based on Example 1, but with the following differences:

[0059] The following are the input files and their descriptions involved in the present invention:

[0060]

[0061]

[0062] The following are the output files and their descriptions involved in the present invention:

[0063]

[0064] The following is a detailed description of step 1 to step 9 mentioned in the first embodiment of the invention, namely, parallel I / O (step 1-2), load balancing division (step 3-4), virtual segment grid construction (step 5), processor communication (step 6), virtual segment boundary condition setting (step 7), distributed equation heterogeneous accelerated solution (step 8), and visualization file generation (step 9):

[0065] (1) Parallel I / O:

[0066] Due to the use of high-order direct simulation, the grid of the reactor core assembly unit segment may also have a volume of hundreds of megabytes to GB, so a parallel grid file reading method is adopted. Each processor first calculates the specific index of the unit segment grid file it is responsible for reading, and then each processor locates and reads the data segment in the corresponding grid file according to these indexes. After reading the data, each processor preprocesses its local data, including data compression and packaging, to optimize the subsequent data collection process. Subsequently, non-blocking parallel I / O operations are used to collect them to the designated main processor (P0), and P0 unpacks these data to form complete unit segment grid data. The pseudo code of the parallel I / O reading unit segment grid file algorithm is shown below.

[0067]

[0068] (2) Load balancing division:

[0069] 1) In the static load balancing algorithm, the present invention uses recursive spectral bisection (RSB) to process the input mesh unit mesh_unit to generate a load balancing map map_unit. The algorithm first reads the mesh unit and then processes it by recursively calling the RecursiveSpectralBisection function. In each recursion, if the size of the current mesh unit is small enough, the algorithm will return it as an independent partition as the termination condition of the recursion. If the mesh unit is still large, the Federer eigenvector (spectral information) of its Laplace matrix is ​​calculated, and the mesh unit is divided into two sub-parts based on this spectral information. This segmentation process is performed recursively until all mesh units are divided into sufficiently small units, thereby ensuring a balanced distribution of the computing load. Due to the characteristics of the bisection method, the number of divided areas is an exponential multiple of 2. Finally, these segmentation results are summarized in map_unit, providing a static load balancing solution for subsequent parallel computing. The pseudo code of the static load balancing algorithm based on recursive spectral bisection is shown below.

[0070]

[0071] 2) In the secondary load balancing algorithm, the parallel computing environment is first initialized through the message passing interface (MPI), and ngroup processor groups are established, each containing nlocal processors. The main processor No. 0 (P0) aggregates the unit segment grid data of the parallel I / O step into gathered_data, and then distributes this data to the first processor of each processor group. The first processor of each processor group reads the static area decomposition file map_unit, which instructs how to divide the unit segment grid data load. For each processor in each processor group, the algorithm calculates the number of grid elements it should bear, and determines the load distribution strategy based on the value of nlocal: if nlocal is an exponential multiple of 2, it means that the number of processors matches the number of grid areas (the static area of ​​the grid after binary division is an exponential multiple of 2), and the binary division method is used to distribute the grids equally to each processor; if it is not an exponential multiple of 2, check whether the number of grids can be divided by the number of processors. If so, they are evenly distributed. If not, the workload is evenly distributed to all processors first, and then the excess workload is distributed to some processors to keep the load of all processors as balanced as possible. The pseudo code of the secondary load balancing algorithm is shown below.

[0072]

[0073] (3) Virtual segment grid construction:

[0074] After the load balancing division is completed, the virtual segment is constructed. We call the real stored grid segment a unit segment, and the grid segment generated by the corresponding processor group a virtual segment. The virtual segment construction process is divided into two routes: axial translation and axial + radial translation. For the axial translation configuration, each processor only needs to calculate the axial translation Δz of the corresponding grid segment based on ngroup_id (the processor group id where the processor is located) and the pitch of the unit segment; for the full core configuration of axial + radial translation, the processor group needs to be divided into two groups first, one group is responsible for gap calculation, and the other group is responsible for component calculation. Each processor needs to first calculate the axial translation Δz based on ngroup_id and pitch, and then search for the radial translation Δx and Δy matching ngroup_id in the geometry position file geometry_input_file of the component and gap respectively, and then calculate the real geometric information of the grid segment responsible for the processor group based on the original position information and displacement information of the unit segment grid.

[0075] (4) Processor communication:

[0076] The core idea is to assign a global number to each mesh vertex, so that points with the same number on different processors can form a small communication domain G. j=(p, i), where j represents the global number of the grid point, p represents the number of the processor, and i represents the local number of the point within the processor. During nearest-neighbor communication, processors within the same communication domain exchange information with each other. As Figure 5 shown, in parallel communication, each processor needs to determine the positions of its neighboring elements. When some adjacent elements (such as elements 4, 5, and 2 in the figure) are located in different processors, direct communication cannot be carried out as in the local gather-scatter operation. Instead, these processors need to exchange the values on their boundaries. How to determine the communication between processors and at which vertices of which elements to exchange data needs to be decided by the bin sorting method. Create several "boxes" or "groups". Each processor scans its elements and puts the vertices corresponding to the global vertex number j in the form of a tuple (p, i) into the corresponding group_j, where p represents the processor number and i represents the local number of the vertex in that processor. Communication is required between the vertices within the same group. The p item indicates which two processors need to communicate, and the i item indicates at which vertices the communication occurs. The setting of this communication path is completed by the communication initialization function before data exchange.

[0077] (5) Setting of virtual segment boundary conditions:

[0078] In general CFD calculation programs, boundary condition settings are for the overall grid file and generally include two parts: specifying the boundary condition type and setting the specific values of the boundary conditions. The boundary condition settings of the present invention are carried out in the following steps:

[0079] (1) Divide different boundaries in the unit segment grid file mesh_unit into different sidesets. For example, divide the upper top surface into sideset1, the lower bottom surface into sideset2, the wire-wound wall surface into sideset3, the fuel rod wall surface into sideset4, and all the wall surfaces of the component housing into sideset5;

[0080] (2) After generating the virtual segment, specify the boundary condition type for different sidesets according to ngroup_id. When ngroup_id = 1 (the bottommost unit segment), the type of its sideset1 is the internal boundary condition "E". When ngroup_id = ngroup (the topmost virtual segment), the type of its sideset2 is "E". When 1 < ngroup_id < ngroup (the middle virtual segments), the types of its sideset1 and sideset2 are "E". The boundary condition types of the remaining sidesets depend on different case situations.

[0081] (3) Set specific values ​​for each boundary condition type. The pseudo code of the virtual segment boundary condition setting algorithm is shown below.

[0082]

[0083] (6) Distributed heterogeneous accelerated solution of equations:

[0084] In a distributed computing environment, the fluid dynamics and heat transfer equations are solved according to the input files task_info_file, user_file, running_info_file, and the grid information processed in the previous steps. Each processor is responsible for solving the equations of the grid assigned to the processor, including constructing the operators required for the equations, constructing the linear equations, solving the linear equations, etc., and when necessary, through G j =(p,i) communication domain (nearest neighbor communication) and MPI_COMM_WORLD communication domain (global communication) for communication.

[0085] At a fine-grained level, the computational hotspots of high-order direct numerical simulation (DNS) are concentrated on three small matrix-matrix multiplication operations. This is because large sparse matrix-vector multiplication operations (Ax) frequently occur in the process of solving the Navier-Stokes (NS) equations, where A appears in the form of tensor products. By using the multiplication properties of tensor products and vectors, these operations can be converted into three more efficient small matrix-matrix multiplications. For the computational tasks of the three small matrix-matrix multiplications, we adopted a series of optimization strategies to improve the execution efficiency on domestic GPUs. This includes allocating continuous memory blocks for matrices A, B, and C in the host memory and domestic GPU memory to achieve efficient data transfer. By defining appropriate workgroup sizes and grid sizes, we optimized the thread layout for parallel execution. In addition, a batch memory copy technique was introduced to copy matrices A, B, and C from the host to the domestic GPU in batches, which greatly reduced the startup time of data transfer. During the calculation process, each work item uses local data sharing (LDS) and registers for the grid part assigned to it to reduce the number of global memory accesses and improve the calculation speed. After the calculation is completed, batch memory copy is used again to efficiently transfer the result D back to the host, and the domestic GPU memory resources are released to end the ROCm environment. This set of optimization measures is mainly to deal with the problem that data transmission may become a bottleneck in small matrix operations. By reducing the transmission startup time and optimizing the memory layout, the overall computing performance is effectively improved, which is particularly suitable for small-scale matrix calculation tasks that are sensitive to latency. The pseudo code of the domestic GPU optimization of three matrix-matrix multiplications is shown below.

[0086]

[0087] (7) Visualization file generation:

[0088] After each processor completes the calculation, it transmits the result back to processor No. 0 of each processor group, and processor No. 0 selectively generates a local visualization part_n_view_file or synthesizes it into an overall visualization file view_file.

[0089] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A large-scale parallel computing method for high-order DNS of thermal fluid based on domestic supercomputer, characterized by: Specifically include the following: (1) To solve the problem of large-scale mesh generation, a professional mesh generation tool is used to generate the minimum basic unit segment mesh to ensure that the meshes on the top and bottom surfaces are consistent. In the main solution, the mapping from the minimum basic unit segment to the entire core is achieved by breaking the whole into parts. (2) To address the problem of large-scale, multi-file regional decomposition, we focus on load balancing at the unit segment level and simplify the partitioning process: for unit segment grids, we read grid files in parallel and use recursive spectral bisection to perform static regional decomposition of the grids. We then perform dynamic load balancing based on the grids within the processor component group. At the same time, we assign a global number to each grid point to establish a small communication domain. (3) In response to the challenges of distributed computing and heterogeneous acceleration optimization, the boundary conditions of the unit segment and the virtual segment are precisely set to ensure the accuracy of the simulation; the fluid dynamics and heat transfer equations are solved in a distributed computing environment, the communication protocol is used to optimize the data exchange between processors, and the computing process is optimized for fine-grained heterogeneous acceleration.

2. The method for large-scale parallel computing of high-order DNS of thermal fluid based on domestic supercomputer according to claim 1 is characterized in that: The above (1) specifically includes the following contents: 1.1) Parallel I / O: Using the parallel grid file reading method, all processors read the unit segment grid file in parallel, store it in the grid position information array, and then collect the read grid position information variables into the P0 processor; 1.2) "Virtual segment" grid construction: In the main solver, the required "virtual segment" grid is constructed by copying and translating the basic unit segment.

3. The method for large-scale parallel computing of high-order DNS of thermal fluid based on domestic supercomputer according to claim 1 is characterized in that: The above (2) specifically includes the following contents: 2.1) Load balancing division: Load balancing division is performed based on the complexity of the computing task and the availability of parallel computing resources. Specifically, it includes the following two load balancing processes: Process 1: Use recursive spectral bisection to divide the unit segment grid into several sub-regions to obtain a static region decomposition file; Process 2: First, divide the processors into several groups, each group corresponds to a grid segment, then perform grid-processor mapping in each processor group, and finally assign all grids to different computing nodes to ensure that each node has the same computing load and reduce computing time; 2.2) Globally number all grid points, so that points with the same global number on different processors form small communication domains G j =(p,i), where j represents the global number of the grid point, p represents the processor number, and i represents the number of the vertex in the processor.

4. The method for large-scale parallel computing of high-order DNS of thermal fluid based on domestic supercomputer according to claim 1 is characterized in that: The above (3) specifically includes the following contents: 3.1) Virtual segment boundary condition setting: For the overall grid file, directly specify the boundary condition type of each surface; for the segmentation strategy, assign boundary condition types and specific values ​​to certain surfaces of the unit segment and virtual segment respectively; 3.2) Distributed equation heterogeneous acceleration solution: In a distributed computing environment, the fluid dynamics and heat transfer equations are solved. Each processor communicates through the nearest neighbor communication domain and the global communication domain, and fine-grained heterogeneous acceleration optimization is performed on the three small matrix-matrix multiplications in the calculation process; 3.3) Visualization file generation: After each processor completes the calculation, it transmits the result back to processor No. 0 of each processor group, and processor No. 0 selectively generates a visualization file.

Citation Information

Patent Citations

  • Fast neutron reactor full-core structure large-scale grid automatic generation method and system

    CN113177335A

Cited By

  • Hy-GA parallel solving method for solving seepage equation based on domestic CPU + DCU architecture

    CN119416693A

  • Hy-GA Parallel Solving Method for Solving Seepage Equation Based on Domestic CPU + DCU Architecture

    CN119416693B