A method for measuring MPI broadcast operation overhead based on system bias elimination
By employing a ring synchronization protocol and root node rotation mechanism in a heterogeneous computing environment, systematic biases in MPI broadcast operation measurements are eliminated, achieving high-precision overhead measurement. This method is suitable for distributed environments with any number of processes and provides a reliable quantitative analysis tool for high-performance computing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2025-08-08
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies struggle to accurately measure the overhead of MPI broadcast operations in heterogeneous computing environments, primarily due to systematic biases caused by synchronization barrier exit timing irregularities, clock heterogeneity errors, and timing differences between different processes. This results in a large standard deviation in measurement results, failing to meet the high-precision requirements of high-performance computing.
A system bias elimination mechanism is adopted. The root node is selected sequentially by traversing all processes. A ring synchronization protocol is used to ensure that the root node is the last to exit the synchronization barrier. The broadcast time difference is recorded by root node rotation and local timer. The measurement time of all processes is accumulated. The average delay, minimum delay and maximum delay are calculated using global data reduction.
It enables high-precision measurement of the overhead of MPI broadcast operations in heterogeneous computing environments, eliminates systematic biases, provides a reliable quantitative analysis tool for high-performance computing, is suitable for distributed environments with any number of processes, and requires no hardware synchronization.
Smart Images

