Heterogeneous multi-domain processor-oriented reaction flow simulation application load balance scheduling optimization method and system
By implementing the collaborative work of multi-level adaptive load balancing scheduling and seulex ode solver on heterogeneous multi-domain processors, the problem of the bottleneck of the computing performance of the reaction flow simulation on heterogeneous multi-processors is solved, and efficient load balancing is achieved and Improved computing performance.
Patent Information
- Application Number
- CN202410900505.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-12-10
AI Technical Summary
Efficiently implement reaction flow simulation on heterogeneous multiprocessors, especially since stoichiometric calculations occupy the majority of the calculations. How to efficiently implement the seulex ode solver based on OpenFOAM on the new generation of supercomputers and perform load balancing scheduling during the solution process, Making full use of heterogeneous multi-domain processor performance has become a technical problem that needs to be solved urgently.
Provide a load balancing scheduling optimization method for react flow simulation for heterogeneous multi-domain processors. Through multi-level adaptive load balancing scheduling, including node-level, CPU and accelerated domain cluster-to-cluster-level load balancing scheduling, combined with seulex ode Solver optimizes grid task allocation and computing resource utilization, and realizes the coordinated work of CPU and acceleration domain clusters.
The overall computing performance is significantly improved, and multi-level adaptive load balancing scheduling and heterogeneous multi-domain collaborative computing of large-scale heterogeneous multi-domain processors are realized. The computing performance is improved by 21.43 times, ensuring the accuracy of reaction flow simulation.
Smart Images

