Electromagnetic transient simulation parallel performance optimization method based on RoCE network
By building a submodule list and simulation partition structure in the RoCE network, combining the time step priority queue and bandwidth allocation strategy, the problem of low network bandwidth resource utilization efficiency caused by the difference in communication frequency between modules in electromagnetic transient simulation is solved, and efficient simulation performance optimization is achieved.
Patent Information
- Application Number
- CN202510057309.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-01-14
AI Technical Summary
In electromagnetic transient simulation based on RoCE network, due to the multi-level time step parallel algorithm, the communication frequency difference between modules is significant, and efficient allocation and utilization of network bandwidth resources cannot be achieved, resulting in a degradation of simulation performance.
By analyzing the configuration parameters of the multi-level time step, a submodule list is constructed and the time step setting of each submodule is clarified, and the simulation subdomain range is allocated in the RoCE network in combination with the simulation partition structure. The time step priority queue and bandwidth allocation strategy are adopted to timely handle data transmission of high-frequency and low-frequency interface variables, and implement a hierarchical packaging delay and secondary transmission mechanism.
It significantly improves the modular management efficiency of simulation tasks, realizes efficient dynamic scheduling of network bandwidth resources, alleviates the problems of waste of communication resources and local congestion, and improves the parallel computing performance and network communication utilization efficiency of electromagnetic transient simulation.
Smart Images

