A method, device and storage medium for determining a load balancing strategy of a supercomputer based on a structural grid
By constructing a structured grid and using graph partitioning algorithms to optimize the load balancing strategy of supercomputers, the problem of not considering hardware architecture communication latency in existing technologies is solved, achieving more efficient load balancing and improving user experience.
Patent Information
- Application Number
- CN202511274554.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-08
Smart Images

Figure CN120803745B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computational fluid dynamics, and in particular to a method, apparatus, device, and storage medium for determining a supercomputer load balancing strategy based on a structured grid. Background Technology
[0002] Currently, existing technologies propose an intelligent multidimensional partitioning algorithm to handle computationally heavy grid blocks in the original grid corresponding to a supercomputer. Then, a genetic algorithm is used to distribute the processed multidimensional grid blocks to processor cores. Furthermore, drawing on the classic greedy load balancing strategy, existing technologies also propose an improved partitioning strategy for the original grid corresponding to a supercomputer, including a new sub-grid partitioning method and a cyclic strategy. This algorithm introduces a grid block evaluation interval and a lower load limit. Moreover, a block-based recursive partitioning method is proposed for partitioning undirected graphs.
[0003] Based on existing technology analysis, traditional grid partitioning strategies corresponding to the original grid blocks of supercomputers are mostly based on theoretical load balancing assumptions. They only optimize the task allocation between computing nodes through abstract models, but do not fully consider the impact of multi-level communication latency (such as communication between nodes, between core groups and between slave cores) on parallel efficiency in the actual hardware architecture of the Sunway supercomputer, resulting in insufficient engineering adaptability.
[0004] As can be seen from the above, how to improve the efficiency of determining the load balancing strategy for supercomputers based on structured grids is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for determining a supercomputer load balancing strategy based on a structured grid, which can improve the efficiency of determining the load balancing strategy for a supercomputer during the process of determining a supercomputer load balancing strategy based on a structured grid. The specific solution is as follows:
[0006] Firstly, this application provides a method for determining a supercomputer load balancing strategy based on a structured grid, including:
[0007] The processors in the supercomputer are set as nodes, and a structural mesh with target mesh parameters is constructed based on the master-slave heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target mesh parameters and the hardware architecture of the supercomputer. The hardware architecture includes the nodes, the core groups in the nodes, and the communication structure between the master core and the slave core in the core groups. The target mesh parameters include the number of mesh cells and the number of adjacent faces between mesh blocks.
[0008] Using the load balancing model, and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node kernel group communication time constraints, and preset inter-slave kernel communication time constraints, the structure mesh is divided to obtain several segmented mesh blocks.
[0009] Vertices and vertex weights are determined based on the segmented mesh blocks and their corresponding mesh quantities, and edges and edge weights are determined based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to two segmented mesh blocks is set as the degree corresponding to the vertex, so as to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight and the degree.
[0010] The directed graph mapping result is processed by a preset graph partitioning algorithm to obtain a target graph partitioning result. Then, the target graph partitioning result is inversely mapped to a target grid to determine the load balancing strategy corresponding to the supercomputer based on the target grid.
[0011] Optionally, the step of setting the processors in the supercomputer as nodes, constructing a structured grid with target grid parameters based on the master-slave heterogeneous architecture of the supercomputer, and then establishing a load balancing model based on the target grid parameters and the hardware architecture of the supercomputer includes:
[0012] Each processor in the supercomputer is identified, and each processor includes several core groups. Each core group includes a main core for managing data and several slave cores for processing data. The main core and the slave cores share the processor's memory.
[0013] The mesh granularity is determined based on the computing power of the slave core in the master-slave heterogeneous architecture of the supercomputer, and the adjacent face connection relationship of the mesh is determined based on the communication requirements between each core group, so as to construct a structured mesh based on the mesh granularity and the adjacent face connection relationship.
[0014] The hardware architecture corresponding to the supercomputer is determined based on the node, the core group in the node, and the communication structure between the master core and the slave core in the core group. The corresponding computing level is determined based on the core group, the master core, the slave core, and the node. The corresponding storage access latency characteristics are then determined based on the computing level.
[0015] Based on the storage access latency characteristics, the hardware architecture, and the target grid parameters, a load balancing model corresponding to the supercomputer is established.
[0016] Optionally, the load balancing model is used, and the structural mesh is divided based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-kernel group communication time constraints, and preset inter-slave core communication time constraints to obtain several segmented mesh blocks, including:
[0017] The preset node computation time constraint is determined based on the number of grid cells corresponding to the node, and the preset inter-node communication time constraint is determined based on the number of grid faces that communicate between the node and other nodes.
[0018] The preset communication time constraint between the core groups in the node is determined based on the number of mesh faces communicating between the core groups in the node, and the preset communication time constraint between the slave cores is determined based on the number of mesh cells in the core group.
[0019] Based on the number of nodes in the structured mesh, the number of mesh blocks in the nodes, and the number of mesh faces communicating, a first weighting coefficient corresponding to the preset node computation time constraint, a second weighting coefficient corresponding to the preset inter-node communication time constraint, a third weighting coefficient corresponding to the preset inter-node kernel group communication time constraint, and a fourth weighting coefficient corresponding to the preset inter-kernel communication time constraint are determined.
[0020] The total execution time corresponding to the node is determined based on the preset node computation time constraint, the preset inter-node communication time constraint, the preset inter-node kernel group communication time constraint, the preset inter-slave kernel communication time constraint, and the corresponding weighting coefficients.
[0021] The load balancing model is used to divide the structural mesh based on the total execution time and a preset mesh segmentation algorithm to obtain several segmented mesh blocks whose geometric shapes meet preset shape conditions; the preset mesh segmentation algorithm includes a recursive bisection method and a multi-block structural mesh segmentation algorithm.
[0022] Optionally, the step of determining vertices and vertex weights based on the segmented mesh blocks and their corresponding mesh values, and determining edges and edge weights based on the association between two segmented mesh blocks and the number of adjacent face mesh units, and then setting the number of mesh blocks adjacent to the two segmented mesh blocks as the degree corresponding to the vertex, to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight, and the degree, includes:
[0023] Each of the segmented grid blocks is mapped to a vertex, and the grid quantity corresponding to the segmented grid block is determined. Based on the grid quantity and the first weighting coefficient, the vertex weight corresponding to the vertex is determined. Then, the association relationship between every two segmented grid blocks in each segmented grid block is determined, and the association relationship is mapped to an edge.
[0024] The number of adjacent face grid cells between every two segmented grid blocks in each segmented grid block is determined, and the edge weight corresponding to the edge is determined based on the number of adjacent face grid cells, the second weighting coefficient, the third weighting coefficient, and the fourth weighting coefficient. Then, the number of adjacent grid blocks between every two segmented grid blocks in each segmented grid block is determined, so as to map the number of adjacent grid blocks to the degree corresponding to the vertex.
[0025] A directed graph mapping result is constructed based on the vertex, the vertex weight, the edge, the edge weight, and the degree; the directed graph mapping result is a directed weighted graph.
[0026] Optionally, after determining the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight, and the degree, the method further includes:
[0027] Each vertex in the directed graph mapping result is determined, and each current vertex is matched using a preset graph coarsening algorithm to obtain the current matched vertex. Then, the current coarsened graph is determined based on the current matched vertex and the corresponding edge weight.
[0028] Determine whether the size of the current coarsened graph is less than a preset threshold. If the size of the current coarsened graph is less than the preset threshold, set the current coarsened graph as the target coarsened graph. If the size of the current coarsened graph is not less than the preset threshold, jump back to the step of matching each current vertex using the preset graph coarsening algorithm.
[0029] Alternatively, determine whether the current coarsened graph meets the preset conditions. If the current coarsened graph meets the preset conditions, then set the current coarsened graph as the target coarsened graph. If the current coarsened graph does not meet the preset conditions, then jump back to the step of matching each current vertex using the preset graph coarsening algorithm.
[0030] Optionally, the step of performing graph partitioning processing on the directed graph mapping result using a preset graph partitioning algorithm to obtain the target graph partitioning result includes:
[0031] The current directed graph mapping result is processed by a preset graph partitioning algorithm to obtain the current graph partitioning result. The current vertex subsets corresponding to the current graph partitioning result, as well as the current vertex weights and results corresponding to the current vertex subsets, are determined. The preset graph partitioning algorithm includes graph partitioning algorithms based on iterative improvement strategies, graph partitioning algorithms based on construction methods, graph partitioning algorithms based on mathematical methods, and graph partitioning algorithms based on intelligent optimization algorithms.
[0032] Determine whether the difference between the current vertex weight and the result is less than a preset difference threshold. If the difference between the current vertex weight and the result is not less than the preset difference threshold, then jump back to the step of performing graph partitioning processing on the current directed graph mapping result using a preset graph partitioning algorithm.
[0033] If the difference between the weights and results of each current vertex is less than the preset difference threshold, then the edge weights corresponding to each current vertex subset are determined, and the current graph partitioning result corresponding to the edge weight with the smallest value among the edge weights is set as the target graph partitioning result.
[0034] Optionally, the step of inversely mapping the target graph partitioning result to a target mesh, and determining the load balancing strategy corresponding to the supercomputer based on the target mesh, includes:
[0035] The target graph partitioning result is mapped layer by layer to the next level to obtain the mapping result. Then, based on the vertex number corresponding to the target graph partitioning result, the mapping result is inversely mapped to the target mesh. Based on the mesh partitioning result in the target mesh, the load balancing strategy corresponding to the supercomputer is determined.
[0036] Wherein, the grid block number in the target grid corresponds one-to-one with the vertex number; the total execution time of each node corresponding to the load balancing strategy is not greater than the total execution time of the node; the total execution time of the node is the total execution time of each node in the structure grid.
[0037] Secondly, this application provides a supercomputer load balancing strategy determination device based on a structured grid, comprising:
[0038] A structured mesh construction module is used to set the processors in the supercomputer as nodes and construct a structured mesh with target mesh parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target mesh parameters and the hardware architecture of the supercomputer. The hardware architecture includes the nodes, the core groups in the nodes, and the communication structure between the master core and the slave core in the core groups. The target mesh parameters include the number of mesh cells and the number of adjacent faces between mesh blocks.
[0039] The structural mesh segmentation module is used to segment the structural mesh using the load balancing model and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node kernel group communication time constraints, and preset inter-slave kernel communication time constraints to obtain several segmented mesh blocks.
[0040] The mapping result determination module is used to determine vertices and vertex weights based on the segmented mesh blocks and their corresponding mesh quantities, and to determine edges and edge weights based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to the two segmented mesh blocks is set as the degree corresponding to the vertex, so as to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight and the degree.
[0041] The load balancing strategy generation module is used to perform graph partitioning on the directed graph mapping result using a preset graph partitioning algorithm to obtain a target graph partitioning result, and then inversely map the target graph partitioning result into a target grid to determine the load balancing strategy corresponding to the supercomputer based on the target grid.
[0042] Thirdly, this application provides an electronic device, comprising:
[0043] Memory, used to store computer programs;
[0044] A processor is used to execute the computer program to implement the aforementioned method for determining a supercomputer load balancing strategy based on a structured grid.
[0045] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned method for determining a supercomputer load balancing strategy based on a structured grid.
[0046] As can be seen from the above, before determining the supercomputer load balancing strategy based on the structured grid, this application needs to set the processors in the supercomputer as nodes and construct a structured grid with target grid parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target grid parameters and the hardware architecture of the supercomputer. Using the load balancing model, and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-core group communication time constraints, and preset inter-slave core communication time constraints, the structured grid is divided into several segmented grid blocks. Based on the segmented grid... The vertices and vertex weights are determined by the blocks and their corresponding mesh quantities, and the edges and edge weights are determined based on the relationship between the two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to the two segmented mesh blocks is set as the degree corresponding to the vertex. The directed graph mapping result is determined based on the preset vertex-edge weighted directed graph structure mapping rules, vertices, vertex weights, edges, edge weights and degrees. The directed graph mapping result is processed by a preset graph partitioning algorithm to obtain the target graph partitioning result. Then, the target graph partitioning result is inversely mapped to the target mesh, and the load balancing strategy corresponding to the supercomputer is determined based on the target mesh.
[0047] Therefore, this application first requires setting the processors in the supercomputer as nodes and constructing a structural mesh with target mesh parameters based on the master-slave heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target mesh parameters and the hardware architecture of the supercomputer. Next, using the load balancing model and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node core group communication time constraints, and preset inter-slave core communication time constraints, the structural mesh is divided into several segmented mesh blocks. Then, based on the segmented mesh blocks and their corresponding mesh quantities... The process involves determining vertices and vertex weights, and then determining edges and edge weights based on the relationships between two segmented mesh blocks and the number of adjacent face mesh cells. The number of mesh blocks adjacent to each segmented mesh block is then set to the degree corresponding to the vertex. A directed graph mapping result is determined based on a preset vertex-edge weighted directed graph structure mapping rule, vertices, vertex weights, edges, edge weights, and degrees. Finally, a preset graph partitioning algorithm is used to partition the directed graph mapping result, obtaining the target graph partitioning result. This target graph partitioning result is then inversely mapped to a target mesh, and a load balancing strategy corresponding to the supercomputer is determined based on the target mesh. This approach improves the efficiency of determining the supercomputer load balancing strategy in the structured mesh-based supercomputer load balancing strategy determination process, thereby enhancing the user experience. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0049] Figure 1 This is a flowchart of a method for determining a supercomputer load balancing strategy based on a structured grid, as disclosed in this application.
[0050] Figure 2 This application discloses a specific method for determining a supercomputer load balancing strategy based on a structured grid.
[0051] Figure 3 This is a schematic diagram of a specific processor structure disclosed in this application;
[0052] Figure 4 This is a schematic diagram of a specific process disclosed in this application for mapping a mesh into a point-edge weighted directed graph;
[0053] Figure 5 This application discloses a specific flowchart of vertex matching for a coarsening stage graph.
[0054] Figure 6 This is a schematic diagram illustrating a specific process disclosed in this application for inversely mapping a vertex-edge weighted directed graph into a mesh;
[0055] Figure 7 This is a schematic diagram of the structure of a supercomputer load balancing strategy determination device based on structured grids disclosed in this application;
[0056] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0057] The technical solutions of the embodiments 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, and 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.
[0058] Currently, traditional grid partitioning strategies corresponding to the original grid blocks of supercomputers are mostly based on theoretical load balancing assumptions, optimizing task allocation between computing nodes only through abstract models. However, they do not fully consider the impact of multi-level communication latency (such as communication between nodes, core groups, and slave cores) on parallel efficiency in the actual hardware architecture of the Sunway supercomputer, resulting in insufficient engineering adaptability. To address this, this application provides a structured grid-based method for determining supercomputer load balancing strategies, which can improve the efficiency of determining supercomputer load balancing strategies by leveraging the structured grid.
[0059] See Figure 1 As shown in the figure, this invention discloses a method for determining a supercomputer load balancing strategy based on a structured grid, comprising:
[0060] Step S11: Set the processor in the supercomputer as a node, and construct a structural mesh with target mesh parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, establish a load balancing model based on the target mesh parameters and the hardware architecture of the supercomputer. The hardware architecture includes the node, the core group in the node, and the communication structure between the master core and the slave core in the core group. The target mesh parameters include the number of mesh cells and the number of adjacent faces between mesh blocks.
[0061] In this embodiment, the process for determining the supercomputer load balancing strategy based on the structured grid is as follows: Figure 2 As shown, firstly, this embodiment of the application needs to model the computational load balancing problem, and then divide the mesh based on the load balancing partitioning model, and then partition the mesh through graph partitioning.
[0062] In one specific implementation, such as Figure 3 As shown, the supercomputer uses a self-designed 64-bit instruction set and processor. The chip adopts a unique master-slave heterogeneous architecture. A single processor (single node) is divided into 6 core groups (CGs). Each core group contains one master core with a frequency of 2.10 GHz, called the Management Processing Elements (MPE), and 64 slave cores with a frequency of 2.25 GHz, called the Computing Processing Elements (CPEs). They share 16 GB of DDR4 main memory.
[0063] Specifically, the processors in the supercomputer are designated as nodes, and a structured grid with target grid parameters is constructed based on the supercomputer's master-slave heterogeneous architecture. Then, a load balancing model is established based on the target grid parameters and the supercomputer's hardware architecture. This can include: determining each processor in the supercomputer, where each processor includes several core groups, each core group including a master core for data management and several slave cores for data computation; the master and slave cores share the processor's memory; determining the grid granularity based on the computational capabilities of the slave cores in the supercomputer's master-slave heterogeneous architecture, and determining the adjacent-face connectivity of the grid based on the communication requirements between core groups, thus constructing a structured grid based on the grid granularity and adjacent-face connectivity; determining the hardware architecture corresponding to the supercomputer based on the nodes, the core groups within the nodes, and the communication structure between the master and slave cores within the core groups, and determining the corresponding computational levels based on the core groups, master cores, slave cores, and nodes, thus determining the corresponding memory access latency characteristics based on the computational levels; and establishing a load balancing model corresponding to the supercomputer based on the memory access latency characteristics, hardware architecture, and target grid parameters.
[0064] Step S12: Using the load balancing model, and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node kernel group communication time constraints, and preset inter-slave kernel communication time constraints, the structure mesh is divided to obtain several segmented mesh blocks.
[0065] In this embodiment, since the execution time of parallel computing is a complex combination of factors, the total execution time of a single node is affected by both its internal computing time and its communication time with other nodes or within the node itself. Therefore, it can be expressed by the following formula:
[0066] ;
[0067] in, ,function Indicates the first Total execution time of each node Indicates the first The computation time per node Indicates the first The communication time between each node and other nodes. Indicates the first Communication time between different core groups within a single node. Indicates the first Communication time between slave cores within each core group of each node. This represents the total number of nodes used for calculation.
[0068] It is worth mentioning that the computation time on the node The number of grid cells assigned to this node Directly related to the communication time between nodes. The number of mesh faces corresponding to each node in relation to communication between this node and other nodes. Directly related to the communication time between different core groups within a node. Number of grid surfaces related to communication between core groups Directly related to the communication time between slave cores within each core group of a node. The number of grid cells assigned to this core group Directly related.
[0069] Therefore, the above formula can be further written as:
[0070] ;
[0071] in, , This represents the weighting coefficient for node computation time. , as well as These represent the weighting coefficients corresponding to communication times between nodes, between node kernel groups, and between kernels within a kernel group, respectively.
[0072] It is understandable that each grid block corresponds to six grid faces, and each grid face corresponds to one grid cell. Furthermore, it is worth mentioning that the aforementioned coefficients... , , as well as All data were obtained through real-world testing. In one specific implementation, this application embodiment assumes that the number of nodes used in the calculation is... Each time In Each node is sampled, and during each sampling process, the number of grid blocks in each node is adjusted from... Gradually increase to Then, the number of communication-related mesh faces was reduced from... Gradually increase to Repeat execution Next. Through the The average of the results of each execution is calculated to obtain the final weighting coefficient. , , as well as The value of , where, To The number of nodes to be sampled after grouping. The total number of sampling operations performed. and The product is .
[0073] The objective function of the load balancing problem is to find the minimum maximum time taken by all nodes, and the expression is as follows:
[0074] ;
[0075] in, .
[0076] Furthermore, to reduce the complexity of the grid data to be partitioned, thereby reducing the area of the grid surface related to communication, the grid needs to be segmented before partitioning, so that the segmented grid blocks are "approximately cubic". The grid block segmentation strategy can adopt recursive bisection method, multi-block structure grid block segmentation algorithm, etc., and is not specifically limited here.
[0077] Specifically, using a load balancing model, and based on preset constraints on node computation time, inter-node communication time, inter-kernel group communication time, and inter-core communication time, the structured mesh is divided into several subdivided mesh blocks. This can include: determining preset node computation time constraints based on the number of mesh cells corresponding to a node, and determining preset inter-node communication time constraints based on the number of mesh faces communicating between a node and other nodes; determining preset inter-kernel group communication time constraints based on the number of mesh faces communicating between core groups within a node, and determining preset inter-core communication time constraints based on the number of mesh cells within a core group; and determining preset inter-core communication time constraints based on the number of nodes in the structured mesh, the number of mesh blocks within a node, and the number of mesh faces communicating. The system defines a first weighting coefficient corresponding to the preset node computation time constraint, a second weighting coefficient corresponding to the preset inter-node communication time constraint, a third weighting coefficient corresponding to the preset inter-node kernel group communication time constraint, and a fourth weighting coefficient corresponding to the preset inter-slave kernel communication time constraint. Based on the preset node computation time constraint, preset inter-node communication time constraint, preset inter-node kernel group communication time constraint, and preset inter-slave kernel communication time constraint, and the corresponding weighting coefficients, the system determines the total execution time corresponding to the node. Using a load balancing model and based on the total execution time and a preset mesh segmentation algorithm, the system segments the structural mesh to obtain several segmented mesh blocks whose geometric shapes satisfy preset shape conditions. The preset mesh segmentation algorithm includes a recursive bisection method and a multi-block structural mesh block segmentation algorithm.
[0078] Step S13: Determine vertices and vertex weights based on the segmented mesh blocks and their corresponding mesh quantities, and determine edges and edge weights based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, set the number of mesh blocks adjacent to the two segmented mesh blocks to the degree corresponding to the vertex, so as to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight and the degree.
[0079] In this embodiment, the segmented mesh blocks need to be partitioned. Because the structural mesh size in this embodiment is relatively large, a multi-layer graph partitioning algorithm is used in the partitioning process. This algorithm mainly includes five steps: mapping the mesh to a point-edge weighted directed graph, coarsening stage, initial partitioning stage, refinement stage, and inverse mapping the point-edge weighted directed graph back to the mesh. The flowchart illustrating the process of mapping the mesh to a point-edge weighted directed graph is shown below. Figure 4 As shown, this means converting the physical mesh into an abstract graph structure.
[0080] Specifically, vertices and vertex weights are determined based on the segmented mesh blocks and their corresponding mesh quantities, and edges and edge weights are determined based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to two segmented mesh blocks is set as the degree corresponding to the vertex. This process, based on vertices, vertex weights, edges, edge weights, and degrees, determines the directed graph mapping result. This can include: mapping each segmented mesh block to a vertex, determining the mesh quantity corresponding to the segmented mesh block, determining the vertex weight corresponding to the vertex based on the mesh quantity and a first weighting coefficient, determining the association between every two segmented mesh blocks in each segmented mesh block, and mapping the association to edges; determining the number of adjacent face mesh units between every two segmented mesh blocks in each segmented mesh block, and determining the edge weight corresponding to the edge based on the number of adjacent face mesh units, a second weighting coefficient, a third weighting coefficient, and a fourth weighting coefficient; determining the number of adjacent mesh blocks between every two segmented mesh blocks in each segmented mesh block, and mapping the number of adjacent mesh blocks to the degree corresponding to the vertex; constructing the directed graph mapping result based on vertices, vertex weights, edges, edge weights, and degrees; and the directed graph mapping result is a directed weighted graph.
[0081] Furthermore, in this embodiment, mesh blocks are treated as points in the graph, the mesh size of a mesh block is used as the weight of a point, the relationship between two mesh blocks is used as an edge, the number of adjacent face mesh cells between two mesh blocks is used as the edge weight, and the number of adjacent blocks of a mesh block is used as the degree of a point. The conversion from mesh size to vertex weight can be based on a weighting coefficient of node computation time. With the number of grid cells Represent the product as follows:
[0082] ;
[0083] in, This is the result of converting grid values to vertex weights.
[0084] Furthermore, the conversion of the number of adjacent face grid cells between two grid blocks into edge weights can be based on a weighting coefficient of node communication time. , as well as Number of adjacent face grid cells between grid blocks , and the number of core grid cells The sum of products is represented as follows:
[0085] ;
[0086] in, This is the result of converting the number of adjacent face grid cells between two grid blocks into edge weights.
[0087] Furthermore, the vertex matching process of the coarsening stage graph is as follows: Figure 5 As shown: During the roughening stage, this embodiment of the application requires roughening the original drawing. The vertices in the graph are matched, and the matched vertices are combined to obtain the next layer of coarsened graph. The above process is repeated to obtain a series of coarsened graphs. This continues until the coarsened graph is small enough or meets the preset conditions, where , This is the original image. These are the vertices in the original graph. These are the edges in the original graph.
[0088] Specifically, after determining the directed graph mapping result based on vertices, vertex weights, edges, edge weights, and degrees, the process may further include: determining each vertex in the directed graph mapping result, matching each current vertex using a preset graph coarsening algorithm to obtain the currently matched vertex, and then determining the current coarsened graph based on the currently matched vertex and its corresponding edge weight; determining whether the graph size corresponding to the current coarsened graph is less than a preset threshold; if the graph size corresponding to the current coarsened graph is less than the preset threshold, then setting the current coarsened graph as the target coarsened graph; if the graph size corresponding to the current coarsened graph is not less than the preset threshold, then jumping back to the step of matching each current vertex using the preset graph coarsening algorithm; or, determining whether the current coarsened graph meets preset conditions; if the current coarsened graph meets the preset conditions, then setting the current coarsened graph as the target coarsened graph; if the current coarsened graph does not meet the preset conditions, then jumping back to the step of matching each current vertex using the preset graph coarsening algorithm.
[0089] Step S14: Perform graph partitioning processing on the directed graph mapping result using a preset graph partitioning algorithm to obtain the target graph partitioning result. Then, inversely map the target graph partitioning result into a target grid to determine the load balancing strategy corresponding to the supercomputer based on the target grid.
[0090] In this embodiment, during the initial partitioning stage, the coarsest graph obtained in the coarsening stage can be partitioned to obtain an initial partition. During the partitioning of the coarsest graph, the objective is to minimize the sum of edge weights between vertices in different subsets while ensuring that the sum of the weights of the vertices in each subset is approximately equal; that is, to solve the load balancing objective function. ;
[0091] in, .
[0092] It is worth mentioning that the above-mentioned partitioning methods can be graph partitioning algorithms based on iterative improvement strategies, graph partitioning algorithms based on construction methods, graph partitioning algorithms based on mathematical methods, and graph partitioning algorithms based on intelligent optimization algorithms. These will not be listed one by one here.
[0093] Specifically, the process of performing graph partitioning on the directed graph mapping result using a preset graph partitioning algorithm to obtain the target graph partitioning result can include: performing graph partitioning on the current directed graph mapping result using a preset graph partitioning algorithm to obtain the current graph partitioning result, and determining the current vertex subsets corresponding to the current graph partitioning result, as well as the current vertex weights and results corresponding to the current vertex subsets; the preset graph partitioning algorithm includes graph partitioning algorithms based on iterative improvement strategies, graph partitioning algorithms based on construction methods, graph partitioning algorithms based on mathematical methods, and graph partitioning algorithms based on intelligent optimization algorithms; determining whether the difference between the current vertex weights and results is less than a preset difference threshold; if the difference between the current vertex weights and results is not less than the preset difference threshold, then jumping back to the step of performing graph partitioning on the current directed graph mapping result using the preset graph partitioning algorithm; if the difference between the current vertex weights and results is less than the preset difference threshold, then determining the edge weight sums corresponding to each current vertex subset, and setting the current graph partitioning result corresponding to the edge weight sum with the smallest value among all edge weight sums as the target graph partitioning result.
[0094] Subsequently, the target graph subdivision results need to be refined in this embodiment. In the refinement stage, the primary task is to map the coarsest graph obtained in the initial subdivision stage to the next layer of refined graph, i.e., the graph... The partition is shown in the figure. The partitioning mapping is obtained.
[0095] Finally, in this embodiment of the application, the obtained point-edge weighted directed graph needs to be inversely mapped to a mesh, and the process of inversely mapping the point-edge weighted directed graph to a mesh is as follows: Figure 6 As shown. Specifically, the process of inversely mapping the target graph partitioning result to a target mesh, and determining the load balancing strategy corresponding to the supercomputer based on the target mesh, can include: mapping the target graph partitioning result layer by layer to the next higher level to obtain the mapping result; then inversely mapping the mapping result to the target mesh based on the vertex numbers corresponding to the target graph partitioning result; and determining the load balancing strategy corresponding to the supercomputer based on the mesh partitioning result in the target mesh; wherein, the mesh block number and vertex number in the target mesh correspond one-to-one; the total execution time of each node corresponding to the load balancing strategy is not greater than the total execution time of the node; and the total execution time of the node is the total execution time of each node in the structured mesh.
[0096] It is worth mentioning that after the graph partitioning process is completed, since the grid data remains in memory, and the vertex numbers in the subgraphs correspond one-to-one with the grid block numbers in the grid, and there is no need to record the vertex weights, edge weights, and relationships between vertices during the mapping process from the directed graph to the grid, this embodiment only needs to provide the vertex numbers in each subgraph to convert them into the grid block numbers in each partition, thereby obtaining the final partitioning result of the grid.
[0097] As can be seen from the above, before determining the supercomputer load balancing strategy based on the structured grid in this embodiment, it is first necessary to set the processors in the supercomputer as nodes and construct a structured grid with target grid parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target grid parameters and the hardware architecture of the supercomputer. Next, using the load balancing model, and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node core group communication time constraints, and preset inter-slave core communication time constraints, the structured grid is divided into several segmented grid blocks. Then, based on... The process involves dividing a grid block and determining its corresponding grid values to identify vertices and vertex weights. Then, based on the relationship between two divided grid blocks and the number of adjacent face grid cells, edges and edge weights are determined. The number of grid blocks adjacent to two divided grid blocks is then set as the degree corresponding to the vertex. A directed graph mapping result is determined based on a preset vertex-edge weighted directed graph structure mapping rule, vertices, vertex weights, edges, edge weights, and degrees. Finally, a preset graph partitioning algorithm is used to partition the directed graph mapping result, obtaining the target graph partitioning result. This target graph partitioning result is then inversely mapped to a target grid, and a load balancing strategy corresponding to the supercomputer is determined based on the target grid. This approach improves the efficiency of determining the supercomputer load balancing strategy in the structured grid-based supercomputer load balancing strategy determination process, thereby enhancing the user experience.
[0098] Accordingly, see Figure 7As shown, this application also provides a supercomputer load balancing strategy determination device based on structured grids, comprising:
[0099] The structured mesh construction module 11 is used to set the processors in the supercomputer as nodes, and to construct a structured mesh with target mesh parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target mesh parameters and the hardware architecture of the supercomputer. The hardware architecture includes the nodes, the core groups in the nodes, and the communication structure between the master core and the slave core in the core groups. The target mesh parameters include the number of mesh cells and the number of adjacent faces between mesh blocks.
[0100] The structural mesh segmentation module 12 is used to segment the structural mesh using the load balancing model and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node kernel group communication time constraints, and preset inter-slave kernel communication time constraints to obtain a number of segmented mesh blocks.
[0101] The mapping result determination module 13 is used to determine vertices and vertex weights based on the segmented mesh blocks and their corresponding mesh quantities, and to determine edges and edge weights based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to the two segmented mesh blocks is set as the degree corresponding to the vertex, so as to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight and the degree.
[0102] The load balancing strategy generation module 14 is used to perform graph partitioning processing on the directed graph mapping result using a preset graph partitioning algorithm to obtain a target graph partitioning result, and then inversely map the target graph partitioning result into a target grid to determine the load balancing strategy corresponding to the supercomputer based on the target grid.
[0103] As can be seen from the above, before determining the supercomputer load balancing strategy based on the structured grid in this embodiment, it is first necessary to set the processors in the supercomputer as nodes and construct a structured grid with target grid parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target grid parameters and the hardware architecture of the supercomputer. Next, using the load balancing model, and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node core group communication time constraints, and preset inter-slave core communication time constraints, the structured grid is divided into several segmented grid blocks. Then, based on... The process involves dividing a grid block and determining its corresponding grid values to identify vertices and vertex weights. Then, based on the relationship between two divided grid blocks and the number of adjacent face grid cells, edges and edge weights are determined. The number of grid blocks adjacent to two divided grid blocks is then set as the degree corresponding to the vertex. A directed graph mapping result is determined based on a preset vertex-edge weighted directed graph structure mapping rule, vertices, vertex weights, edges, edge weights, and degrees. Finally, a preset graph partitioning algorithm is used to partition the directed graph mapping result, obtaining the target graph partitioning result. This target graph partitioning result is then inversely mapped to a target grid, and a load balancing strategy corresponding to the supercomputer is determined based on the target grid. This approach improves the efficiency of determining the supercomputer load balancing strategy in the structured grid-based supercomputer load balancing strategy determination process, thereby enhancing the user experience.
[0104] In some specific embodiments, the structured mesh construction module 11 may specifically include:
[0105] A processor determination unit is used to determine each processor in the supercomputer. Each processor includes several core groups, and each core group includes a main core for managing data and several slave cores for processing data. The main core and the slave cores share the processor's memory.
[0106] The mesh partitioning granularity determination unit is used to determine the mesh partitioning granularity based on the computing power of the slave core in the master-slave heterogeneous architecture of the supercomputer, and to determine the adjacent face connection relationship of the mesh based on the communication requirements between each core group, so as to construct a structured mesh based on the mesh partitioning granularity and the adjacent face connection relationship.
[0107] The hardware architecture determination unit is used to determine the hardware architecture corresponding to the supercomputer based on the node, the core group in the node, and the communication structure between the master core and the slave core in the core group, and to determine the corresponding computing level based on the core group, the master core, the slave core, and the node, so as to determine the corresponding storage access latency characteristics based on the computing level.
[0108] The load balancing model construction unit is used to establish a load balancing model corresponding to the supercomputer based on the storage access latency characteristics, the hardware architecture, and the target grid parameters.
[0109] In some specific embodiments, the structured mesh segmentation module 12 may specifically include:
[0110] The first constraint determination unit is used to determine the preset node computation time constraint based on the number of grid cells corresponding to the node, and to determine the preset inter-node communication time constraint based on the number of grid faces that communicate between the node and other nodes.
[0111] The second constraint determination unit is used to determine the preset communication time consumption constraint between the core groups of the node based on the number of mesh faces communicating between the core groups in the node, and to determine the preset communication time consumption constraint between the slave cores based on the number of mesh cells in the core group.
[0112] The weighting coefficient determination unit is used to determine, based on the number of nodes in the structure mesh, the number of mesh blocks in the nodes, and the number of mesh faces communicating, a first weighting coefficient corresponding to the preset node computation time constraint, a second weighting coefficient corresponding to the preset inter-node communication time constraint, a third weighting coefficient corresponding to the preset inter-node kernel group communication time constraint, and a fourth weighting coefficient corresponding to the preset inter-kernel communication time constraint.
[0113] The total execution time determination unit is used to determine the total execution time corresponding to the node based on the preset node computation time constraints, the preset inter-node communication time constraints, the preset inter-node kernel group communication time constraints, the preset inter-slave core communication time constraints, and the corresponding weighting coefficients.
[0114] A mesh segmentation unit is used to segment the structural mesh using the load balancing model and based on the total execution time and a preset mesh segmentation algorithm to obtain several segmented mesh blocks whose geometric shapes meet preset shape conditions; the preset mesh segmentation algorithm includes a recursive bisection method and a multi-block structural mesh segmentation algorithm.
[0115] In some specific embodiments, the mapping result determination module 13 may specifically include:
[0116] The association relationship determination unit is used to map each of the segmented grid blocks to a vertex, determine the grid quantity corresponding to the segmented grid block, determine the vertex weight corresponding to the vertex based on the grid quantity and the first weighting coefficient, then determine the association relationship between every two segmented grid blocks in each segmented grid block, and map the association relationship to an edge;
[0117] An edge weight determination unit is used to determine the number of adjacent face grid cells between every two segmented grid blocks in each segmented grid block, and to determine the edge weight corresponding to the edge based on the number of adjacent face grid cells, the second weighting coefficient, the third weighting coefficient, and the fourth weighting coefficient. Then, it determines the number of adjacent grid blocks between every two segmented grid blocks in each segmented grid block, so as to map the number of adjacent grid blocks to the degree corresponding to the vertex.
[0118] The mapping result determination unit is used to construct a directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight, and the degree; the directed graph mapping result is a directed weighted graph.
[0119] In some specific embodiments, the supercomputer load balancing strategy determination device based on structured grids may further include:
[0120] The coarsening graph determination unit is used to determine each vertex in the directed graph mapping result, and to match each current vertex using a preset graph coarsening algorithm to obtain the current matched vertex, and then to determine the current coarsening graph based on the current matched vertex and the corresponding edge weight.
[0121] The first step jump unit is used to determine whether the size of the graph corresponding to the current coarsening graph is less than a preset threshold. If the size of the graph corresponding to the current coarsening graph is less than the preset threshold, the current coarsening graph is set as the target coarsening graph. If the size of the graph corresponding to the current coarsening graph is not less than the preset threshold, the jump unit jumps back to the step of matching each current vertex using the preset graph coarsening algorithm.
[0122] The second step jump unit is used to determine whether the current coarsening graph meets the preset conditions. If the current coarsening graph meets the preset conditions, the current coarsening graph is set as the target coarsening graph. If the current coarsening graph does not meet the preset conditions, the jump is returned to the step of matching each current vertex using the preset graph coarsening algorithm.
[0123] In some specific embodiments, the load balancing strategy generation module 14 may specifically include:
[0124] The weight and result determination unit is used to perform graph partitioning processing on the current directed graph mapping result using a preset graph partitioning algorithm to obtain the current graph partitioning result, and to determine each current vertex subset corresponding to the current graph partitioning result, as well as the current vertex weights and results corresponding to the current vertex subsets; the preset graph partitioning algorithm includes graph partitioning algorithms based on iterative improvement strategies, graph partitioning algorithms based on construction methods, graph partitioning algorithms based on mathematical methods, and graph partitioning algorithms based on intelligent optimization algorithms;
[0125] The difference judgment unit is used to determine whether the difference between the weight of each current vertex and the result is less than a preset difference threshold. If the difference between the weight of each current vertex and the result is not less than the preset difference threshold, then jump back to the step of performing graph partitioning processing on the current directed graph mapping result using a preset graph partitioning algorithm.
[0126] The edge weight sum determination unit is used to determine the edge weight sum corresponding to each current vertex subset if the difference between the weight sums of each current vertex is less than the preset difference threshold, and set the current graph partitioning result corresponding to the edge weight sum with the smallest value among the edge weight sums as the target graph partitioning result.
[0127] In some specific embodiments, the load balancing strategy generation module 14 may specifically include:
[0128] A load balancing strategy generation subunit is used to map the target graph partitioning result layer by layer to the next level to obtain the mapping result. Then, based on the vertex numbers corresponding to the target graph partitioning result, the mapping result is inversely mapped to the target mesh, and the load balancing strategy corresponding to the supercomputer is determined based on the mesh partitioning result in the target mesh. The mesh block numbers in the target mesh correspond one-to-one with the vertex numbers. The total execution time of each node corresponding to the load balancing strategy is not greater than the total execution time of the node. The total execution time of the node is the total execution time of each node in the structured mesh.
[0129] Furthermore, embodiments of this application also disclose an electronic device, Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the supercomputer load balancing strategy determination method based on a structured grid disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0130] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0131] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0132] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the structured grid-based supercomputer load balancing strategy determination method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0133] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for determining a supercomputer load balancing strategy based on a structured grid. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0134] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0135] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0136] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0137] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0138] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for determining a supercomputer load balancing strategy based on a structured grid, characterized in that, include: The processors in the supercomputer are set as nodes, and a structural grid with target grid parameters is constructed based on the master-slave heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target grid parameters and the hardware architecture of the supercomputer. The hardware architecture includes the node, the core group in the node, and the communication structure between the master core and the slave core in the core group; the target mesh parameters include the number of mesh cells and the number of adjacent faces between mesh blocks; Specifically, the following steps are taken: First, the mesh granularity is determined based on the computing power of the slave cores in the master-slave heterogeneous architecture of the supercomputer. Second, the adjacent-face connectivity of the mesh is determined based on the communication requirements between the core groups. Third, a structured mesh is constructed based on the mesh granularity and the adjacent-face connectivity. Fourth, the hardware architecture corresponding to the supercomputer is determined based on the nodes, the core groups within the nodes, and the communication structure between the master and slave cores within the core groups. Fifth, the corresponding computing levels are determined based on the core groups, the master cores, the slave cores, and the nodes. Sixth, the corresponding storage access latency characteristics are determined based on the computing levels. Finally, a load balancing model corresponding to the supercomputer is established based on the storage access latency characteristics, the hardware architecture, and the target mesh parameters. Using the load balancing model, and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node kernel group communication time constraints, and preset inter-slave kernel communication time constraints, the structure mesh is divided to obtain several segmented mesh blocks. Vertices and vertex weights are determined based on the segmented mesh blocks and their corresponding mesh quantities, and edges and edge weights are determined based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to two segmented mesh blocks is set as the degree corresponding to the vertex, so as to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight and the degree. The directed graph mapping result is processed by a preset graph partitioning algorithm to obtain a target graph partitioning result. Then, the target graph partitioning result is inversely mapped to a target grid to determine the load balancing strategy corresponding to the supercomputer based on the target grid.
2. The method for determining supercomputer load balancing strategies based on structured grids according to claim 1, characterized in that, The step of setting the processor in the supercomputer as a node includes: Each processor in the supercomputer is identified, and each processor includes several core groups. Each core group includes a master core for managing data and several slave cores for processing data. The master core and the slave cores share the processor's memory.
3. The method for determining supercomputer load balancing strategies based on structured grids according to claim 1, characterized in that, The load balancing model is used, and the structural mesh is divided based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-kernel group communication time constraints, and preset inter-slave core communication time constraints to obtain several segmented mesh blocks, including: The preset node computation time constraint is determined based on the number of grid cells corresponding to the node, and the preset inter-node communication time constraint is determined based on the number of grid faces that communicate between the node and other nodes. The preset communication time constraint between the core groups in the node is determined based on the number of mesh faces communicating between the core groups in the node, and the preset communication time constraint between the slave cores is determined based on the number of mesh cells in the core group. Based on the number of nodes in the structured mesh, the number of mesh blocks in the nodes, and the number of mesh faces communicating, a first weighting coefficient corresponding to the preset node computation time constraint, a second weighting coefficient corresponding to the preset inter-node communication time constraint, a third weighting coefficient corresponding to the preset inter-node kernel group communication time constraint, and a fourth weighting coefficient corresponding to the preset inter-kernel communication time constraint are determined. The total execution time corresponding to the node is determined based on the preset node computation time constraint, the preset inter-node communication time constraint, the preset inter-node kernel group communication time constraint, the preset inter-slave kernel communication time constraint, and the corresponding weighting coefficients. The load balancing model is used to divide the structural mesh based on the total execution time and a preset mesh segmentation algorithm to obtain several segmented mesh blocks whose geometric shapes meet preset shape conditions; the preset mesh segmentation algorithm includes a recursive bisection method and a multi-block structural mesh segmentation algorithm.
4. The method for determining supercomputer load balancing strategies based on structured grids according to claim 3, characterized in that, The process involves determining vertices and vertex weights based on the segmented mesh blocks and their corresponding mesh values, and determining edges and edge weights based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to two segmented mesh blocks is set as the degree corresponding to the vertex. This process, based on the vertex, vertex weight, edge, edge weight, and degree, determines the directed graph mapping result, including: Each of the segmented grid blocks is mapped to a vertex, and the grid quantity corresponding to the segmented grid block is determined. Based on the grid quantity and the first weighting coefficient, the vertex weight corresponding to the vertex is determined. Then, the association relationship between every two segmented grid blocks in each segmented grid block is determined, and the association relationship is mapped to an edge. The number of adjacent face grid cells between every two segmented grid blocks in each segmented grid block is determined, and the edge weight corresponding to the edge is determined based on the number of adjacent face grid cells, the second weighting coefficient, the third weighting coefficient, and the fourth weighting coefficient. Then, the number of adjacent grid blocks between every two segmented grid blocks in each segmented grid block is determined, so as to map the number of adjacent grid blocks to the degree corresponding to the vertex. A directed graph mapping result is constructed based on the vertex, the vertex weight, the edge, the edge weight, and the degree; the directed graph mapping result is a directed weighted graph.
5. The method for determining supercomputer load balancing strategies based on structured grids according to claim 1, characterized in that, After determining the directed graph mapping result based on the vertex, vertex weight, edge, edge weight, and degree, the method further includes: Each vertex in the directed graph mapping result is determined, and each current vertex is matched using a preset graph coarsening algorithm to obtain the current matched vertex. Then, the current coarsened graph is determined based on the current matched vertex and the corresponding edge weight. Determine whether the size of the current coarsened graph is less than a preset threshold. If the size of the current coarsened graph is less than the preset threshold, set the current coarsened graph as the target coarsened graph. If the size of the current coarsened graph is not less than the preset threshold, jump back to the step of matching each current vertex using the preset graph coarsening algorithm. Alternatively, determine whether the current coarsened graph meets the preset conditions. If the current coarsened graph meets the preset conditions, then set the current coarsened graph as the target coarsened graph. If the current coarsened graph does not meet the preset conditions, then jump back to the step of matching each current vertex using the preset graph coarsening algorithm.
6. The method for determining supercomputer load balancing strategies based on structured grids according to claim 1, characterized in that, The step of performing graph partitioning processing on the directed graph mapping result using a preset graph partitioning algorithm to obtain the target graph partitioning result includes: The current directed graph mapping result is processed by a preset graph partitioning algorithm to obtain the current graph partitioning result. The current vertex subsets corresponding to the current graph partitioning result, as well as the current vertex weights and results corresponding to the current vertex subsets, are determined. The preset graph partitioning algorithm includes graph partitioning algorithms based on iterative improvement strategies, graph partitioning algorithms based on construction methods, graph partitioning algorithms based on mathematical methods, and graph partitioning algorithms based on intelligent optimization algorithms. Determine whether the difference between the current vertex weight and the result is less than a preset difference threshold. If the difference between the current vertex weight and the result is not less than the preset difference threshold, then jump back to the step of performing graph partitioning processing on the current directed graph mapping result using a preset graph partitioning algorithm. If the difference between the weights and results of each current vertex is less than the preset difference threshold, then the edge weights corresponding to each current vertex subset are determined, and the current graph partitioning result corresponding to the edge weight with the smallest value among the edge weights is set as the target graph partitioning result.
7. The method for determining a supercomputer load balancing strategy based on a structured grid according to any one of claims 1 to 6, characterized in that, The step of inversely mapping the target graph partitioning result to a target grid, and determining the load balancing strategy corresponding to the supercomputer based on the target grid, includes: The target graph partitioning result is mapped layer by layer to the next level to obtain the mapping result. Then, based on the vertex number corresponding to the target graph partitioning result, the mapping result is inversely mapped to the target mesh. Based on the mesh partitioning result in the target mesh, the load balancing strategy corresponding to the supercomputer is determined. Wherein, the grid block number in the target grid corresponds one-to-one with the vertex number; the total execution time of each node corresponding to the load balancing strategy is not greater than the total execution time of the node; the total execution time of the node is the total execution time of each node in the structure grid.
8. A device for determining a supercomputer load balancing strategy based on a structured grid, characterized in that, include: The structured grid construction module is used to set the processors in the supercomputer as nodes, and to construct a structured grid with target grid parameters based on the master-slave core heterogeneous architecture of the supercomputer. Then, a load balancing model is established based on the target grid parameters and the hardware architecture of the supercomputer. The hardware architecture includes the node, the core group in the node, and the communication structure between the master core and the slave core in the core group; the target mesh parameters include the number of mesh cells and the number of adjacent faces between mesh blocks; Specifically, the following steps are taken: First, the mesh granularity is determined based on the computing power of the slave cores in the master-slave heterogeneous architecture of the supercomputer. Second, the adjacent-face connectivity of the mesh is determined based on the communication requirements between the core groups. Third, a structured mesh is constructed based on the mesh granularity and the adjacent-face connectivity. Fourth, the hardware architecture corresponding to the supercomputer is determined based on the nodes, the core groups within the nodes, and the communication structure between the master and slave cores within the core groups. Fifth, the corresponding computing levels are determined based on the core groups, the master cores, the slave cores, and the nodes. Sixth, the corresponding storage access latency characteristics are determined based on the computing levels. Finally, a load balancing model corresponding to the supercomputer is established based on the storage access latency characteristics, the hardware architecture, and the target mesh parameters. The structural mesh segmentation module is used to segment the structural mesh using the load balancing model and based on preset node computation time constraints, preset inter-node communication time constraints, preset inter-node kernel group communication time constraints, and preset inter-slave kernel communication time constraints to obtain several segmented mesh blocks. The mapping result determination module is used to determine vertices and vertex weights based on the segmented mesh blocks and their corresponding mesh quantities, and to determine edges and edge weights based on the association between two segmented mesh blocks and the number of adjacent face mesh units. Then, the number of mesh blocks adjacent to the two segmented mesh blocks is set as the degree corresponding to the vertex, so as to determine the directed graph mapping result based on the vertex, the vertex weight, the edge, the edge weight and the degree. The load balancing strategy generation module is used to perform graph partitioning on the directed graph mapping result using a preset graph partitioning algorithm to obtain a target graph partitioning result, and then inversely map the target graph partitioning result into a target grid to determine the load balancing strategy corresponding to the supercomputer based on the target grid.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method for determining a supercomputer load balancing strategy based on a structured grid as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the supercomputer load balancing strategy determination method based on a structured grid as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Underwater three-dimensional sound field model Bellhop3D parallel implementation method based on domestic many-core supercomputing
CN115437782A
System and method for load balancing for parallel computations on structured multi-block meshes in cfd
US20140365186A1