Figure CN119106622A_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the fields of fluid mechanics and high performance computing, and in particular to a load balancing scheduling optimization method and system for reactive flow simulation applications for heterogeneous multi-domain processors. [Background technology]
[0002] Computational fluid dynamics refers to a science and technology that uses numerical methods and computers to solve and visualize state equations for physical problems such as fluid flow and heat conduction. It is the cornerstone of understanding fields such as aerodynamics, hydraulic engineering, and chemical kinetics. The reaction flow model is a representative of the chemical kinetics model. The development of efficient reaction flow simulation tools is the key to studying and developing low-pollution combustion concepts. However, the reaction flow model not only involves the calculation of fluid physical quantities, but also involves chemical calculations of temperature, pressure, substance concentration, and reaction rate, and chemical calculations often account for 90% of the total calculation amount. Therefore, the computational cost of the reaction flow model can often reach more than 100 times that of the fluid dynamics model, and as the demand for more detailed reaction flow models becomes prominent, the size and complexity of the model will also increase, making the computational cost of the model even larger. Therefore, it is very necessary to efficiently implement combustion simulation software on current high-performance computers.
[0003] Nowadays, the performance improvement of single-core CPU has reached a bottleneck, and the use of heterogeneous multi-processors and accelerators in supercomputers at home and abroad has become a development trend. How to efficiently implement the seulex ode solver based on OpenFOAM on the heterogeneous multi-domain processors used by my country's new generation of E-class supercomputers, and how to allocate a large number of grids to heterogeneous computing resources and optimize load balancing scheduling during the solution process to fully utilize the performance of heterogeneous multi-domain processors, because the chemical calculation cost of each grid varies over time, is a technical problem that needs to be solved urgently. [Summary of the invention]
[0004] In view of the shortcomings of the prior art, the present application provides a load balancing scheduling optimization method and system for reactive flow simulation applications for heterogeneous multi-domain processors, which realizes multi-level adaptive load balancing scheduling of large-scale heterogeneous multi-domain processors and accelerates vectorized ordinary differential equation calculations in cluster domains, further improving the overall computing performance.
[0005] The present application provides a method and system for optimizing load balancing scheduling of reactive stream simulation applications for heterogeneous multi-domain processors, including the following steps:
[0006] S1, determine whether the load balance is satisfied between nodes at the current time step; and,
[0007] If not, execute step S2;
[0008] If yes, execute step S3;
[0009] S2, perform node-level load balancing scheduling to achieve node-level adaptive load balancing;
[0010] S3: Inside the node, load balancing scheduling is performed between the CPU and the acceleration domain cluster to achieve adaptive load balancing between the CPU and the acceleration domain cluster.
[0011] S4: Execute thread-level load balancing scheduling inside the acceleration domain cluster to achieve thread-level adaptive load balancing;
[0012] S5, the CPU and the acceleration domain cluster jointly perform ordinary differential equation calculations to obtain solution results;
[0013] S6. The CPU summarizes the solution results and updates the reaction rate, and returns to step S1.
[0014] Preferably, the heterogeneous multi-domain processor includes the following features:
[0015] (1) Heterogeneous multi-domain architecture based on regional autonomy, including general area and acceleration area. The general area consists of 16 CPU cores, each with its own L1 cache (32KB) and L2 cache (512KB); the acceleration area consists of 96 control cores (Ctrl) and 1536 acceleration cores (Acc), which are evenly divided into 4 acceleration domain clusters. Each acceleration domain cluster includes 24 control cores (Ctrl), 384 acceleration cores (Acc), as well as on-chip shared memory (GSM), high-bandwidth shared memory (HBSM) and off-chip memory space (DDR). Each acceleration domain cluster executes independently. The CPU in the general area can access all HBSM and DDR spaces of different acceleration domain clusters, while the control core and acceleration core can only access the GSM, HBSM and DDR in their own acceleration domain cluster.
[0016] (2) High-efficiency vector processing architecture. One control core and 16 acceleration cores form an acceleration array. The 16 acceleration cores in the acceleration array execute in parallel in a vector manner, using explicit on-chip storage space management, supporting double, single, and half-precision floating-point calculations, and each acceleration core contains three floating-point multiplication and addition units (MACs).
[0017] (3) High-bandwidth and high-reliability parallel memory. The parallel memory supports 16×2-way (half-word, word, double-word) parallel memory access (512B / Cycle), which can provide up to 512 bytes of vector data to 16 accelerator cores at the same time.
[0018] (4) Hierarchical heterogeneous interconnection network, including a two-dimensional mesh network in the general domain, a full cross network in the acceleration domain, and a top-level interconnection channel between domains. The two-dimensional mesh network connects 16 CPUs that support cache coherence; the full cross network connects the acceleration arrays in the acceleration domain cluster and has an ultra-high bandwidth of 2.4Tbps; the top-level interconnection channel connects the two-dimensional mesh network and the full cross network through 8 high-bandwidth data paths, serving as a data sharing bridge between the general area and the acceleration area.
[0019] Data sharing between different acceleration domain clusters is achieved through the CPU side. The general area is capable of overall task control, operating system startup and general processing, while the acceleration area is designed for computationally intensive tasks.
[0020] Preferably, the node is a terminal device equipped with a heterogeneous multi-domain processor; the reaction rate refers to the speed at which a chemical reaction proceeds, expressed as the change in substance concentration per unit time; the reaction rate of the grid is obtained by numerically solving the ordinary differential equation of the chemical reaction, and depends on the thermochemical variables (temperature, pressure and substance concentration) in the grid; the ordinary differential equation refers to an equation represented by the rate of change of thermochemical components over time; the substance concentration refers to the amount of a certain chemical substance per unit volume, including the concentrations of fuel, oxidant, intermediates and final products.
[0021] Preferably, the node-level load balancing scheduling comprises the following steps:
[0022] (1) Grid preprocessing: Packing the thermochemical variables and other variables required for solving ordinary differential equations of each grid into grid tasks to form a grid task set;
[0023] (2) Node-level adaptive load balancing scheduling, sorting the load of all nodes, where the node load is defined as the sum of the CPU time spent by the node to solve all grid tasks in the node in the previous time step (the time spent on the acceleration domain cluster is converted into the corresponding CPU time according to the ratio of the CPU to the computing power of the acceleration domain cluster). Calculate the global average load of all nodes Set a load threshold L threshold , to determine whether the load distribution between nodes in the previous time step satisfies the load balance in this time step. If the node with the largest load is l max and the node with the least load min satisfy,
[0024] and The load balancing scheduling between nodes in the previous time step is maintained, and after the scheduling is completed, the load balancing scheduling between the CPU and the acceleration domain cluster is executed;
[0025] If it is not satisfied, re-perform load balancing scheduling between nodes to find a node with a load greater than The node is the sender, and the load is less than The node is the receiver, and the sender sends part of the grid task to the receiver so that all nodes have the global average load Update the node's grid task set;
[0026] (3) Update the reaction rate. After the ordinary differential equation calculation is completed, the receiver transmits the solution result of the grid task back to the sender and updates the reaction rate of the grid.
[0027] Preferably, the load balancing scheduling between the CPU and the acceleration domain cluster includes the following steps:
[0028] (1) Calculate the load distribution ratio S p , S p Defined as the average time taken by a single CPU core to solve an ordinary differential equation compared to a single control core at the pth time step. The average time the CPU waits for the acceleration domain cluster to complete the solution, based on the previous k time steps. Waiting time threshold tt hreshold and the load distribution ratio of the previous time step, calculate S p :
[0029]
[0030] Among them, a is a constant coefficient;
[0031] (2) Adaptive load balancing scheduling between CPU and acceleration domain clusters, based on the calculated S p Assign the grid tasks in the node to the CPU and the acceleration domain cluster. The target CPU load in the node is,
[0032]
[0033] Among them, l is the load of the current node, N core 、N ctrl and N cluster are the number of CPU cores, control cores and acceleration domain clusters in the current node respectively. Select the task that satisfies l from the grid task set. cpu The grid tasks of the load are collected and the remaining grid tasks are transferred to the acceleration domain cluster;
[0034] (3) Record the waiting time. Record the length of time the CPU waits for the acceleration domain cluster in this time step, which will be used for load balancing scheduling between the CPU and the acceleration domain cluster in the next time step.
[0035] Preferably, the thread-level load balancing scheduling comprises the following steps:
[0036] (1) Data loading: The grid tasks assigned to the acceleration domain clusters in the load balancing scheduling between the CPU and the acceleration domain clusters are evenly divided according to the load. The CPU transmits the evenly divided grid tasks to each acceleration domain cluster respectively;
[0037] (2) Adaptive load balancing scheduling between threads. The threads of each acceleration domain cluster are placed in a thread pool to jointly solve grid tasks. If there are idle threads in the thread pool and there are grid tasks to be solved, the idle thread will take a grid task to solve and return to the thread pool after the solution is completed;
[0038] (3) After all grid tasks of the acceleration domain cluster are solved, the solution results are transmitted back to the CPU. Preferably, the ordinary differential equation calculation adopts the seulex ode solver, and the explicit Euler method is used to realize the evolution of physical quantities over time. The seulex ode solver is a solver that uses the seulex algorithm to solve ordinary differential equations. The ordinary differential equation calculation includes the following steps:
[0039] (1) Before the first time step solution begins, the reaction constants and thermodynamic constants are transferred from the CPU to the on-chip shared memory of the acceleration domain cluster for storage;
[0040] (2) CPU threads parallelize grid computing tasks;
[0041] (3) The acceleration domain cluster threads parallelize the grid tasks, construct vectors during the material concentration calculation process, and the acceleration cores parallelize the material concentration changes.
[0042] The present application also provides a reactive flow simulation application load balancing scheduling optimization system for heterogeneous multi-domain processors, including:
[0043] A judgment module is used to judge whether the load balance is satisfied between nodes at the current time step;
[0044] A node-level load balancing scheduling module, used to perform node-level load balancing scheduling;
[0045] A CPU and acceleration domain inter-cluster load balancing scheduling module, used to perform CPU and acceleration domain inter-cluster load balancing scheduling;
[0046] Thread-level load balancing scheduling module, used to accelerate the execution of thread-level load balancing scheduling within the domain cluster;
[0047] The computing module is used for the CPU and the acceleration domain cluster to jointly perform ordinary differential equation calculations to obtain solution results;
[0048] The updating module is used for the CPU to summarize the solution results and update the reaction rate.
[0049] Experiments have shown that the computing performance of 50 nodes with a total of 800 CPU cores and 800 acceleration domain clusters using the load balancing scheduling optimization method and system for reactive flow simulation applications for heterogeneous multi-domain processors has been significantly improved compared with the case where 50 nodes with a total of 800 CPU cores use the original seulex ode solver, reaching a rate 21.43 times the original computing performance.
[0050] While ensuring the accuracy of reaction flow simulation, the present invention realizes multi-level adaptive load balancing scheduling optimization and heterogeneous multi-domain collaborative computing of large-scale heterogeneous multi-domain processors, further improving the overall computing performance.
Brief Description of the Drawings
[0051] Figure 1 It is a flow chart of a method and system for optimizing load balancing scheduling of reactive stream simulation applications for heterogeneous multi-domain processors according to the present invention;
[0052] Figure 2 A multi-level adaptive load balancing scheduling step diagram of a reactive stream simulation application load balancing scheduling optimization method and system for heterogeneous multi-domain processors of the present invention;
[0053] Figure 3 The invention discloses an acceleration domain framework diagram of a heterogeneous multi-domain processor of a method and system for optimizing load balancing scheduling of reactive stream simulation applications for heterogeneous multi-domain processors.
[0054] Figure 4 The present invention provides a load balancing scheduling optimization method for reactive flow simulation applications oriented to heterogeneous multi-domain processors and a relationship diagram of load balancing scheduling at each level and ordinary differential equation calculation of the system. [Specific implementation method]
[0055] The present invention discloses a load balancing scheduling optimization method and system for reactive flow simulation applications for heterogeneous multi-domain processors. The present application has the characteristics of high computing performance while ensuring accuracy, and can be widely used in chemical engineering simulation of combustion, cracking, polymerization and other reaction processes, fire dynamics simulation of combustion process, smoke generation, fire spread in fire, and optimization of combustion process and improvement of fuel utilization efficiency in the energy field.
[0056] The present application can significantly improve the computing performance while ensuring the accuracy. The specific implementation methods of the present application will be described in detail below in conjunction with the accompanying drawings. It is worth noting that what is described in this implementation method is only a common use method of the present application. The technology used in the present application should be protected until practitioners in related fields can develop better solutions.
[0057] In one embodiment, Figure 1This is a flow chart of a method and system for optimizing load balancing scheduling of reactive stream simulation applications for heterogeneous multi-domain processors according to the present invention. It can be seen that:
[0058] Step 101, determining whether load balancing is satisfied between nodes at the current time step; and,
[0059] If not, execute step 102;
[0060] If yes, execute step 103;
[0061] Step 102, executing node-level load balancing scheduling to achieve node-level adaptive load balancing;
[0062] Step 103: inside the node, load balancing scheduling is performed between the CPU and the acceleration domain cluster to achieve adaptive load balancing between the CPU and the acceleration domain cluster;
[0063] Step 104, executing thread-level load balancing scheduling inside the acceleration domain cluster to achieve thread-level adaptive load balancing;
[0064] Step 105, the CPU and the acceleration domain cluster jointly perform ordinary differential equation calculations to obtain a solution result;
[0065] Step 106 , the CPU summarizes the solution results and updates the reaction rate, and returns to step 101 .
[0066] In step 102, node-level load balancing scheduling includes the following steps:
[0067] (1) Grid preprocessing: The thermochemical variables and other variables required for solving ordinary differential equations in each grid are packaged into a grid task set. The content of the grid task is shown in Table 1. Here N sp is the amount of substances involved in the chemical reaction;
[0068] Table 1 Grid tasks
[0069] Variable meaning Variable Types Substance concentration <![CDATA[double array of length N sp > temperature double pressure double density double Grid ID int Chemical time step double CFD time step double Solving time double
[0070] (2) Node-level adaptive load balancing scheduling, sorting the load of all nodes, where the node load is defined as the sum of the CPU time spent by the node to solve all grid tasks in the node in the previous time step (the time spent on the acceleration domain cluster is converted into the corresponding CPU time according to the ratio of the CPU to the computing power of the acceleration domain cluster). Calculate the global average load of the node Set a load threshold L threshold , to determine whether the load distribution between nodes in the previous time step satisfies the load balance in this time step. If the node with the largest load is lm ax and the node with the least load min satisfy,
[0071] and The load balancing scheduling between nodes in the previous time step is maintained, and after the scheduling is completed, the load balancing scheduling between the CPU and the acceleration domain cluster is executed;
[0072] If it is not satisfied, re-perform load balancing scheduling between nodes to find a node with a load greater than The node is the sender, and the load is less than The nodes are used as receivers, and grid tasks are sent between senders and receivers so that all nodes have a global average load Update the node's grid task set;
[0073] (3) Update the reaction rate. After the ordinary differential equation is calculated, the receiver transmits the solution result of the grid task back to the sender according to the information received and sent in the node-level adaptive load balancing scheduling, and updates the reaction rate of the corresponding grid.
[0074] In step 103, the load balancing scheduling between the CPU and the acceleration domain cluster includes the following steps:
[0075] (1) Calculate the load distribution ratio S p , so that the CPU and the acceleration domain clusters can be adaptively load balanced, where S p Defined as the average time taken by a single CPU core to solve an ordinary differential equation compared to a single control core at the pth time step. The average time the CPU waits for the acceleration domain cluster to complete the solution, based on the previous k time steps. And set a waiting time threshold t threshold , determine the average waiting time With threshold t threshold relationship; and
[0076] like This indicates that the load on the acceleration domain cluster is too large and that S needs to be increased. p ;
[0077] like This indicates that the load of the acceleration domain cluster is insufficient and S needs to be reduced. p ;
[0078] Calculate the load distribution ratio S of the CPU and the acceleration domain cluster at the pth time step p :
[0079]
[0080] Among them, a is a constant coefficient;
[0081] (2) Adaptive load balancing scheduling between CPU and acceleration domain clusters, based on the calculated S pAssign the grid tasks in the node to the CPU and the acceleration domain cluster. The target CPU load in the node is,
[0082]
[0083] Among them, l is the load of the current node, N core 、N ctrl and N cluster are the number of CPU cores, control cores and acceleration domain clusters in the current node respectively. Select the task that satisfies l from the grid task set. cpu The grid tasks of the load are collected and the remaining grid tasks are transferred to the acceleration domain cluster;
[0084] (3) Record the waiting time. Record the length of time the CPU waits for the acceleration domain cluster in this time step, which will be used for load balancing scheduling between the CPU and the acceleration domain cluster in the next time step.
[0085] In step 104, thread-level load balancing scheduling includes the following steps:
[0086] (1) Data loading: The grid tasks assigned to the acceleration domain clusters in the load balancing scheduling between the CPU and the acceleration domain clusters are evenly divided according to the load. The CPU transmits the evenly divided grid tasks to each acceleration domain cluster respectively;
[0087] (2) Adaptive load balancing scheduling between threads: The CPU and threads of each acceleration domain cluster are placed in a thread pool to jointly solve grid tasks. If there are idle threads in the thread pool and grid tasks to be solved, the idle thread will take a grid task to solve and return to the thread pool after the solution is completed;
[0088] (3) All grid tasks in the acceleration domain cluster are solved and the solution results are transmitted back to the CPU.
[0089] In step 105, ordinary differential equation calculation includes the following steps:
[0090] (1) Before the first time step solution begins, the reaction constants and thermodynamic constants are transferred from the CPU to the on-chip shared memory of the acceleration domain cluster for storage;
[0091] (2) CPU threads parallelize grid tasks;
[0092] (3) The acceleration domain cluster threads parallelize the grid tasks, construct vectors during the material concentration calculation process, and the acceleration cores parallelize the material concentration changes.
[0093] In one embodiment, Figure 2 This is a multi-level adaptive load balancing scheduling step diagram of a reactive stream simulation application load balancing scheduling optimization method and system for heterogeneous multi-domain processors of the present invention. It can be seen that
[0094] Step 201: Node-level adaptive load balancing scheduling. Since the cost of data communication between nodes is high, the communication volume between nodes should be reduced as much as possible. It is necessary to determine the node with the maximum load at each time step. max and the node with the least load min Is it satisfied?
[0095] and If yes, maintain the inter-node load distribution of the previous time step and proceed to step 202; if no, re-execute the node-level load balancing scheduling, and at the same time, the load amount sent by the sender to the receiver is required to be greater than 1% of the sender's node load, that is, ignore very small inter-node load balancing communications;
[0096] Step 202 CPU and acceleration domain cluster load balancing scheduling. Since there is a 16-core CPU and 4 independent acceleration domain clusters in the node, 4 CPU cores each control 1 acceleration domain cluster. After performing the CPU and acceleration domain cluster load balancing scheduling, the process proceeds to step 203. The remaining 12 CPU cores directly proceed to step 203.
[0097] Step 203 thread-level adaptive load balancing scheduling. The 12 CPU cores that directly enter step 203 each create a thread to perform ordinary differential equation calculations. The remaining CPU cores also serve as threads after completing step 202 to perform ordinary differential equation calculations. The four acceleration domain clusters each create a thread pool consisting of 24 acceleration arrays to perform thread-level load balancing scheduling and ordinary differential equation calculations.
[0098] Among them, the steps that require data communication are Figure 2 Indicated by black arrows.
[0099] In one embodiment, Figure 3 The figure shows the overall framework diagram of a heterogeneous multi-domain processor of a reactive stream simulation application load balancing scheduling optimization method and system for a heterogeneous multi-domain processor. The features of the heterogeneous multi-domain processor are as follows:
[0100] (1) Heterogeneous multi-domain architecture based on regional autonomy, including general area and acceleration area. The general area consists of 16 CPU cores, each with its own L1 cache (32KB) and L2 cache (512KB); the acceleration area consists of 96 control cores (Ctrl) and 1536 acceleration cores (Acc), which are evenly divided into 4 acceleration domain clusters. Each acceleration domain cluster includes 24 control cores (Ctrl), 384 acceleration cores (Acc), as well as on-chip shared memory (GSM), high-bandwidth shared memory (HBSM) and off-chip memory space (DDR). Each acceleration domain cluster executes independently. The CPU in the general area can access all HBSM and DDR spaces of different acceleration domain clusters, while the control core and acceleration core can only access the GSM, HBSM and DDR in their own acceleration domain cluster.
[0101] (2) High-efficiency vector processing architecture. One control core and 16 acceleration cores form an acceleration array. The 16 acceleration cores in the acceleration array execute in parallel in a vector manner, using explicit on-chip storage space management, supporting double, single, and half-precision floating-point calculations, and each acceleration core contains three floating-point multiplication and addition units (MACs).
[0102] (3) High-bandwidth and high-reliability parallel memory. The parallel memory supports 16×2-way (half-word, word, double-word) parallel memory access (512B / Cycle), which can provide up to 512 bytes of vector data to 16 accelerator cores at the same time.
[0103] (4) Hierarchical heterogeneous interconnection network, including a two-dimensional mesh network in the general domain, a full cross network in the acceleration domain, and a top-level interconnection channel between domains. The two-dimensional mesh network connects 16 CPUs that support cache coherence; the full cross network connects the acceleration arrays in the acceleration domain cluster and has an ultra-high bandwidth of 2.4Tbps; the top-level interconnection channel connects the two-dimensional mesh network and the full cross network through 8 high-bandwidth data paths, serving as a data sharing bridge between the general area and the acceleration area.
[0104] Data sharing between different acceleration domain clusters is achieved through the CPU side. The general area is capable of overall task control, operating system startup and general processing, while the acceleration area is designed for computationally intensive tasks.
[0105] In one embodiment, Figure 4 The figure shows a load balancing scheduling optimization method for reactive flow simulation applications for heterogeneous multi-domain processors and a multi-level load balancing scheduling and ordinary differential equation calculation relationship diagram of the system. It can be seen that
[0106] Between the node-level load balancing scheduling in step 401 and the load balancing scheduling between CPU and acceleration domain clusters in step 402, the amount of grid tasks received or sent by the node and whether the inter-node load balancing scheduling is re-executed between nodes will affect the distribution of grid tasks between CPU and acceleration domain clusters.
[0107] In step 402, the CPU and acceleration domain cluster load balancing scheduling is performed between the CPU and acceleration domain cluster and the thread-level load balancing scheduling in step 403. The CPU and acceleration domain cluster load balancing scheduling determines whether the CPU and the acceleration domain cluster need to wait for a long time for each other to complete the calculation; the thread-level load balancing scheduling allows the threads to complete the solution in a similar time, so that the waiting time is as short as possible, so that the S p It can stably serve as the basis for load distribution and scheduling between CPU and acceleration domain clusters.
[0108] Between the thread-level load balancing scheduling in step 403 and the ordinary differential equation calculation in step 404, the CPU thread and the acceleration domain cluster thread substitute the data in the grid task into the ordinary differential equation for calculation; due to the violent / smooth grid reaction caused by the time step iteration, the amount of ordinary differential equation calculation on these grids increases / decreases, and the time taken by the thread to solve the grid is extended / shortened.
[0109] Between the node-level load balancing scheduling in step 401 and the thread-level load balancing scheduling in step 403, the time taken by the thread to solve the grid is extended / shortened, which makes the load between nodes unbalanced when calculating the node load in the next time step, resulting in the need for load balancing scheduling between nodes.
[0110] In one embodiment, the present application further provides a reactive flow simulation application load balancing scheduling optimization system for heterogeneous multi-domain processors, including:
[0111] A judgment module is used to judge whether the load balance is satisfied between nodes at the current time step;
[0112] A node-level load balancing scheduling module, used to perform node-level load balancing scheduling;
[0113] A CPU and acceleration domain inter-cluster load balancing scheduling module, used to perform CPU and acceleration domain inter-cluster load balancing scheduling;
[0114] Thread-level load balancing scheduling module, used to accelerate the execution of thread-level load balancing scheduling within the domain cluster;
[0115] The computing module is used for the CPU and the acceleration domain cluster to jointly perform ordinary differential equation calculations to obtain solution results;
[0116] The updating module is used for the CPU to summarize the solution results and update the reaction rate.
[0117] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0118] Finally, it should be noted that although the present invention is mainly based on specific cases in terms of example display and design, and the software involved is in the form of a system. However, the various components involved in this system should still be protected, including but not limited to modules such as resource monitors and task schedulers and their codes, so any modification, improvement, use, etc. of the implementation of the present invention should be covered in the claims and description of the present invention.
Claims
1. A load balancing scheduling optimization method for reactive stream simulation applications for heterogeneous multi-domain processors, characterized in that: The following steps are involved: S1, determine whether the load balance is satisfied between nodes at the current time step; and, If not, execute step S2; If yes, execute step S3; S2, perform node-level load balancing scheduling to achieve node-level adaptive load balancing; S3: Inside the node, load balancing scheduling is performed between the CPU and the acceleration domain cluster to achieve adaptive load balancing between the CPU and the acceleration domain cluster. S4: Execute thread-level load balancing scheduling inside the acceleration domain cluster to achieve thread-level adaptive load balancing; S5, the CPU and the acceleration domain cluster jointly perform ordinary differential equation calculations to obtain solution results; S6, the CPU summarizes the solution results and updates the reaction rate, and returns to step S1; Among them, the node is a terminal device equipped with a heterogeneous multi-domain processor; the ordinary differential equation refers to an equation represented by the rate of change of thermochemical components over time; the reaction rate refers to the speed at which a chemical reaction proceeds, expressed as the change in substance concentration per unit time; the substance concentration refers to the amount of a certain chemical substance per unit volume.
2. The method according to claim 1, characterized in that The heterogeneous multi-domain processor includes a general area and an acceleration area. The general area includes 1 CPU, and the CPU includes 16 CPU cores; the acceleration area includes 4 identical acceleration domain clusters, and the acceleration domain clusters include 24 control cores and 384 acceleration cores. The storage device includes on-chip shared memory, high-bandwidth shared memory and off-chip memory.
3. The method according to claim 1, characterized in that The node-level load balancing scheduling in step S2 includes the following steps: (1) Packing thermochemical variables and other variables required for solving ordinary differential equations of each grid into grid tasks to form a grid task set; wherein the grids constitute the entire computational domain of the reaction flow simulation; (2) Sort the load of all nodes and calculate the global average load of all nodes Determine the maximum load max , minimum load l min and load threshold L threshold Is it satisfied? and If so, keep the load balancing scheduling between nodes in the previous time step, and execute step S3 after the scheduling is completed; If not, increase the load to The node is the sender, and the load is less than The node is the receiver, and the sender sends part of the grid task to the receiver until all nodes reach the global average load. Update the grid task collection; (3) After the ordinary differential equation calculation is completed, the receiver transmits the solution result of the grid task back to the sender and updates the reaction rate of the grid.
4. The method according to claim 1, characterized in that: The load balancing scheduling between the CPU and the acceleration domain cluster includes the following steps: (1) The pth time step is based on the average time that the CPU waits for the acceleration domain cluster to complete the solution in the previous k time steps. and the waiting time threshold t threshold Calculate the load distribution ratio S p ;in, a is the constant coefficient; (2) According to the calculated S p , select from the grid task set the task that satisfies l cpu The grid tasks with the highest load are assigned to the CPU, and the remaining grid tasks are assigned to the acceleration domain cluster; in, l is the load of the current node, N core 、N ctrl and N cluster They are the number of CPU cores, control cores, and acceleration domain clusters in the current node. (3) Record the waiting time, that is, the length of time the CPU waits for the acceleration domain cluster in the current time step, for use in load balancing scheduling between the CPU and the acceleration domain cluster in the next time step.
5. The method according to claim 1, characterized in that The inter-thread load balancing scheduling includes the following steps: (1) The grid tasks assigned to the acceleration domain cluster in the load balancing scheduling between the CPU and the acceleration domain cluster are evenly divided according to the load; the CPU transmits the evenly divided grid tasks to each acceleration domain cluster respectively; (2) The threads of each acceleration domain cluster are placed in a thread pool to jointly solve grid tasks. If there are idle threads in the thread pool and grid tasks to be solved, the idle thread takes a grid task to solve and returns to the thread pool after the solution is completed. (3) All grid tasks in the acceleration domain cluster are solved and the solution results are transmitted back to the CPU.
6. The method according to claim 1, characterized in that The ordinary differential equation calculation adopts the seulex ode solver, and uses the explicit Euler method to realize the evolution of physical quantities over time; the seulex ode solver is a solver that uses the seulex algorithm to solve the ordinary differential equation; the ordinary differential equation calculation includes the following steps: (1) Before the first time step solution begins, the CPU transfers the thermodynamic constants and other constants to the on-chip shared memory of the acceleration domain cluster for storage; (2) CPU threads parallelize grid computing tasks; (3) The acceleration domain cluster threads parallelize the grid tasks, construct vectors during the material concentration calculation process, and the acceleration cores parallelize the material concentration changes.
7. A reactive stream simulation application load balancing scheduling optimization system for heterogeneous multi-domain processors according to any one of claims 1 to 6, characterized in that: include: A judgment module is used to judge whether the load balance is satisfied between nodes at the current time step; A node-level load balancing scheduling module, used to perform node-level load balancing scheduling; A CPU and acceleration domain inter-cluster load balancing scheduling module, used to perform CPU and acceleration domain inter-cluster load balancing scheduling; Thread-level load balancing scheduling module, used to accelerate the execution of thread-level load balancing scheduling within the domain cluster; The computing module is used for the CPU and the acceleration domain cluster to jointly perform ordinary differential equation calculations to obtain solution results; The updating module is used for the CPU to summarize the solution results and update the reaction rate.
Citation Information
Cited By
Multivariate heterogeneous computing power scheduling method and scheduling platform for artificial intelligence public computing power center
CN120540804A
