An automatic multi-substructure data processing method for distributed computing
Through the method of automatic multi -sub -structure data processing method for distributed computing, the problem of difficulty in processing the large -scale sparse matrix is difficult to handle the large -scale sparse matrix, and the rapid solution of the large -scale sparse and broad feature equation is achieved, which significantly improves the calculation efficiency and accuracy.
Patent Information
- Application Number
- CN202411483465.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-23
AI Technical Summary
Traditional stand-alone computing methods are difficult to meet the computational complexity and accuracy requirements of large-scale sparse matrix solutions in structural dynamic analysis and other engineering fields, resulting in too long simulation time and affecting engineering decision efficiency.
Using an automatic multiple substructure data processing method for distributed computing, by estimating the subtree calculation amount of each node in the binary elimination tree, using a static mapping algorithm to map the nodes to different processes, and in each process according to the local node first The global nodes are calculated sequentially, and finally the generalized characteristic equation is assembled and solved in the root process.
It realizes the rapid solution of large-scale sparse generalized characteristic equations, significantly improves the calculation efficiency, and can meet the high requirements of modern engineering simulation for calculation accuracy and efficiency.
Smart Images

Figure CN119003187B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of high-performance numerical computing in engineering, and in particular to an automatic multiple substructure data processing method for distributed computing. Background Art
[0002] The automatic multiple substructure method is widely used in engineering fields such as structural dynamics analysis, structural optimization design, vibration control, electromagnetics, fluid-solid interaction problems, etc., and can provide efficient and accurate dynamic analysis and optimization design solutions. Due to the limitation of hardware resources, the traditional single-machine calculation method has gradually been unable to meet the growing computational complexity and accuracy requirements. When applying the automatic multiple substructure method, it often involves the solution of large-scale sparse matrices, which requires a large amount of memory to store data and perform calculations, and the memory capacity of a single computer is difficult to meet this requirement. At the same time, the processing speed of single-machine calculations is limited, and these complex computing tasks cannot be completed efficiently, which leads to simulation time processes and affects the efficiency of engineering decision-making.
[0003] The technology that is currently closest to the present invention is the SLEPc sparse characteristic equation solver. As a widely recognized distributed computing software, SLEPc covers algorithms for solving various types of equations. However, for solving linear generalized characteristic equations, SLEPc does not provide an automatic multiple substructure solution algorithm. In practical applications, the default Krylov subspace algorithm of SLEPc is used to solve the finite element characteristic equation. The calculation time required is often several times or even dozens of times that of the automatic multiple substructure algorithm, which is difficult to meet the needs of efficient simulation. Summary of the invention
[0004] Based on this, it is necessary to provide an automatic multi-substructure data processing method for distributed computing, the method comprising:
[0005] S1: Estimate the amount of subtree computation when each node in the binary elimination tree is used as the root node; each of the nodes represents a different substructure;
[0006] S2: Based on the subtree computation amount of each node, a static mapping algorithm is used to map each node to a different process, and the node is marked as a global node or a local node;
[0007] S3: In each process, node calculation is performed in the order of local nodes first and global nodes later, and each node transmits the substructure modal data calculated by itself to its parent node;
[0008] S4: After all nodes are calculated, each process transmits the substructure modal data obtained by calculating the nodes to the root process, and the root process assembles the nodes according to their positions in the binary elimination tree to obtain a condensed stiffness matrix and a condensed mass matrix;
[0009] S5: The root process solves the condensed eigenvalues and condensed eigenvectors of the generalized characteristic equation in a given interval, and passes the condensed eigenvectors to each process;
[0010] S6: Each process calculates the local eigenvectors of the nodes in each process based on the condensed eigenvector and the substructure modal data of the nodes in the process; the local eigenvectors in all processes are reduced to the root process to obtain the global eigenvector of the generalized characteristic equation.
[0011] Preferably, in S1, the calculation formula for the subtree calculation amount is:
[0012] ;
[0013] ;
[0014] in, Representation Node i The amount of subtree calculation when it is the root node; Representation Node i An estimate of the number of operations of ; Representation Node j The estimated number of operations of ; Representation Node i The set of descendant nodes of ; n Indicates the size of the node.
[0015] Preferably, in S2, the static mapping algorithm includes:
[0016] Step 1: Create a container and put the root node of the binary elimination tree into the container;
[0017] Step 2: Sort the nodes in the container from large to small according to the amount of subtree calculation;
[0018] Step 3: Allocate all sorted nodes to each process in turn;
[0019] Step 4: Determine whether the node allocation is appropriate based on the sum of the subtree calculations in each process. If appropriate, exit the static mapping algorithm; if not, execute step 5;
[0020] Step 5: Take out the node with the largest subtree computation in the container, mark it as a global node, put its child nodes into the container, and return to step 2.
[0021] Preferably, after performing the static mapping algorithm,
[0022] The root node and some nodes are marked as global nodes, while the remaining nodes are marked as local nodes;
[0023] All local nodes will be assigned to different processes according to their allocation results in the static mapping algorithm;
[0024] All global nodes are sorted from large to small according to the amount of subtree computation, and are allocated to each process in a cyclic manner.
[0025] Preferably, S3 includes:
[0026] Within each process, all local nodes are calculated first;
[0027] Record the number Ndep of dependencies of each global node, where the dependencies are child nodes in other processes that need to transmit data;
[0028] Each node transmits the substructure modal data calculated by itself to its parent node. At the same time, all global nodes monitor whether there are child nodes in other processes transmitting data to themselves;
[0029] When a process obtains data transmitted by other processes, it immediately reduces the number of dependencies Ndep of the corresponding global node by 1, and when the number of dependencies Ndep of any global node is 0, the global node is immediately calculated;
[0030] Otherwise, continue to wait for its child nodes to transmit data.
[0031] Preferably, the substructure modal data includes: a condensed modal vector and a constrained modal matrix;
[0032] The calculation formula of the condensed mode vector is:
[0033] ;
[0034] in, Representation Node i The condensed modal vector of ; Representation Node i The stiffness matrix of Representation Node i The mass matrix of Representation Node i The condensation characteristic value of
[0035] The calculation formula of the constraint mode matrix is:
[0036] ;
[0037] in, Representation Node i With Node k The constraint mode matrix between ; Representation Node i With Nodek The coupling stiffness matrix between ; Representation Node i The set of ancestor nodes.
[0038] Preferably, data transmission uses MPI non-blocking communication.
[0039] Preferably, in S5, the root process uses the Thick Restart Lanczos algorithm to solve the generalized characteristic equation In a given interval The condensed eigenvalues and condensed eigenvectors in ; where represents the stiffness matrix of the condensation, x represents the condensed eigenvector, represents the condensation characteristic value; The mass matrix representing the polycondensation; Indicates the minimum value of the polycondensation characteristic value; Indicates the maximum value of the condensation characteristic value.
[0040] Preferably, in S5, the root process uses the MPI broadcast function MPI_Bcast to pass the condensed feature vector to each process.
[0041] Preferably, in S6, the calculation formula of the local feature vector of the node in the process is:
[0042] ;
[0043] in, Representation Node i The local eigenvector of ; Representation Node i The condensed modal vector of ; Representation Node i The corresponding condensed eigenvector; Representation Node i With Node k The constraint mode matrix between ; Representation Node i The set of ancestor nodes; Representation Node k The local feature vector of .
[0044] Beneficial effects: This method realizes the rapid solution of large-scale sparse generalized characteristic equations suitable for finite element simulation analysis, computational fluid dynamics, electromagnetism and other fields, and can effectively meet the high requirements of modern engineering simulation for computational accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 This is a flowchart of an automatic multiple substructure data processing method for distributed computing according to an embodiment of the present application.
[0047] Figure 2 A schematic diagram of a binary elimination tree according to an embodiment of the present application.
[0048] Figure 3 This is a schematic diagram of global node mapping according to an embodiment of the present application.
[0049] Figure 4 It is a schematic diagram of reducing the local feature vectors in each process to the root process according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0051] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0052] The automatic multiple substructure data processing method for distributed computing provided in this embodiment is intended to promote the automatic multiple substructure method to a distributed computing environment, solve the computational problems in ultra-large-scale structural simulation through task decomposition and multi-machine collaborative processing, improve computational efficiency and accuracy, and meet the actual needs of complex engineering applications.
[0053] like Figure 1 As shown, this embodiment provides an automatic multiple substructure data processing method for distributed computing, the method comprising:
[0054] S1: Estimate the amount of subtree computation when each node in the binary elimination tree is used as a root node; each of the nodes represents a different substructure.
[0055] The schematic diagram of the binary elimination tree is as follows Figure 2 As shown, each black dot in the figure is a node, and also represents a substructure in the automatic multiple substructure algorithm.
[0056] In this embodiment, the number of operations of the nodes in the binary elimination tree is estimated first, and then the amount of subtree calculation when each node is used as a root node is calculated, so as to facilitate the distribution of tasks between processes.
[0057] The calculation formula for the subtree calculation amount is:
[0058] ;
[0059] ;
[0060] in, Representation Node i The amount of subtree calculation when it is the root node; Representation Node i An estimate of the number of operations of ; Representation Node j The estimated number of operations of ; Representation Node i The set of descendant nodes of ; n Indicates the size of the node.
[0061] S2: Based on the subtree computation amount of each node, a static mapping algorithm is used to map each node to a different process, and the node is marked as a global node or a local node.
[0062] Specifically, the static mapping algorithm includes:
[0063] Step 1: Create a container and put the root node of the binary elimination tree into the container;
[0064] Step 2: Sort the nodes in the container from large to small according to the amount of subtree calculation;
[0065] Step 3: Allocate all sorted nodes to each process in turn. For example, if there are five nodes 1, 2, 3, 4, and 5 in the container and they are allocated to three processes 1, 2, and 3, then process 1 gets nodes 1 and 4; process 2 gets nodes 2 and 5; and process 3 gets node 3.
[0066] Step 4: Determine whether the node allocation is appropriate based on the sum of the subtree calculations in each process. If appropriate, exit the static mapping algorithm; if not, execute step 5;
[0067] In this embodiment, the judgment standard is: calculate the sum of the subtree calculation amount in each process, and when the calculation amount of the process with the largest sum does not exceed 5% of the calculation amount of the process with the smallest sum, it is considered appropriate, otherwise it is considered inappropriate;
[0068] Step 5: Take out the node with the largest subtree computation in the container, mark it as a global node, put its child nodes into the container, and return to step 2.
[0069] This embodiment provides an example of a static mapping algorithm, which is as follows:
[0070] When there is only one root node in the container, there is no need to sort; and if there is only one process A, the root node will be assigned to process A, the load is balanced, the allocation is appropriate, and the static mapping algorithm is exited; if there are multiple processes, such as A, B, and C, the root node will be assigned to process A according to the rules of step 3. At this time, the load of process A is the subtree calculation amount of the root node, the load of process B is 0, and the load of process C is 0. The load is unbalanced and the allocation is inappropriate, and step 5 is executed.
[0071] In this embodiment, after performing the static mapping algorithm,
[0072] The root node and some nodes are marked as global nodes, while the remaining nodes are marked as local nodes;
[0073] All local nodes will be assigned to different processes according to their allocation results in the static mapping algorithm;
[0074] All global nodes are sorted from large to small according to the amount of subtree computation, and are allocated to each process in a cyclic manner.
[0075] S3: In each process, node calculation is performed in the order of local nodes first and global nodes later, and each node transmits the substructure modal data calculated by itself to its parent node.
[0076] Each process calculates the node tasks assigned to it in the order of local nodes first and global nodes later. Since all local nodes can be divided into independent subtrees, there is no need for processes to communicate with each other to transfer data when calculating local nodes. When calculating global nodes, each process may not have the child node data of the current global node, so it needs to wait for the corresponding process to calculate and transmit. Figure 3 As shown, when process 3 calculates global node 6, it needs node data 4 of process 1 and node data 5 of process 2; when process 1 calculates global node 7, it needs data 3 and 6 of process 3.
[0077] Specifically, within each process, all local nodes are calculated first;
[0078] Record the number Ndep of dependencies of each global node, where the dependencies are child nodes in other processes that need to transmit data;
[0079] Each node transmits the substructure modal data calculated by itself to its parent node. At the same time, all global nodes monitor whether there are child nodes in other processes transmitting data to themselves;
[0080] When a process obtains data transmitted by other processes, it immediately reduces the number of dependencies Ndep of the corresponding global node by 1, and when the number of dependencies Ndep of any global node is 0, the global node is immediately calculated;
[0081] Otherwise, continue to wait for its child nodes to transmit data.
[0082] In this embodiment, the substructure modal data includes: a condensed modal vector and a constrained modal matrix;
[0083] The calculation formula of the condensed mode vector is:
[0084] ;
[0085] in, Representation Node i The condensed modal vector of ; Representation Node i The stiffness matrix of Representation Node i The mass matrix of Representation Node i The condensation characteristic value of
[0086] The calculation formula of the constraint mode matrix is:
[0087] ;
[0088] in, Representation Node i With Node k The constraint mode matrix between ; Representation Node i With Node k The coupling stiffness matrix between ; Representation Node i The set of ancestor nodes.
[0089] In this embodiment, data transmission uses MPI's non-blocking communication (MPI_ISend) to ensure computing efficiency.
[0090] S4: After all nodes are calculated, each process transmits the substructure modal data obtained by calculating the nodes to the root process, and the root process assembles the condensed stiffness matrix and the condensed mass matrix according to the positions of the nodes in the binary elimination tree.
[0091] S5: The root process solves the condensed eigenvalues and condensed eigenvectors of the generalized characteristic equation in a given interval and passes the condensed eigenvectors to each process.
[0092] Specifically, the root process uses the Thick Restart Lanczos algorithm to solve the generalized characteristic equation In a given interval The condensed eigenvalues and condensed eigenvectors in ; where represents the stiffness matrix of the condensation, x represents the condensed eigenvector, represents the condensation characteristic value; The mass matrix representing the polycondensation; Indicates the minimum value of the polycondensation characteristic value; Indicates the maximum value of the condensation characteristic value.
[0093] Furthermore, the solution process includes:
[0094] Step 1: Calculate the first sparse matrix and the second sparse matrix; the calculation formula is:
[0095] ;
[0096] ;
[0097] in, represents the first sparse matrix; represents the stiffness matrix of the polycondensation; Indicates the minimum value of the polycondensation characteristic value; The mass matrix representing the polycondensation; represents the second sparse matrix; Indicates the maximum value of the polycondensation characteristic value;
[0098] Step 2: Use a sparse matrix direct method solver (such as MUMPS) to decompose the first sparse matrix and the second sparse matrix, obtain the number of negative eigenvalues num1 and num2 respectively, and set the maximum iteration step to m=num2-num1+8;
[0099] Step 3: Use the Lanczos method to iteratively solve the generalized characteristic equation. Check whether it converges after every m iterations. If it converges, exit the calculation. Otherwise, restart (Thick Restart) and continue iterating until convergence.
[0100] In this embodiment, the root process uses the MPI broadcast function MPI_Bcast to pass the condensed feature vector to each process.
[0101] S6: Each process calculates the local eigenvectors of the nodes in each process based on the condensed eigenvector and the substructure modal data of the nodes in the process; the local eigenvectors in all processes are reduced to the root process to obtain the global eigenvector of the generalized characteristic equation.
[0102] Specifically, the calculation formula of the local feature vector of the node in the process is:
[0103] ;
[0104] in, Representation Node i The local eigenvector of ; Representation Node i The condensed modal vector of ; Representation Node i The corresponding condensed eigenvector; Representation Node i With Node k The constraint mode matrix between ; Representation Node i The set of ancestor nodes; Representation Node k The local feature vector of .
[0105] like Figure 4 As shown, by reducing the local eigenvectors in all processes to the root process, the global eigenvector of the generalized characteristic equation can be obtained.
[0106] This method divides the nodes in the binary elimination tree into two categories: local nodes and global nodes. The nodes are cyclically mapped to each process to ensure load balancing, and the correspondence between nodes and processes is recorded. Each process calculates the nodes assigned to it in the order of local first and global. When all the nodes of the binary elimination tree are calculated, each process calculates its own local eigenvector, and finally reduces it to the root process to obtain the global eigenvector of the generalized characteristic equation.
[0107] This embodiment aims at the demand for efficient solution of large-scale sparse generalized characteristic equations in the field of CAE simulation, and provides a reliable method for efficiently solving large-scale sparse generalized characteristic equations in a distributed system, specifically an automatic multiple substructure data processing method for distributed computing. By combining distributed computing technology in the task decomposition process, the large-scale structural model is divided into multiple substructures, and efficient load balancing and task scheduling are achieved in the process of multi-machine collaborative processing. In addition, in the process of solving the generalized eigenvalue problem, the data sharing and parallel computing between nodes in the distributed system effectively reduce the calculation time and significantly improve the solution efficiency. The automatic multiple substructure data processing method provided in this embodiment realizes the rapid solution of large-scale sparse generalized characteristic equations suitable for finite element simulation analysis, computational fluid dynamics, electromagnetism and other fields, and can effectively meet the high requirements of modern engineering simulation for calculation accuracy and efficiency.
[0108] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.
Claims
1. An automatic multi-substructure data processing method for distributed computing, characterized in that: include: S1: Estimate the amount of subtree computation when each node in the binary elimination tree is used as the root node; Each of the nodes represents a different substructure; S2: Based on the subtree computation amount of each node, a static mapping algorithm is used to map each node to a different process, and the node is marked as a global node or a local node; The static mapping algorithm includes: Step 1: Create a container and put the root node of the binary elimination tree into the container; Step 2: Sort the nodes in the container from large to small according to the amount of subtree calculation; Step 3: Allocate all sorted nodes to each process in turn; Step 4: Determine whether the node allocation is appropriate based on the sum of the subtree calculations in each process. If appropriate, exit the static mapping algorithm; if not, execute step 5; Step 5: Take out the node with the largest subtree computation in the container, mark it as a global node, put its child nodes into the container, and return to step 2; After the static mapping algorithm is performed, The root node and some nodes are marked as global nodes, while the remaining nodes are marked as local nodes; All local nodes will be assigned to different processes according to their allocation results in the static mapping algorithm; All global nodes are sorted from large to small according to the amount of subtree computation, and are allocated to each process in turn; S3: In each process, node calculation is performed in the order of local nodes first and global nodes later, and each node transmits the substructure modal data calculated by itself to its parent node; S4: After all nodes are calculated, each process transmits the substructure modal data obtained by calculating the nodes to the root process, and the root process assembles the nodes according to their positions in the binary elimination tree to obtain a condensed stiffness matrix and a condensed mass matrix; S5: The root process solves the condensed eigenvalues and condensed eigenvectors of the generalized characteristic equation in a given interval, and passes the condensed eigenvectors to each process; S6: Each process calculates the local eigenvectors of the nodes in each process based on the condensed eigenvector and the substructure modal data of the nodes in the process; the local eigenvectors in all processes are reduced to the root process to obtain the global eigenvector of the generalized characteristic equation.
2. The automatic multi-substructure data processing method for distributed computing according to claim 1, characterized in that: In S1, the calculation formula for the subtree calculation amount is: ; ; in, Representation Node i The amount of subtree calculation when it is the root node; Representation Node i An estimate of the number of operations of ; Representation Node j The estimated number of operations of ; Representation Node i The set of descendant nodes of ; n Indicates the size of the node.
3. The method for automatic multi-substructure data processing for distributed computing according to claim 1, characterized in that S3 include: Within each process, all local nodes are calculated first; Record the number Ndep of dependencies of each global node, where the dependencies are child nodes in other processes that need to transmit data; Each node transmits the substructure modal data calculated by itself to its parent node. At the same time, all global nodes monitor whether there are child nodes in other processes transmitting data to themselves; When a process obtains data transmitted by other processes, it immediately reduces the number of dependencies Ndep of the corresponding global node by 1, and when the number of dependencies Ndep of any global node is 0, the global node is immediately calculated; Otherwise, continue to wait for its child nodes to transmit data.
4. The automatic multi-substructure data processing method for distributed computing according to claim 1, characterized in that: The substructure modal data includes: a condensed modal vector and a constrained modal matrix; The calculation formula of the condensed mode vector is: ; in, Representation Node i The condensed mode vector of ; Representation Node i The stiffness matrix of Representation Node i The mass matrix of Representation Node i The condensation characteristic value of The calculation formula of the constraint mode matrix is: ; in, Representation Node i With Node k The constraint mode matrix between ; Representation Node i With Node k The coupling stiffness matrix between ; Representation Node i The set of ancestor nodes.
5. The automatic multi-substructure data processing method for distributed computing according to claim 1, characterized in that: The data transmission uses MPI's non-blocking communication.
6. The automatic multi-substructure data processing method for distributed computing according to claim 1, characterized in that: In S5, the root process uses the Thick Restart Lanczos algorithm to solve the generalized characteristic equation In a given interval The condensed eigenvalues and condensed eigenvectors in ; where represents the stiffness matrix of the polycondensation, x represents the condensed eigenvector, represents the condensation characteristic value; The mass matrix representing the polycondensation; Indicates the minimum value of the polycondensation characteristic value; Indicates the maximum value of the condensation characteristic value.
7. The automatic multi-substructure data processing method for distributed computing according to claim 1, characterized in that: In S5, the root process uses the MPI broadcast function MPI_Bcast to transfer the condensed feature vector to each process.
8. The method for automatic multi-substructure data processing for distributed computing according to claim 4, characterized in that: In S6, the calculation formula of the local feature vector of the node in the process is: ; in, Representation Node i The local eigenvector of ; Representation Node i The condensed mode vector of ; Representation Node i The corresponding condensed eigenvector; Representation Node i With Node k The constraint mode matrix between ; Representation Node i The set of ancestor nodes; Representation Node k The local feature vector of .
Citation Information
Patent Citations
Large-scale heat transfer heterogeneous parallel simulation method based on DDM
CN116258042A
CPU and GPU heterogeneous parallel automatic multi-substructure data processing method
CN117311948A