Figure CN119788609A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation performance optimization, and more specifically, to a parallel performance optimization method for electromagnetic transient simulation based on a RoCE network. Background Art
[0002] Electromagnetic transient simulation is an important tool for evaluating the dynamic performance of a system and verifying control strategies. In order to speed up the simulation and meet the real-time computing requirements of complex scenarios, a distributed parallel computing method based on the RoCE (Convergent Ethernet Remote Direct Memory Access) network is gradually adopted. In this method, different computing modules are scheduled through a multi-level time-step parallel algorithm, and the efficient communication capability of the RoCE network is used to achieve cross-node data interaction and collaborative computing. However, due to the high computational complexity and large-scale data transmission requirements of electromagnetic transient simulation, there are many challenges in network resource allocation and utilization.
[0003] In the prior art, in electromagnetic transient simulation based on RoCE network, due to the multi-level time step parallel algorithm, the communication frequency differences between modules are significant, and the efficient allocation and utilization of network bandwidth resources cannot be achieved, which easily causes waste of communication resources or local congestion, and thus leads to a decrease in simulation performance. Summary of the invention
[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a parallel performance optimization method for electromagnetic transient simulation based on a RoCE network to solve the problems raised in the above-mentioned background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions: The parallel performance optimization method of electromagnetic transient simulation based on RoCE network includes the following steps: S1: Analyze the configuration parameters of multi-level time steps, build a list of submodules corresponding to the electromagnetic transient simulation model, and clarify the time step settings of each submodule; S2: Establish a cross-node simulation partition structure based on the submodule list and allocate the simulation subdomain range of each node in the RoCE network; S3: label the interface variables of each simulation subdomain, assign a unique label to each interface variable, and configure its corresponding memory area through the remote direct memory access protocol; S4: Generate a time step priority queue based on the time step difference of the submodules, and set a bandwidth allocation strategy corresponding to the time step priority in the lossless flow control mechanism of the RoCE network; S5: When the submodule data of the high-frequency time step is updated, the interface variable sending window of the low-frequency time step is implemented with hierarchical encapsulation delay; S6: Before completing the global convergence of the overall simulation, apply the parallel dependency verification algorithm to retrieve the interface variable label data of all computing nodes one by one, and perform secondary transmission on the interface variable data that has not been transmitted.
[0006] In a preferred embodiment, the configuration parameters of the multi-level time step are parsed, a submodule list corresponding to the electromagnetic transient simulation model is constructed, and the time step setting of each submodule is clarified, specifically including: Obtain the physical properties and dynamic behavior characteristics of each module in the electromagnetic transient simulation model, and analyze the computing requirements of each module based on the network topology of the electromagnetic transient simulation model; Determine the time step range applicable to different modules based on the dynamic behavior characteristics and computational requirements of each module; The electromagnetic transient simulation model is divided into multiple submodules, a list corresponding to each submodule is generated, and the time step setting and the associated input and output data types of each submodule are marked in the list.
[0007] In a preferred embodiment, a cross-node simulation partition structure is established based on the submodule list, and the simulation subdomain range of each node is allocated in the RoCE network, specifically including: According to the time step setting and input and output data types in the submodule list, the simulation model is divided into multiple calculation areas, and the boundary interface of each calculation area is determined; Based on the network topology of the simulation model and the computing requirements of each computing area, each computing area is assigned to a computing node; When allocating computing nodes, the boundaries of computing areas are adjusted to achieve load balancing based on the computing complexity and data transmission requirements of each computing area; The allocated computing areas are numbered and a partition structure file is generated to record the computing area node allocation information and the interface variable positions; A corresponding simulation subdomain range is set for each computing node in the RoCE network. The simulation subdomain range includes boundary interface variables of the computing area and their associated memory access permissions.
[0008] In a preferred embodiment, the interface variables of each simulation subdomain are labeled, a unique label identifier is assigned to each interface variable, and its corresponding memory area is configured through a remote direct memory access protocol, specifically including: Obtain the boundary interface variables of each simulation subdomain, and identify the unique characteristics of the interface variables according to the interface variable data type and boundary position recorded in the simulation partition structure file; Assign a unique label identifier to each interface variable, the label identifier includes the simulation subdomain number to which the interface variable belongs, the data type of the interface variable, and the memory offset address of the interface variable; Bind the label identifier of each interface variable to its corresponding memory area, and assign read and write permissions to each memory area through the remote direct memory access protocol; When assigning read and write permissions, a memory address mapping table is established for each boundary interface variable of the simulation subdomain, and the memory address mapping table records the label identifier of the interface variable, the starting address of the memory area, and the read and write permission level; The established memory address mapping table is uploaded to the configuration file of the remote direct memory access protocol to complete the memory area configuration of the interface variable.
[0009] In a preferred embodiment, a time step priority queue is generated according to the time step difference of the submodules, and a bandwidth allocation strategy corresponding to the time step priority is set in the lossless flow control mechanism of the RoCE network, specifically including: Get the time step setting of the submodule, prioritize the submodules according to the length of the time step, assign a higher priority to the submodule with a shorter time step, and assign a lower priority to the submodule with a longer time step; A time step priority queue is generated based on the priority classification result, and the time step priority queue includes the priority number of each submodule and its corresponding time step; In the lossless flow control mechanism of the RoCE network, a bandwidth quota is allocated to each priority queue. The bandwidth quota is calculated based on the priority number and the data transmission frequency. By adjusting the parameters of the bandwidth allocation policy in the priority queue, ensure that the bandwidth share of the high-priority queue is higher than that of the low-priority queue and avoid resource competition; The bandwidth allocation information of the time step priority queue is recorded in the lossless flow control mechanism of the RoCE network. The bandwidth allocation information includes the priority number, the corresponding bandwidth ratio and the time step range of the submodule.
[0010] In a preferred embodiment, when the submodule data of the high-frequency time step is updated, the interface variable sending window of the low-frequency time step is subjected to hierarchical encapsulation delay, specifically including: Detect the request status of the high-frequency time step submodule to update data, and obtain the boundary interface variable list of the high-frequency time step submodule; Classify the interface variables of the low-frequency time step and divide the low-frequency interface variables into multiple priority queues according to the length of the low-frequency time step and the data transmission priority; Set the encapsulation delay time for each priority queue. The encapsulation delay time is determined by the level of the priority queue where the interface variable is located. The lower the priority level, the longer the encapsulation delay time. During the update period of the high-frequency time step submodule, the sending window of the low-frequency interface variables is adjusted, and the low-frequency interface variables after encapsulation delay are sent to the corresponding receiving nodes in batches; Record the encapsulation delay parameters for each send window adjustment, including the priority number, delay time, and transmission timestamp of the low-frequency interface variable.
[0011] In a preferred embodiment, before the global convergence of the overall simulation is completed, the parallel dependency verification algorithm is applied to retrieve the interface variable label data of all computing nodes one by one, and the interface variable data that has not been transmitted is sent again, specifically including: Obtaining a list of interface variable label data of each computing node, the interface variable label data including a label identifier of the interface variable, a corresponding computing node number, and a transmission status thereof; During the global convergence calculation process, the interface variable label data is retrieved one by one according to the parallel dependency verification algorithm to verify whether the transmission status of each interface variable is completed; For interface variable data whose transmission status is not completed during the retrieval process, the computing node number to which it belongs and the amount of data that is not completed are recorded; Based on the recorded amount of unfinished transmission data and the computing node number, a second sending request is initiated to the corresponding computing node; After receiving the secondary transmission data, the label data status of the corresponding interface variable is updated to completion, and the final transmission status of all interface variables is recorded in the convergence log file.
[0012] Technical effects and advantages of the parallel performance optimization method for electromagnetic transient simulation based on RoCE network of the present invention: 1. By parsing the configuration parameters of multi-level time steps, building a sub-module list and clarifying the time step settings of each sub-module, and combining the simulation partition structure to allocate the simulation sub-domain range in the RoCE network, the modular management efficiency of the simulation task is significantly improved. At the same time, through the labeling of interface variables and the configuration of memory areas by remote direct memory access protocol, the consistency of data transmission of interface variables and the accuracy of resource management are ensured, laying the foundation for the efficient collaboration of distributed simulation computing.
[0013] 2. In view of the significant difference in communication frequency between modules, a method for generating a time step priority queue and a corresponding bandwidth allocation strategy are proposed, and a hierarchical encapsulation delay mechanism of high and low frequency interface variables is combined to achieve efficient dynamic scheduling of network bandwidth resources. Combined with the parallel dependency verification algorithm, the present invention can timely retrieve and process unfinished transmitted data, and improve the reliability of data consistency and global convergence of simulation through the secondary sending mechanism, thereby effectively alleviating the congestion problem caused by uneven distribution of communication resources in the prior art, and comprehensively improving the parallel computing performance and network communication utilization efficiency of electromagnetic transient simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic diagram of the parallel performance optimization method of electromagnetic transient simulation based on RoCE network of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0016] Example: Figure 1 The present invention provides a parallel performance optimization method for electromagnetic transient simulation based on RoCE network, which includes the following steps: S1: Analyze the configuration parameters of the multi-level time step, build a list of sub-modules corresponding to the electromagnetic transient simulation model, and clarify the time step settings of each sub-module.
[0017] S2: Establish a cross-node simulation partition structure based on the sub-module list and allocate the simulation sub-domain range of each node in the RoCE network.
[0018] S3: Label the interface variables of each simulation subdomain, assign a unique label identifier to each interface variable, and configure its corresponding memory area through the remote direct memory access protocol.
[0019] S4: Generate a time step priority queue based on the time step difference of the sub-modules, and set the bandwidth allocation strategy corresponding to the time step priority in the lossless flow control mechanism of the RoCE network.
[0020] S5: When the submodule data of the high-frequency time step is updated, a hierarchical encapsulation delay is implemented for the interface variable sending window of the low-frequency time step.
[0021] S6: Before completing the global convergence of the overall simulation, apply the parallel dependency verification algorithm to retrieve the interface variable label data of all computing nodes one by one, and perform secondary transmission on the interface variable data that has not been transmitted.
[0022] Analyze the configuration parameters of the multi-level time step, build a list of submodules corresponding to the electromagnetic transient simulation model, and clarify the time step settings of each submodule, including: Obtain the physical properties and dynamic behavior characteristics of each module in the electromagnetic transient simulation model, and analyze the computational requirements of each module based on the network topology of the electromagnetic transient simulation model: Analyze each module in the model (such as generators, transformers, transmission lines, etc.) one by one, extract its key physical parameters, including impedance, admittance, inductance, capacitance and other parameters, and record these parameters as the basic physical properties of the module. Analyze the dynamic behavior characteristics of the module, such as analyzing its dynamic response characteristics based on the electromagnetic rotor model of the generator, or analyzing its high-frequency dynamic characteristics based on the switching frequency of the power electronic module. Associate these physical properties and dynamic behavior characteristics with the calculation requirements of electromagnetic transient simulation, and use them as basic data input for further calculation of the module.
[0023] Obtain the overall network topology of the simulation model, including the connection relationship between nodes, the interaction boundaries between modules, and the interconnected topological structure, and record the positional relationship of each module in the network. Through topological structure analysis, identify the strong coupling relationship that may exist between modules, such as electrical interconnection or magnetic coupling between adjacent modules. According to the physical properties and dynamic behavior characteristics of each module, combined with the role of the module in the topology, calculate the magnitude of the impact of its dynamic behavior on the simulation calculation. For example, for the high-frequency switch module, calculate its contribution to the voltage change rate in the network and evaluate its demand for time steps. Based on the complexity of the module's dynamic behavior and the calculation accuracy requirements, evaluate the calculation requirements of each module one by one to provide a basis for the division of time steps.
[0024] Determine the time step range applicable to different modules based on the dynamic behavior characteristics and computational requirements of each module: According to the complexity of the dynamic behavior of the module, the time step range suitable for its calculation is divided. For example, the high-frequency switch module is set to a microsecond time step, while the slow mechanical module is set to a millisecond time step.
[0025] Group modules with similar time step ranges into one subgroup, for example, high frequency electronics modules into one subgroup and power equipment modules into another.
[0026] Create a separate description file for each submodule, record the units contained in the submodule, the time step range and its input and output data types. For example, the input of a high-frequency module may be instantaneous voltage and the output may be the switching action sequence; while the input of a slow module may be motor torque and the output may be steady-state current.
[0027] Divide the electromagnetic transient simulation model into multiple submodules, generate a list corresponding to each submodule, and mark the time step setting and associated input and output data types of each submodule in the list: Summarize the description files of each submodule into a submodule list, sorting the modules from high to low according to their time step settings, and ensure that the time step settings of each submodule are clearly marked in the list. Record the associated input and output data types of each submodule in the list to facilitate the management of simulation partitions and interface variables in subsequent steps. Save the submodule list as a data file as input for subsequent simulation partition structure and interface variable configuration.
[0028] A cross-node simulation partition structure is established based on the submodule list, and the simulation subdomain range of each node is allocated in the RoCE network, including: According to the time step settings and input and output data types in the submodule list, the simulation model is divided into multiple calculation areas, and the boundary interface of each calculation area is determined: Parse the submodule list, extract the time step setting, input data type, and output data type of each submodule, and clarify the simulation properties of the submodule.
[0029] Based on the time step setting, submodules with similar time steps are grouped into one computational region. For example, for modules with microsecond time steps, such as high-frequency power electronics, the computational requirements are significantly higher than those of mechanical modules with millisecond time steps, so they are each formed into a separate computational region.
[0030] Determine the boundary interface variables of the computational region. Boundary interface variables refer to data variables that need to interact between the computational region and other regions, such as voltage, current, etc. The boundary positions of these variables are determined by the input and output data types of the submodules.
[0031] Complete information about submodule scope, time step settings, and boundary interface variables is recorded for each computational region as the basis for the partitioning structure.
[0032] Based on the network topology of the simulation model and the computing requirements of each computing area, each computing area is assigned to a computing node: Analyze the network topology of the simulation model, obtain node connection relationships, device interaction methods and communication paths, and identify the position of each computing area in the overall topology.
[0033] Combined with the dynamic computing requirements of each computing area, analyze its computing complexity. For example, the computing complexity of each computing area is calculated by the formula: ;in, Indicates The computational complexity of the computational area is Indicates The total time step of all submodules in the computational region, Indicates The data interaction frequency of each computational region (i.e., the update frequency of the boundary interface variables), The number of the calculation area.
[0034] The computational regions are allocated to the computational nodes according to the computational complexity and communication requirements. For example, for regions with high computational complexity and high communication frequency, they are preferentially allocated to nodes with high computational capabilities and low communication delay.
[0035] When allocating computing nodes, adjust the boundaries of computing areas to achieve load balancing based on the computing complexity and data transmission requirements of each computing area: The computational area of each computing node is load evaluated to ensure that the computational load is evenly distributed among all nodes.
[0036] Load balancing is achieved by adjusting the boundaries of the computing area. For example, if the total computing complexity of a computing node exceeds that of other nodes, the load can be balanced by adjusting the formula: ;in, Indicates that the The computing resources of the computing nodes, represents the total number of computing nodes in the simulation system, Represents the total computing resources available to the system, No. The total computational complexity of a specific computing node, represents the summary item of computational complexity of all nodes, Represents a traversal index in the set of compute nodes. refers to a specific target node.
[0037] It is worth noting that For specific nodes Calculation of The sum of the computational complexity of all nodes is summarized globally; the difference is is a specific single node, It is an iteration variable in all nodes, used for summation or global calculation.
[0038] Adjust the boundary interface variables of the calculation area to ensure that the data transmission after the calculation area is divided still meets the simulation accuracy requirements.
[0039] The allocated computational regions are numbered and a partition structure file is generated to record the computational region node allocation information and interface variable locations: Assign a unique number to each computing area and record the correspondence between the number and the computing node.
[0040] The following information of each computational region is recorded in the partition structure file: the composition of the submodules and their time step settings; the boundary interface variables and their data types; and the computational node number to which they belong.
[0041] The partition structure file serves as the basic data for interface variable labeling and RDMA configuration in subsequent steps.
[0042] In the RoCE network, set the corresponding simulation subdomain scope for each computing node. The simulation subdomain scope includes the boundary interface variables of the computing area and their associated memory access permissions: In the RoCE network, each compute node is assigned a simulation subdomain range. The simulation subdomain range includes the compute region and its boundary interface variables assigned to the compute node. Configure remote direct memory access permissions for the simulation subdomain range of each compute node to ensure that the boundary interface variables of the compute region can be efficiently transmitted in the RoCE network. After the configuration is completed, the subdomain range and memory access permissions of each compute node are recorded to provide support for subsequent interface variable labeling and flow control strategies.
[0043] Label the interface variables of each simulation subdomain, assign a unique label to each interface variable, and configure its corresponding memory area through the remote direct memory access protocol, including: Get the boundary interface variables of each simulation subdomain, and identify the unique characteristics of the interface variables based on the interface variable data type and boundary position recorded in the simulation partition structure file: The calculation area information of each simulation subdomain is read from the simulation partition structure file, and the boundary interface data between the calculation areas are extracted. Boundary interface variables refer to variables that need to exchange data between different simulation subdomains, such as dynamic variables such as voltage and current in adjacent calculation areas.
[0044] For the interface variables of each calculation area, the unique characteristics of the interface variables are analyzed one by one according to the simulation subdomain number, data type (such as floating point or integer), and boundary position. The unique characteristics are used to identify the unique attributes of the interface variables in the entire simulation system to avoid data conflicts or repeated processing.
[0045] Record the boundary attributes of each interface variable, including the subdomain number to which the variable belongs, the boundary position index, and the data type information, to provide a basis for subsequent labeling processing.
[0046] Assign a unique label to each interface variable. The label includes the simulation subdomain number to which the interface variable belongs, the data type of the interface variable, and the memory offset address of the interface variable: A unique label identifier is generated for each interface variable according to the boundary attributes of the interface variable.
[0047] The label consists of the following: The simulation subdomain number to which the interface variable belongs: indicates the subdomain where the interface variable is located, used to distinguish different calculation areas; Data type of interface variable: identifies the data format of the interface variable (such as 32-bit floating point or 64-bit integer) to ensure consistency in transmission and processing; Memory offset address of interface variables: used to indicate the specific location of the interface variable in the allocated memory area, facilitating data storage and reading.
[0048] Generate a label identifier through an algorithm, for example: ;in, The label identifier of the interface variable is a unique integer used to identify the interface variable; Indicates the simulation subdomain number to which the interface variable belongs; Indicates the data type number of the interface variable (1 for floating point type, 2 for integer type, and so on); Indicates the memory offset address of the interface variable, which is used to uniquely identify the location in the memory.
[0049] Record the generated tag identification and associate it with the corresponding interface variable to ensure the uniqueness and traceability of the tag identification.
[0050] Bind the label identifier of each interface variable to its corresponding memory area, and assign read and write permissions to each memory area through the remote direct memory access protocol: Allocate a memory area for each interface variable and map the variable to the shared memory of the simulation node according to the memory offset address of the interface variable.
[0051] Through the remote direct memory access protocol, read and write permissions are set for each memory area to ensure that the interface variables can be efficiently accessed by the corresponding simulation subdomain. For example, the subdomain interface variables with high-frequency time steps are preferentially assigned higher read and write permission levels to meet their real-time requirements.
[0052] Ensure that the label identifier of each interface variable corresponds to the allocated memory area, and record this binding relationship in the simulation configuration file.
[0053] When assigning read and write permissions, a memory address mapping table is established for each boundary interface variable of the simulation subdomain. The memory address mapping table records the label identifier of the interface variable, the starting address of the memory area, and the read and write permission level: A memory address mapping table is established to record the label identifier of each interface variable and the starting address of the memory area allocated to it.
[0054] The fields of the memory address mapping table include: the label identifier of the interface variable; the starting address of the memory area; and the read and write permission level of the memory area.
[0055] The starting address of the memory area is determined by the following formula: ;in, Indicates the starting address of the memory area. Indicates the memory base address assigned to the simulation subdomain, Indicates the memory offset address of the interface variable.
[0056] The memory address mapping table is generated according to the above fields, and the boundary interface variables of all simulation subdomains are managed uniformly.
[0057] Upload the established memory address mapping table to the configuration file of the remote direct memory access protocol to complete the memory area configuration of the interface variables: The memory address mapping table is uploaded to the configuration file of the remote direct memory access protocol to ensure that the simulation subdomain of each computing node can access its corresponding memory area.
[0058] The following contents are recorded in the configuration file: the memory address range of each simulation subdomain; the label identification of each interface variable and its corresponding memory area information; the read and write permission level of the interface variable.
[0059] After the configuration is complete, verify whether the memory area of each interface variable is accessible to ensure the consistency of the tag identifier and the memory area binding.
[0060] Generate a time step priority queue based on the time step difference of the submodules, and set the bandwidth allocation strategy corresponding to the time step priority in the lossless flow control mechanism of the RoCE network, including: Get the time step setting of the submodule, and prioritize the submodules according to the length of the time step, assigning higher priority to submodules with shorter time steps and lower priority to submodules with longer time steps: Extract the time step setting for each submodule from the submodule list. The time step represents the update period of the submodule in the simulation calculation, in seconds. For example, the time step of a high-frequency electronic module may be in microseconds, while the time step of a slow mechanical module may be in milliseconds.
[0061] The submodules are prioritized according to the length of the time step: high priority is assigned to submodules with shorter time steps because their calculation frequency is higher and their real-time requirements for bandwidth are higher; low priority is assigned to submodules with longer time steps because their calculation frequency is lower and their bandwidth requirements are relatively loose.
[0062] Each submodule is assigned a priority number, which is an integer, and the lower the number, the higher the priority. For example, a high-frequency electronic module may be assigned a priority number of 1, while a slow mechanical module is assigned a priority number of 2 or greater.
[0063] A time step priority queue is generated based on the priority classification results. The time step priority queue contains the priority number of each submodule and its corresponding time step: Sort the submodules according to the priority number, and arrange the submodules from small to large priority numbers in order to generate a time step priority queue.
[0064] Each entry in the time step priority queue includes the following information: the priority number of the submodule; the time step of the submodule; the data transmission frequency of the submodule (ie, the update frequency of the boundary interface variables).
[0065] The generated time step priority queue is recorded in the queue file for subsequent bandwidth allocation strategy calls.
[0066] In the lossless flow control mechanism of the RoCE network, a bandwidth quota is allocated to each priority queue. The bandwidth quota is calculated based on the priority number and data transmission frequency: First, according to the level of each priority number in the time step priority queue, a larger bandwidth share is allocated to the queue with a smaller priority number (i.e., a higher priority), and a smaller bandwidth share is allocated to the queue with a larger priority number. Secondly, combined with the total data transmission frequency of the submodules in each priority queue, the bandwidth allocation ratio is further increased for queues with high-frequency data transmission requirements to ensure that high-priority queues can meet the requirements of real-time transmission. Finally, the allocated bandwidth quota is recorded as a bandwidth parameter to guide the lossless flow control mechanism of the RoCE network to dynamically adjust transmission resources, ensuring the rationality of bandwidth allocation and data transmission efficiency between multiple priority queues.
[0067] By adjusting the parameters of the bandwidth allocation policy in the priority queue, ensure that the bandwidth share of the high-priority queue is higher than that of the low-priority queue and avoid resource competition: Optimize the bandwidth share of high-priority queues and further increase the bandwidth share of high-priority queues by adjusting the parameters of the bandwidth allocation strategy, such as the weighting factor. When adjusting the bandwidth allocation strategy, ensure that the minimum bandwidth quota of the low-priority queue is not lower than the basic transmission demand to avoid simulation task delays caused by resource competition. Use the hierarchical flow control model to record the adjusted bandwidth allocation parameters, including priority number, bandwidth share, and weighting factor.
[0068] The bandwidth allocation information of the time step priority queue is recorded in the lossless flow control mechanism of the RoCE network. The bandwidth allocation information includes the priority number, the corresponding bandwidth ratio and the time step range of the submodule: The bandwidth allocation information of the time step priority queue is recorded in the lossless flow control mechanism configuration file of the RoCE network. The bandwidth allocation information includes: the priority number of each priority queue; the bandwidth proportion of each priority queue; and the sub-module time step range corresponding to each priority queue.
[0069] Configure bandwidth allocation parameters in the lossless flow control mechanism to ensure that the bandwidth share of each priority queue is allocated according to the adjusted policy.
[0070] After completing the configuration of bandwidth allocation information, verify whether the bandwidth of each priority queue meets the simulation system requirements to ensure the real-time performance of the high-priority queue and the integrity of the low-priority queue.
[0071] When the submodule data of the high-frequency time step is updated, the interface variable sending window of the low-frequency time step is implemented with hierarchical encapsulation delay, including: Check the request status of the high-frequency time step submodule to update the data, and obtain the boundary interface variable list of the high-frequency time step submodule: Perform update detection on the high-frequency time step submodule to determine whether there is a data update request. The update request is usually identified by the status flag of the boundary interface variable. When the flag changes, it indicates that the high-frequency time step submodule needs to update the data.
[0072] Get the submodule list of the update request, extract the boundary interface variables of the high-frequency time step submodule involved, and record the number, simulation subdomain and data type of each interface variable.
[0073] The extracted boundary interface variables are used as the basis for encapsulating delay processing of low-frequency time step interface variables in subsequent steps.
[0074] The interface variables of the low-frequency time step are classified and divided into multiple priority queues according to the length of the low-frequency time step and the data transmission priority: Get the list of low-frequency time step interface variables recorded in the simulation partition structure file, and classify them based on the time step setting and data transfer priority of each interface variable.
[0075] According to the length of the time step, the low-frequency interface variables are divided into different priority queues. For example, the interface variables with a short time step (close to the threshold of the high-frequency time step) are assigned to the high priority queue; the interface variables with a long time step are assigned to the low priority queue.
[0076] The priority queue is further refined based on the data transmission frequency, and interface variables with high data transmission frequency are preferentially allocated to higher priority queues to optimize resource allocation.
[0077] Set the encapsulation delay time for each priority queue. The encapsulation delay time is determined by the level of the priority queue where the interface variable is located. The lower the priority level, the longer the encapsulation delay time: Set an encapsulation delay time for each priority queue. The length of the encapsulation delay time is related to the priority level: the encapsulation delay time of the high-priority queue is set to be shorter to meet the real-time transmission requirements; the encapsulation delay time of the low-priority queue is set to be longer to save bandwidth resources.
[0078] The specific value of the encapsulation delay time is determined by a preset rule, for example, the encapsulation delay time is inversely proportional to the time step to ensure reasonable hierarchical regulation of the priority queue.
[0079] When setting the encapsulation delay time, the delay parameters of each priority queue are recorded in the encapsulation delay configuration file for subsequent operation calls.
[0080] During the update period of the high-frequency time step submodule, the sending window of the low-frequency interface variables is adjusted, and the low-frequency interface variables after encapsulation delay are sent to the corresponding receiving nodes in batches: During the update cycle of the high-frequency time step submodule, the sending window of the low-frequency interface variable is dynamically adjusted according to the delay parameters in the package delay configuration file. For the interface variables of the high-priority queue, the sending window is opened immediately, and the delayed data is transmitted to the corresponding receiving node first; for the interface variables of the low-priority queue, the sending window is opened with a delay according to the set package delay time. When adjusting the sending window, the order of data transmission is optimized to ensure that high-priority data is transmitted within the update cycle of the high-frequency submodule, and low-priority data is sent in batches to avoid transmission conflicts.
[0081] Record the encapsulation delay parameters for each send window adjustment, including the priority number, delay time, and transmission timestamp of the low-frequency interface variable: After the sending window is adjusted, the encapsulation delay parameters are recorded, including the following: the priority number of each low-frequency interface variable; the encapsulation delay time of the interface variable; the actual transmission timestamp of the interface variable. The recorded encapsulation delay parameters are stored in the delay log file of the simulation system, and the delay log file is used for subsequent simulation result verification and performance analysis. The recorded encapsulation delay parameters are verified to ensure that the delay time adjusted each time is consistent with the priority setting to avoid data loss or conflict.
[0082] Before the global convergence of the whole simulation is completed, the parallel dependency verification algorithm is applied to retrieve the interface variable label data of all computing nodes one by one, and the interface variable data that has not been transmitted is sent again, including: Get the interface variable label data list of each computing node. The interface variable label data includes the label identifier of the interface variable, the computing node number to which it belongs, and its transmission status: The label identifier of the interface variable is used to uniquely identify the variable; the computing node number to which the interface variable belongs is used to locate the storage and transmission node of the variable; the transmission status of the interface variable is used to indicate whether the variable has completed transmission, and the status values include "incomplete" and "completed".
[0083] The interface variable label data list is stored in the verification data structure used in the global convergence process to provide data support for subsequent one-by-one retrieval and status verification.
[0084] During the global convergence calculation process, the interface variable label data is retrieved one by one according to the parallel dependency verification algorithm to verify whether the transmission status of each interface variable is completed: During the global convergence calculation process, all interface variable label data lists are searched one by one, and information such as label identification, computing node number, and transmission status are read one by one.
[0085] Apply the parallel dependency verification algorithm to verify the dependency of interface variables and determine whether there are any variables that have not been transferred. When verifying the dependency, consider the following rules: If the dependent variables of the interface variable have not yet completed the transfer, the current variable status is marked as "incomplete"; if the current interface variable has no unfinished dependencies, the status is marked as "completed".
[0086] The verification results are updated in real time to the tag data list for subsequent secondary sending operations.
[0087] For interface variable data whose transmission status is not completed during the retrieval process, record the computing node number to which it belongs and the amount of data that has not been completed: For interface variables whose transmission status is "incomplete" during the verification process, the following information is recorded: the computing node number to which the interface variable belongs; the amount of incomplete transmission data of the interface variable, the data amount is recorded in bytes; the label identifier of the interface variable, which is used for locating the subsequent secondary transmission.
[0088] The recorded information is stored in the global convergence incomplete data list as a basis for initiating a secondary sending request.
[0089] Based on the recorded amount of unfinished transmission data and the computing node number, a second sending request is initiated to the corresponding computing node: According to the records in the global convergence incomplete data list, a secondary transmission request is sent to each computing node. The request includes: the label identifier of the interface variable that needs to be resent; the amount of data that has not been transmitted; the number of the receiving node and the memory address information.
[0090] After receiving the secondary sending request, the computing node extracts the unfinished data and resends it to the target receiving node according to the specified memory address.
[0091] After receiving the second transmission data, update the label data status of the corresponding interface variable to complete, and record the final transmission status of all interface variables in the convergence log file: After receiving the secondary transmission data, the corresponding interface variable tag data status is updated, and the transmission status is changed from "uncompleted" to "completed".
[0092] The final transmission status of all interface variables is uniformly recorded to generate a global convergence log file. The log file contains the following contents: the label identification of each interface variable; the final transmission status; and the timestamp of the transmission completion.
[0093] The generated global convergence log file is stored in the simulation system log management module to provide a basis for subsequent simulation performance analysis and result verification.
[0094] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0095] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.
[0096] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0098] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0099] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0101] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0102] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0103] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A parallel performance optimization method for electromagnetic transient simulation based on RoCE network, characterized in that: The steps include: S1: Analyze the configuration parameters of multi-level time steps, build a list of submodules corresponding to the electromagnetic transient simulation model, and clarify the time step settings of each submodule; S2: Establish a cross-node simulation partition structure based on the submodule list and allocate the simulation subdomain range of each node in the RoCE network; S3: label the interface variables of each simulation subdomain, assign a unique label to each interface variable, and configure its corresponding memory area through the remote direct memory access protocol; S4: Generate a time step priority queue based on the time step difference of the submodules, and set a bandwidth allocation strategy corresponding to the time step priority in the lossless flow control mechanism of the RoCE network; S5: When the submodule data of the high-frequency time step is updated, the interface variable sending window of the low-frequency time step is implemented with hierarchical encapsulation delay; S6: Before completing the global convergence of the overall simulation, apply the parallel dependency verification algorithm to retrieve the interface variable label data of all computing nodes one by one, and perform secondary transmission on the interface variable data that has not been transmitted.
2. The method for optimizing the parallel performance of electromagnetic transient simulation based on RoCE network according to claim 1 is characterized in that: Analyze the configuration parameters of the multi-level time step, build a list of submodules corresponding to the electromagnetic transient simulation model, and clarify the time step settings of each submodule, including: Obtain the physical properties and dynamic behavior characteristics of each module in the electromagnetic transient simulation model, and analyze the computing requirements of each module based on the network topology of the electromagnetic transient simulation model; Determine the time step range applicable to different modules based on the dynamic behavior characteristics and computational requirements of each module; The electromagnetic transient simulation model is divided into multiple submodules, a list corresponding to each submodule is generated, and the time step setting and the associated input and output data types of each submodule are marked in the list.
3. The method for optimizing the parallel performance of electromagnetic transient simulation based on RoCE network according to claim 2 is characterized in that: A cross-node simulation partition structure is established based on the submodule list, and the simulation subdomain range of each node is allocated in the RoCE network, including: According to the time step setting and input and output data types in the submodule list, the simulation model is divided into multiple calculation areas, and the boundary interface of each calculation area is determined; Based on the network topology of the simulation model and the computing requirements of each computing area, each computing area is assigned to a computing node; When allocating computing nodes, the boundaries of computing areas are adjusted to achieve load balancing based on the computing complexity and data transmission requirements of each computing area; The allocated computing areas are numbered and a partition structure file is generated to record the computing area node allocation information and the interface variable positions; A corresponding simulation subdomain range is set for each computing node in the RoCE network. The simulation subdomain range includes boundary interface variables of the computing area and their associated memory access permissions.
4. The method for optimizing the parallel performance of electromagnetic transient simulation based on RoCE network according to claim 3 is characterized in that: Label the interface variables of each simulation subdomain, assign a unique label to each interface variable, and configure its corresponding memory area through the remote direct memory access protocol, including: Obtain the boundary interface variables of each simulation subdomain, and identify the unique characteristics of the interface variables according to the interface variable data type and boundary position recorded in the simulation partition structure file; Assign a unique label identifier to each interface variable, the label identifier includes the simulation subdomain number to which the interface variable belongs, the data type of the interface variable, and the memory offset address of the interface variable; Bind the label identifier of each interface variable to its corresponding memory area, and assign read and write permissions to each memory area through the remote direct memory access protocol; When assigning read and write permissions, a memory address mapping table is established for each boundary interface variable of the simulation subdomain, and the memory address mapping table records the label identifier of the interface variable, the starting address of the memory area, and the read and write permission level; The established memory address mapping table is uploaded to the configuration file of the remote direct memory access protocol to complete the memory area configuration of the interface variable.
5. The method for optimizing the parallel performance of electromagnetic transient simulation based on RoCE network according to claim 4 is characterized in that: Generate a time step priority queue based on the time step difference of the submodules, and set the bandwidth allocation strategy corresponding to the time step priority in the lossless flow control mechanism of the RoCE network, including: Get the time step setting of the submodule, prioritize the submodules according to the length of the time step, assign a higher priority to the submodule with a shorter time step, and assign a lower priority to the submodule with a longer time step; A time step priority queue is generated based on the priority classification result, and the time step priority queue includes the priority number of each submodule and its corresponding time step; In the lossless flow control mechanism of the RoCE network, a bandwidth quota is allocated to each priority queue. The bandwidth quota is calculated based on the priority number and the data transmission frequency. By adjusting the parameters of the bandwidth allocation policy in the priority queue, ensure that the bandwidth share of the high-priority queue is higher than that of the low-priority queue and avoid resource competition; The bandwidth allocation information of the time step priority queue is recorded in the lossless flow control mechanism of the RoCE network. The bandwidth allocation information includes the priority number, the corresponding bandwidth ratio and the time step range of the submodule.
6. The method for optimizing the parallel performance of electromagnetic transient simulation based on RoCE network according to claim 5 is characterized in that: When the submodule data of the high-frequency time step is updated, the interface variable sending window of the low-frequency time step is implemented with hierarchical encapsulation delay, including: Detect the request status of the high-frequency time step submodule to update data, and obtain the boundary interface variable list of the high-frequency time step submodule; Classify the interface variables of the low-frequency time step and divide the low-frequency interface variables into multiple priority queues according to the length of the low-frequency time step and the data transmission priority; Set the encapsulation delay time for each priority queue. The encapsulation delay time is determined by the level of the priority queue where the interface variable is located. The lower the priority level, the longer the encapsulation delay time. During the update period of the high-frequency time step submodule, the sending window of the low-frequency interface variables is adjusted, and the low-frequency interface variables after encapsulation delay are sent to the corresponding receiving nodes in batches; Record the encapsulation delay parameters for each send window adjustment, including the priority number, delay time, and transmission timestamp of the low-frequency interface variable.
7. The method for optimizing the parallel performance of electromagnetic transient simulation based on RoCE network according to claim 6 is characterized in that: Before the global convergence of the whole simulation is completed, the parallel dependency verification algorithm is applied to retrieve the interface variable label data of all computing nodes one by one, and the interface variable data that has not been transmitted is sent again, including: Obtaining a list of interface variable label data of each computing node, the interface variable label data including a label identifier of the interface variable, a corresponding computing node number, and a transmission status thereof; During the global convergence calculation process, the interface variable label data is retrieved one by one according to the parallel dependency verification algorithm to verify whether the transmission status of each interface variable is completed; For interface variable data whose transmission status is not completed during the retrieval process, the computing node number to which it belongs and the amount of data that is not completed are recorded; Based on the recorded amount of unfinished transmission data and the computing node number, a second sending request is initiated to the corresponding computing node; After receiving the secondary transmission data, the label data status of the corresponding interface variable is updated to completion, and the final transmission status of all interface variables is recorded in the convergence log file.
Citation Information
Patent Citations
Simulation method and simulation device for real-time electromagnetic transient state of power system
CN116861768A
Electromagnetic transient parallel simulation method and system based on multiple step lengths
CN117217002A
Method and device for joint simulation of electric power simulation software and user program
CN118194735A
Power system operation simulation method, simulation platform and device
US20250005226A1
Data transmission method, device and computer storage medium
WO2017118297A1
Cited By
Cross-platform distributed synchronous simulation method adopting RoCEv2
CN120434261A