Figure CN121864894B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to communication performance measurement technology, and more specifically to an MPI broadcast operation overhead measurement method based on system bias elimination. Background Technology
[0002] MPI broadcast operation (MPI_Bcast), as one of the most commonly used aggregate communication operations in distributed computing, is responsible for efficiently transmitting data from the root node to all other processes. Its performance directly affects the overall efficiency of parallel programs. In heterogeneous computing environments, CPUs (such as x86, ARM, RISC-V) and accelerators (such as GPUs, NPUs) from different vendors have different clock frequencies. In large-scale clusters, process scheduling latency and network communication latency can lead to inconsistent execution timing among processes. These factors together make it difficult for traditional measurement methods to accurately obtain the true overhead of MPI_Bcast.
[0003] Existing measurement methods generally involve the following steps: First, process synchronization is achieved using an MPI synchronization barrier (MPI_Barrier) to ensure all processes begin measurement at the same time. Then, the root node executes MPI_Bcast and records the time taken, and the average value is obtained by repeating the measurement multiple times. However, this method suffers from three sources of systematic bias:
[0004] 1. Disordered exit timing of synchronization barrier: The MPI standard does not specify the order in which processes exit from the barrier. In a real environment, the exit times of each process may differ by tens of nanoseconds (as shown in Figure 1), resulting in an uncontrollable offset of the timing start point t_start;
[0005] 2. Clock heterogeneity error: There is a significant clock inconsistency problem between the time stamp counters (TSCs) of different computers, resulting in significant differences in local timers.
[0006] To address the above problems, existing technologies are mainly improved in the following ways:
[0007] Hardware clock synchronization (such as the IEEE 1588 protocol): requires additional hardware support;
[0008] Software calibration algorithm: Clock offset parameters are obtained through prediction, but the parameter calibration process itself introduces new measurement errors, resulting in error accumulation;
[0009] Multiple measurements on a single root node: The timing differences when different processes act as receivers are not addressed, resulting in measurement results that cannot reflect the true communication overhead.
[0010] In summary, existing technologies have not eliminated systematic biases at the level of measurement method design, resulting in a large standard deviation of measurement results, which cannot meet the high-precision measurement requirements of high-performance computing for communication operation overhead. Summary of the Invention
[0011] The technical problem to be solved by this invention is to provide a method for measuring the overhead of MPI broadcast operation based on system deviation elimination, which effectively solves the problem of timing asynchrony in multiple processes by using a system deviation elimination mechanism.
[0012] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0013] A method for measuring MPI broadcast operation overhead based on system bias elimination includes the following steps:
[0014] Traverse all processes, select one process at a time as the root node, and all other processes other than the root node are non-root nodes;
[0015] Synchronization operations are performed on all processes starting from the root node process to ensure that the root node process is the last to exit the synchronization barrier.
[0016] The root node process broadcasts MPI to other processes and uses a local timer to record the start time of the broadcast. All processes use a local timer to record the end time of the broadcast and calculate the difference between the end time and the start time.
[0017] Repeat the step of traversing all processes and selecting one process as the root node in turn until all processes have been traversed. Then, sum up the differences between all processes to obtain the total measurement time.
[0018] Global data reduction is performed on the total measurement time to obtain statistical data for all processes.
[0019] Furthermore, when synchronizing all processes starting from the root process, specifically, all processes use a ring synchronization protocol to synchronize, including the following steps:
[0020] The root node sends a synchronization signal to the successor node in the ring. All other nodes in the ring send synchronization signals to the next node in a specified order until the root node receives the synchronization signal sent by the predecessor node in the ring. This causes the nodes in the ring to enter the synchronization barrier one by one, with the root node being the last to enter the synchronization barrier.
[0021] The root node sends a synchronization completion signal to its successor nodes in the ring. All other nodes in the ring send synchronization completion signals to the next node in a specified order until the root node receives the synchronization completion signal sent by its predecessor node in the ring. This causes the nodes in the ring to exit the synchronization barrier one by one, with the root node being the last to exit the synchronization barrier.
[0022] Furthermore, when the root node process broadcasts MPI to other processes and records the broadcast start time using a local timer, it includes:
[0023] The root node process dynamically allocates a message buffer using a memory allocation function, stores the broadcast start time at the beginning address of the message buffer, stores the message to be broadcast in the remaining space of the message buffer, initiates an MPI broadcast operation using the data in the message buffer, and releases the message buffer after the operation is completed.
[0024] Non-root node processes receive message data broadcast by root node processes and store it in a receive buffer. They then extract the broadcast start time recorded by the root node process from the starting address of the receive buffer and release the receive buffer.
[0025] Furthermore, when the root node broadcasts to other processes, it broadcasts to other processes a specified number of times; when all processes use local timers to record the broadcast end time and calculate the difference between the broadcast end time and the broadcast start time, it records the end time of each broadcast and calculates the difference between the end time and the corresponding broadcast start time; and the total measurement time is obtained by accumulating the differences of all processes, specifically by accumulating the difference of each broadcast from all processes into a specified global timer.
[0026] Furthermore, before performing global data reduction on the total measurement time, the following steps are also included:
[0027] Select the next message size from the preset message size set as the size of the message broadcast by MPI, and then execute the step of traversing all processes and selecting one process as the root node in turn until the message set has been traversed.
[0028] Furthermore, the messages broadcast by MPI are random service data that match the selected message size from the message size set, the expression for which the message size set is as follows:
[0029]
[0030] Where msg_min is the minimum message size and msg_max is the maximum message size.
[0031] Furthermore, when performing global data reduction on the total measurement time, the MPI_Reduce function is used to calculate the average latency, minimum latency, and maximum latency for the total measurement time corresponding to messages of different sizes.
[0032] The present invention also proposes an MPI broadcast operation overhead measurement system based on system bias elimination, comprising a processor and a computer-readable storage medium interconnected thereto, wherein a computer program stored in the computer-readable storage medium is executed by the processor to implement the steps of the MPI broadcast operation overhead measurement method based on system bias elimination.
[0033] The present invention also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the MPI broadcast operation overhead measurement method based on system bias elimination.
[0034] The present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the MPI broadcast operation overhead measurement method based on system bias elimination.
[0035] Compared with the prior art, the advantages of the present invention are as follows:
[0036] This invention traverses all processes, sequentially selecting one process as the root node. The root node process broadcasts MPI to other processes. All processes use a local timer to record the broadcast end time and calculate the difference between the broadcast end time and the broadcast start time. After traversal, the differences corresponding to all processes are accumulated to obtain the total measurement time. Symmetrical measurement is achieved through root node rotation, so that the differences in timing start times of different processes and CPU clock deviations cancel each other out in the calculation, thus eliminating systematic measurement errors in principle.
[0037] This invention uses the root node's process record to broadcast the start time, thereby forcing all processes to use the root node's timing start point and avoiding inconsistencies in timing references caused by local clock differences.
[0038] This invention uses a ring synchronization protocol to perform synchronization operations starting from the root node's process, ensuring that the root node is the last to exit the synchronization barrier, strictly controlling the consistency of the timing start point, and avoiding the chaotic exit timing problem of traditional MPI synchronization barriers. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of timing deviation in traditional measurement methods.
[0040] Figure 2 This is a flowchart of an embodiment of the present invention.
[0041] Figure 3 This is a schematic diagram of the ring synchronization operation according to an embodiment of the present invention, wherein... Figure 3 (a) is a schematic diagram of the nodes in the ring entering the synchronization barrier one by one. Figure 3 (b) is a schematic diagram of nodes in the ring exiting the synchronization barrier one by one.
[0042] Figure 4 This is a schematic diagram of root node rotation measurement in an embodiment of the present invention.
[0043] Figure 5 This is a schematic diagram of timing deviations in an embodiment of the present invention. Detailed Implementation
[0044] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.
[0045] Example 1
[0046] This embodiment proposes a method for measuring MPI broadcast operation overhead based on system skew elimination. This high-precision measurement method addresses the timing synchronization problem of multiple processes in a distributed environment by employing a system skew elimination mechanism. This method requires no hardware synchronization, providing a reliable quantitative analysis tool for MPI library performance optimization, and possesses significant engineering application value and technological innovation.
[0047] like Figure 2 As shown, the method in this embodiment includes the following steps:
[0048] Message size sequence generation:
[0049] S100) Generate a message size sequence and select an initial message size;
[0050] Root node rotation measurement:
[0051] S101) Traverse all processes, select one process as the root node in turn, and all other processes other than the root node are non-root nodes;
[0052] S102) Start synchronizing all processes from the root node process to ensure that the root node process is the last to exit the synchronization barrier.
[0053] S103) The root node process broadcasts MPI to other processes based on the current message size and records the broadcast start time using a local timer. All processes use a local timer to record the broadcast end time and calculate the difference between the broadcast end time and the broadcast start time.
[0054] Systematic bias elimination:
[0055] S104) Jump to step S101 until all processes have been traversed, and sum the differences corresponding to all processes to obtain the total measurement time of the current message size.
[0056] S105) Select the next message size from the message size sequence and jump to step S101 until the message set has been traversed;
[0057] Multi-dimensional statistics and results output:
[0058] S106) Perform global data reduction on the total measurement time for different message sizes to obtain statistical data for all processes.
[0059] Through the above steps, the method of this embodiment ensures that the root node exits last to unify the timing starting point, and achieves symmetrical measurement design through root node rotation, so that the clock differences of different processes are completely canceled out in the cumulative calculation.
[0060] The following provides a detailed explanation of each step.
[0061] In step S101 of this embodiment, a test message size set MsgSet covering the entire range is generated according to the strategy of doubling the message size successively. The specific expression is as follows:
[0062]
[0063] Where msg_min is the minimum message size and msg_max is the maximum message size. In this embodiment, the minimum message size is the size of a micro-message and the maximum message size is the size of a large data block. This ensures that the measurement includes all typical communication scenarios from micro-messages to large data blocks. k is the number of loops in steps S101 to S105. In this embodiment, the root node rotation measurement process can be executed for each message size in the message size set MsgSet to obtain the total measurement time corresponding to different message sizes.
[0064] Step S101 of this embodiment aims to ensure that all processes synchronously obtain their own roles (root node or non-root node) and cluster size information, providing basic parameters for subsequent distributed measurements. When traversing all processes in step S101, the process ID my_rank and the total number of processes N are obtained through the MPI communication interface. When a process is selected as the root node, it can be selected sequentially according to the process ID, and the process selected as the root node is marked as root. In addition, in step S101 of this embodiment, a global timer variable global_timer is initialized to accumulate the time of all measurements.
[0065] In step S102 of this embodiment, when synchronizing all processes starting from the root node's process, specifically, all processes use a ring synchronization protocol to synchronize starting from the root node's process, in order to achieve strict timing control. The behavior of the nodes in the ring is as follows:
[0066] Non-root node behavior: In the order of process number (such as ascending or descending), non-root nodes send synchronization signals to the next node in the ring in turn, forming a chain-like synchronization transmission;
[0067] Root node behavior: After waiting to receive the synchronization signal from its predecessor node, the root node sends a synchronization completion signal to its successor nodes. Following a circular pattern, each node in the ring receives the synchronization completion signal one by one, until the root node finally receives the synchronization completion signal from its predecessor node. This ensures that it is the last process to exit the synchronization barrier. This mechanism provides a crucial guarantee for the consistency of the timing start point.
[0068] Therefore, as Figure 3 As shown, when a process starts from the root node and uses the ring synchronization protocol for synchronization, the following steps are included:
[0069] The root node sends a synchronization signal to its successor nodes in the ring. Other nodes in the ring then send their synchronization signals to the next node in a specified order, until the root node receives the synchronization signal from its predecessor node. This process causes each node in the ring to enter the synchronization barrier one by one, with the root node being the last to enter the barrier. Figure 3 As shown in (a);
[0070] The root node sends a synchronization completion signal to its successor nodes in the ring. Other nodes in the ring then send their own synchronization completion signals to the next node in a specified order. This continues until the root node receives the synchronization completion signal from its predecessor node. At this point, the nodes in the ring exit the synchronization barrier one by one, with the root node being the last to exit. Figure 3 As shown in (b).
[0071] In step S103 of this embodiment, when the root node's process broadcasts MPI to other processes and records the broadcast start time using a local timer, the behavior of each node is as follows:
[0072] Root node operation: The root node first calls the high-precision timer MPI_Wtime() to record the start time t_start of the broadcast operation. Then, it dynamically allocates a message buffer using a memory allocation function, stores the broadcast start time t_start at the beginning address of the message buffer, and stores the message to be broadcast in the remaining space of the message buffer. The message to be broadcast is random business data (such as a randomly generated double-precision floating-point array) matching the current message size. After completing the data construction, it uses the data in the message buffer to initiate the MPI broadcast operation, transmitting the message containing the timing start to all other processes, and releases the message buffer after the operation is complete.
[0073] Non-root node operations: Non-root node processes receive message data broadcast by the root node process and store it in a receive buffer. They then retrieve the broadcast start time t_start recorded by the root node process from the starting address of the receive buffer and release the receive buffer. By forcing all processes to use the root node's timing start point t_start, the problem of inconsistent timing references caused by local clock differences is avoided.
[0074] In step S103 of this embodiment, when all processes use local timers to record the broadcast end time and calculate the difference between the broadcast end time and the broadcast start time, specifically, after the root node completes a broadcast operation, all processes (regardless of whether they are root nodes) call the local timer to record the end time t_stop, calculate the single measurement time elapsed = t_stop - t_start, and finally accumulate this value into the global timer global_timer to obtain the measurement time of the current root node for other processes.
[0075] Step S104 of this embodiment is as follows: Figure 4 As shown, iterative measurements are performed by rotating the root nodes, and the measurement time corresponding to each root node is accumulated to eliminate systematic bias. The mathematical mechanism for eliminating systematic bias in this embodiment is as follows: Let the measurement time of the j-th process when process i is the root node be t_{i,j} = t_{real} + ε_i - ε_j, where ε_i is the clock bias of process i. Then, in the total accumulated time after traversing all root nodes, the algebraic sum of the clock bias terms is zero, and the final average delay is equal to the actual broadcast time t_{real}.
[0076] In a two-process scenario, assume that the clock difference between process A and process B causes the measured time to include a positive bias θ*t_real when process A is the root node, and a negative bias -θ*t_real when process B is the root node. By averaging the measurements of all root nodes, the positive and negative biases cancel each other out, ultimately yielding the unbiased true broadcast time t_real. Extending this to an N-process scenario, each process acts fairly as both sender and receiver, ensuring that the algebraic sum of all systematic bias terms is zero, mathematically eliminating measurement errors caused by clock heterogeneity and timing differences.
[0077] Therefore, the total measurement time in this embodiment is the sum of the measurement times corresponding to each root node accumulated in the global timer after all processes have rotated through the root node once.
[0078] In step S106 of this embodiment, when performing global data reduction on the total measurement time for different message sizes, the MPI_Reduce function is specifically used to calculate the average latency, minimum latency, and maximum latency for the total measurement time corresponding to different message sizes. By performing a full reduction operation through the MPI_Reduce function, the measurement data of all processes are summarized to obtain the following core metrics:
[0079] 1. Weighted Average Delay: Calculating the average of the total measurement time can reflect the average overhead of broadcast operations. It should be noted that, in order to ensure statistical significance, when the root node broadcasts to other processes in this embodiment, specifically, the root node broadcasts to other processes a specified number of times M. Therefore, when all processes use local timers to record the broadcast end time and calculate the difference between the broadcast end time and the broadcast start time, specifically, all processes use local timers to record the end time of each broadcast and calculate the difference between the end time of each broadcast and the corresponding broadcast start time. The total measurement time is obtained by accumulating the difference of each broadcast of all processes into a specified global timer. Thus, the average of the total measurement time is calculated by global_timer / (N×M), where global_timer is the total measurement time obtained after all processes rotate through the root node for a message size, N is the number of processes, and M is the number of times each root node broadcasts to other processes.
[0080] 2. Extreme Delay: This includes the global minimum delay (time consumption under optimal communication conditions) and the global maximum delay (performance bottleneck in the worst case). Since each message size in the message size sequence corresponds to a total measurement time, and each root node rotation measurement is broadcast M times, analyzing this information allows us to obtain the global minimum and global maximum delay scenarios. Obtaining these delay metrics through the MPI_Reduce function is a conventional technique in this field and is not the focus of this solution; therefore, it will not be elaborated further.
[0081] The following example uses an MPI broadcast measurement involving two processes (process 0 and process 1) to verify the method of this embodiment.
[0082] 1. According to step S101, set the minimum message size to 8 bytes and the maximum message size to 1MB, and generate a message size sequence in powers of 2: 1B, 2B, 4B, ..., 1MB. Dynamically allocate a message buffer using a memory allocation function and fill it with data according to the current test message size.
[0083] 2. Traverse the message size sequence and execute steps S101 to S105, including:
[0084] 1) Calculation of broadcast operation time when root node 0 is the sender:
[0085] Synchronization and timing: Process 0 and process 1 use a ring synchronization protocol to synchronize. Process 1 exits the synchronization barrier first, and process 0 exits last and records the broadcast start time t_start_0.
[0086] Broadcast operation: Process 0 broadcasts a data structure including t_start_0 and padding data matching the message size. After receiving the broadcast, process 1 records the broadcast end time t_stop_0_1; process 0 records the broadcast end time t_stop_0_0.
[0087] Time consumption calculation: The time consumed by process 0 is t_stop_0_0 - t_start_0, and the time consumed by process 1 is t_stop_0_1 - t_start_0 (when considering the clock difference θ, the actual time is t_stop_0_1 - (t_start_0 + θ)).
[0088] 2) Calculation of broadcast operation time when root node 1 acts as the sender:
[0089] Synchronization and timing: Process 0 and process 1 use a ring synchronization protocol to synchronize. Process 0 exits first, and process 1 exits the barrier last and records the broadcast start time t_start_1.
[0090] Broadcast operation: Process 1 broadcasts t_start_1 and a data structure containing padding data matching the message size; after receiving the broadcast, process 0 records the broadcast end time t_stop_1_0; process 1 records the broadcast end time t_stop_1_1.
[0091] Time consumption calculation: The time consumed by process 1 is t_stop_1_1 - t_start_1, and the time consumed by process 0 is t_stop_1_0 - t_start_1 (actually t_stop_1_0 - (t_start_1 - θ)).
[0092] 3) Deviation elimination calculation:
[0093] The total measured time is obtained by adding the broadcast operation time when root node 0 is the sender to the broadcast operation time when root node 1 is the sender: (t_stop_0_0 - t_start_0) + (t_stop_0_1 - t_start_0) + (t_stop_1_1 - t_start_1) + (t_stop_1_0 - t_start_1).
[0094] Since θ and -θ cancel each other out, the final result only includes the actual broadcast time, with no systematic bias. The timing bias between process 0 and process 1 is as follows: Figure 5 As shown.
[0095] 3. According to step S106, calculate the statistical data of all processes under different message sizes through MPI_Reduce, and output the average latency, minimum latency and maximum latency to provide a basis for MPI library optimization.
[0096] Example 2
[0097] This embodiment proposes an MPI broadcast operation overhead measurement system based on system bias elimination, including a processor and a computer-readable storage medium interconnected with each other. The computer program stored in the computer-readable storage medium is executed by the processor to implement the steps of the MPI broadcast operation overhead measurement method based on system bias elimination described in Embodiment 1.
[0098] This embodiment also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the MPI broadcast operation overhead measurement method based on system bias elimination as described in Embodiment 1.
[0099] This embodiment also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the MPI broadcast operation overhead measurement method based on system bias elimination as described in Embodiment 1.
[0100] In summary, this invention discloses a high-precision overhead measurement method for MPI broadcast operations. It solves the systemic deviation problem caused by asynchronous timing among multiple processes in a distributed environment by employing a root node rotation mechanism and a ring synchronization protocol. This invention utilizes a ring synchronization protocol to ensure that the root node exits last, unifying the timing starting point, and through a symmetrical measurement design, completely cancels out clock differences between different processes during cumulative calculation. This invention achieves the following beneficial effects:
[0101] 1. System bias elimination: By rotating the root node and symmetrical measurement, the differences in timing start points of different processes and the CPU clock bias are canceled out in the calculation, thus eliminating systematic measurement errors in principle.
[0102] 2. High-precision synchronization mechanism: The ring synchronization protocol ensures that the root node is the last to exit the synchronization barrier, strictly controls the consistency of the timing start point, and avoids the problem of chaotic exit timing of traditional MPI synchronization barriers.
[0103] 3. Universality: Applicable to distributed environments with any number of processes, without relying on hardware clock synchronization or additional calibration steps, achieving high-precision overhead measurement solely through software measurement process design.
[0104] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for measuring MPI broadcast operation overhead based on system bias elimination, characterized in that, Includes the following steps: Traverse all processes, select one process at a time as the root node, and all other processes other than the root node are non-root nodes; Synchronization operations are performed on all processes starting from the root node process to ensure that the root node process is the last to exit the synchronization barrier. The root node process broadcasts MPI to other processes and uses a local timer to record the start time of the broadcast. All processes use a local timer to record the end time of the broadcast and calculate the difference between the end time and the start time. Repeat the step of traversing all processes and selecting one process as the root node in turn until all processes have been traversed. Then, sum up the differences between all processes to obtain the total measurement time. The next message size in a preset message size set is selected as the size of the message broadcast by MPI. Then, the step of traversing all processes and selecting one process as the root node in turn is executed again until the message set is traversed. The message broadcast by MPI is random business data that matches the selected message size in the message size set. The expression for the message size set is as follows: Where msg_min is the minimum message size and msg_max is the maximum message size; Global data reduction is performed on the total measurement time to obtain statistical data for all processes.
2. The MPI broadcast operation overhead measurement method based on system bias elimination according to claim 1, characterized in that, When synchronizing all processes starting from the root node's process, specifically, all processes use a ring synchronization protocol to synchronize, including the following steps: The root node sends a synchronization signal to the successor node in the ring. All other nodes in the ring send synchronization signals to the next node in a specified order until the root node receives the synchronization signal sent by the predecessor node in the ring. This causes the nodes in the ring to enter the synchronization barrier one by one, with the root node being the last to enter the synchronization barrier. The root node sends a synchronization completion signal to its successor nodes in the ring. All other nodes in the ring send synchronization completion signals to the next node in a specified order until the root node receives the synchronization completion signal sent by its predecessor node in the ring. This causes the nodes in the ring to exit the synchronization barrier one by one, with the root node being the last to exit the synchronization barrier.
3. The MPI broadcast operation overhead measurement method based on system bias elimination according to claim 1, characterized in that, When the root node process broadcasts MPI to other processes and records the start time of the broadcast using a local timer, including: The root node process dynamically allocates a message buffer using a memory allocation function, stores the broadcast start time at the beginning address of the message buffer, stores the message to be broadcast in the remaining space of the message buffer, initiates an MPI broadcast operation using the data in the message buffer, and releases the message buffer after the operation is completed. Non-root node processes receive message data broadcast by root node processes and store it in a receive buffer. They then extract the broadcast start time recorded by the root node process from the starting address of the receive buffer and release the receive buffer.
4. The MPI broadcast operation overhead measurement method based on system bias elimination according to claim 1, characterized in that, When the root node broadcasts to other processes, it broadcasts to other processes a specified number of times. When all processes use local timers to record the broadcast end time and calculate the difference between the broadcast end time and the broadcast start time, it records the end time of each broadcast and calculates the difference between the end time and the corresponding broadcast start time. The total measurement time is obtained by accumulating the differences of each broadcast from all processes into a specified global timer.
5. The MPI broadcast operation overhead measurement method based on system bias elimination according to claim 1, characterized in that, When performing global data reduction on the total measurement time, the MPI_Reduce function is used to calculate the average latency, minimum latency, and maximum latency for the total measurement time corresponding to messages of different sizes.
6. A measurement system for MPI broadcast operation overhead based on system bias elimination, characterized in that, The method includes an interconnected processor and a computer-readable storage medium, wherein a computer program stored in the computer-readable storage medium is executed by the processor to implement the steps of the MPI broadcast operation overhead measurement method based on system bias elimination as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the MPI broadcast operation overhead measurement method based on system bias elimination as described in any one of claims 1 to 5.
8. A computer program product, characterized in that, The method includes a computer program that, when executed by a processor, implements the steps of the MPI broadcast operation overhead measurement method based on system bias elimination as described in any one of claims 1 to 5.