Ensemble communication performance test method, device and equipment
By combining hardware and network layer information to determine model parameters in aggregated communication performance testing, conducting point-to-point testing and algorithm analysis, and constructing a performance model, the problems of high cost and poor accuracy in existing technologies are solved, achieving high-precision aggregated communication performance evaluation and platform adaptability.
Patent Information
- Application Number
- CN202511972260.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-02-27
AI Technical Summary
Existing methods for testing the performance of aggregated communication are costly, inaccurate, and difficult to adapt to different complex hardware platforms, especially with insufficient prediction accuracy under heterogeneous hardware architectures.
Model parameters are determined by using processor hardware information based on computing nodes and platform network hierarchy information. Point-to-point communication tests are conducted, the source code of the aggregate communication algorithm is analyzed, a performance model is constructed, and a performance report is generated.
It achieves high-precision, platform-adaptive aggregate communication performance evaluation, reduces data acquisition costs, improves prediction accuracy and the ability to reflect algorithm details, and supports system optimization and hardware configuration decisions.
Smart Images

Figure CN121585591A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software testing, and more particularly to a method, apparatus, and equipment for testing integrated communication performance. Background Technology
[0002] High-performance computing (HPC) is a critical infrastructure supporting cutting-edge scientific research and engineering innovation. In ultra-large-scale parallel computing and distributed computing systems, collective communication, as the fundamental communication paradigm for inter-process collaboration, directly determines the scalability and performance of the overall application. For example, in typical large-scale scientific computing such as weather simulation, fluid mechanics, and molecular dynamics, collective communication operations such as broadcast, allgather, and reduce are frequently invoked. Statistics show that in modern production-grade supercomputing systems, the execution overhead of the Message Passing Interface (MPI) library can account for nearly 30% of the total application core time, with collective communication operations accounting for the vast majority of MPI execution time. Therefore, accurate and efficient testing, evaluation, and prediction of collective communication performance have become an urgent need for optimizing the application efficiency of supercomputing systems and guiding hardware selection and system tuning.
[0003] Currently, modeling and testing methods for ensemble communication performance can be mainly divided into two categories. One category is machine learning-based methods. These methods train models by collecting large amounts of historical communication data, attempting to learn the complex nonlinear mapping relationship between communication characteristics and communication time. However, these methods have significant limitations: their prediction accuracy is highly dependent on the scale and quality of the training data, resulting in high data acquisition costs; furthermore, their extrapolation ability is often insufficient for new hardware platforms or new communication modes that exceed the distribution range of the training data, leading to poor generality. The other category is statistical analysis-based methods, such as the classic τ-Lop and C-Lop models. These methods abstract and parameterize hardware communication links to construct analytical models to predict communication time. Their advantage lies in the good interpretability of the models. However, existing models typically treat hardware as homogeneous or flat networks, making it difficult to effectively characterize and integrate the complex heterogeneous hardware architectures of modern supercomputing systems, especially scenarios involving multi-level high-speed interconnect networks and hierarchical intra-node architectures. Therefore, the accuracy of such models drops significantly when predicting the performance of complex ensemble communication operations spanning different network layers or involving hybrid shared memory and network communication.
[0004] In summary, existing methods for testing and modeling aggregated communication performance either suffer from high costs and weak generalization capabilities, or are limited by insufficient ability to characterize complex heterogeneous hardware architectures, making it difficult to achieve cross-platform, high-precision aggregated communication performance prediction. Summary of the Invention
[0005] This invention provides a method, apparatus, and device for testing aggregated communication performance, which solves the problems of high cost, poor accuracy, and difficulty in adapting to different complex hardware platforms in existing aggregated communication performance testing methods. It realizes a high-precision and platform-adaptive aggregated communication performance evaluation based on a combination of accurate underlying hardware modeling and algorithm behavior analysis.
[0006] This invention provides a method for testing the performance of aggregated communication, comprising the following steps: Based on the processor hardware information of computing nodes and the platform network layer information, model parameters related to the performance of aggregate communication are determined. Based on the determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests, the measured parameter values under different communication scenarios are obtained. Analyze the source code of the communication algorithm of the set under test to obtain the communication information during the communication process; Based on the measured parameter values, the communication information, and the communication rounds and concurrency relationship of the communication algorithm of the set under test, a performance model is constructed to estimate the overall time consumption of the communication algorithm of the set under test. Based on the performance model and combined with the actual communication scale parameters input, the performance of the communication algorithm of the set under test is evaluated and a performance report is generated.
[0007] According to the present invention, a method for testing aggregated communication performance includes determining model parameters related to aggregated communication performance based on the processor hardware information of computing nodes and platform network layer information. Specifically, the model parameters include network communication parameters, memory communication parameters, type parameters of point-to-point communication primitives, and bandwidth utilization parameters. Based on the network topology defined by the platform network layer information, network communication parameters are defined for communication across different network layers, and these parameters characterize the point-to-point communication latency at different network layers. Based on the processor hardware information, memory communication parameters are defined for shared memory point-to-point communication under different process core-binding methods. Type parameters of underlying point-to-point communication primitives are defined, including at least request-response and bidirectional switching types, and the correspondence between these type parameters and communication latency models is determined. Based on the network protocol adopted by the platform network layer information, bandwidth utilization parameters related to effective transmission bandwidth are defined.
[0008] According to the present invention, a method for testing the performance of aggregated communication includes obtaining measured parameter values under different communication scenarios by configuring different combinations of communication features and conducting point-to-point communication tests based on determined model parameters. Specifically, this includes: within a single computing node, performing point-to-point communication tests by changing the combination of message length, process core binding method, concurrent transmission quantity, and point-to-point communication primitive type, obtaining shared memory communication time consumption data under different feature combinations, and calculating the corresponding memory communication parameter values based on the time consumption data; and between multiple computing nodes, performing point-to-point communication tests by changing the combination of message length, the number of network layers traversed by the communication process, concurrent transmission quantity, and point-to-point communication primitive type, obtaining network communication time consumption data under different feature combinations, and calculating the corresponding network communication parameter values and bandwidth utilization parameter values based on the time consumption data.
[0009] According to the present invention, a method for testing the performance of aggregate communication includes parsing the source code of the aggregate communication algorithm under test to obtain communication information during the communication process. Specifically, the communication information includes the node number of the process, the channel type between processes, the network hierarchy path between processes, the number of concurrent transmissions on the same channel in the same communication round, and the type parameters of point-to-point communication primitives. Based on the algorithm logic in the source code of the aggregate communication algorithm under test, all source process numbers and destination process numbers in each communication round are determined, forming a process pair mapping relationship. The node number of the process is determined based on the process pair mapping relationship. Based on the computing node position of the process pair in the process pair mapping relationship, the channel type between each pair of processes is determined to be either a shared memory channel or a network channel. If the channel type is determined to be a network channel, the network hierarchy path required for communication between the current process pairs is further analyzed and determined in conjunction with the platform network hierarchy information. Based on the logic of the aggregate communication algorithm under test, the number of concurrent process pairs using the same channel type and the same network hierarchy path in the same communication round is counted. Based on the source code, the type parameters of the underlying point-to-point communication primitives actually called in each communication round are identified and recorded.
[0010] According to a method for testing the performance of aggregated communication provided by the present invention, the method for constructing a performance model for estimating the overall communication time of the aggregated communication algorithm under test based on the measured parameter values, the communication information, and the communication rounds and concurrency relationships of the algorithm under test includes: for each process pair in the communication information, selecting corresponding parameters from the measured parameter values according to the channel type, network hierarchical path, message length, number of concurrent process pairs, and point-to-point communication primitive type of the process pair, and calculating the estimated time of the process pair in the current communication round; comparing the estimated time of all process pairs within the same communication round, and taking the maximum value as the estimated communication time of the current round; for all communication rounds of the aggregated communication algorithm under test, sequentially obtaining the estimated communication time, and accumulating the estimated communication time of all rounds to obtain a performance model characterizing the overall communication time of the aggregated communication algorithm under test.
[0011] According to a method for testing the performance of aggregated communication based on the present invention, the method evaluates the performance of the aggregated communication algorithm under test and generates a performance report based on the performance model and the input actual communication scale parameters. Specifically, the method includes: substituting the actual communication scale parameters into the performance model to calculate the estimated total communication time of the aggregated communication algorithm under test; calculating at least one communication performance indicator based on the estimated total communication time, the communication performance indicator including communication latency, effective throughput, or network bandwidth utilization; and summarizing and organizing the test environment information, the performance model, the actual communication scale parameters, the estimated total communication time, and the communication performance indicators to generate a comprehensive performance report containing the performance evaluation conclusions.
[0012] The present invention also provides a collective communication performance testing device, comprising the following modules: The model parameter acquisition module is used to determine model parameters related to the collective communication performance based on the processor hardware information of the computing node and the platform network layer information. The measured parameter acquisition module is used to obtain measured parameter values under different communication scenarios based on determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests. The algorithm parsing module is used to parse the source code of the communication algorithm of the set under test and obtain the communication information during the communication process; The performance model construction module is used to construct a performance model for estimating the overall time consumption of the communication algorithm of the set under test based on the measured parameter values, the communication information, and the communication rounds and concurrency relationship of the communication algorithm of the set under test. The performance evaluation module is used to evaluate the performance of the communication algorithm of the set under test based on the performance model and combined with the input actual communication scale parameters, and generate a performance report.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the collective communication performance testing method described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the set communication performance testing method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the set communication performance testing method as described above.
[0016] This invention provides a method, apparatus, and device for testing aggregated communication performance, which offers the following advantages: By determining model parameters related to aggregated communication performance based on processor hardware information and platform network layer information of computing nodes, it achieves precise abstraction and parameterization of the underlying communication architecture of a specific platform. This allows the performance model to closely match actual hardware characteristics, fundamentally improving the model's adaptability and versatility across different heterogeneous computing platforms. Based on the determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests, measured parameter values under different communication scenarios are obtained. This systematic point-to-point benchmark testing replaces traditional empirical estimation or large-scale historical data collection, significantly reducing data acquisition costs and ensuring that the obtained parameter values truly reflect the platform's performance under various communication modes, laying a reliable data foundation for building high-precision models. By analyzing the source code of the aggregated communication algorithm under test, communication information during its communication process is obtained and combined with the aforementioned measured parameters. This abandons the traditional approach of treating aggregated communication as a "black box" for overall fitting, instead delving into the internal logic of the algorithm to accurately identify key behavioral characteristics such as communication rounds, concurrency relationships, and channel types between process pairs. This enables the subsequent construction of a performance model for predicting the overall time consumption of the communication algorithm under test. This allows for a precise mapping and combination of macroscopic algorithmic behavior and microscopic, measured point-to-point communication performance, thereby achieving a refined and analytical prediction of the overall time consumption of complex collective communication operations. This significantly improves the accuracy of the prediction and its ability to reflect algorithmic details. Performance evaluation based on this precisely constructed performance model and the generation of performance reports provide users with highly reliable performance insights and quantitative data closely related to specific platforms and algorithm implementations, effectively supporting system optimization, algorithm selection, and hardware configuration decisions. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the collective communication performance testing method provided by the present invention.
[0019] Figure 2 This is a schematic diagram of the structure of the collective communication performance testing device provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] The following is combined with Figures 1-3 The embodiments of the present invention are described in detail.
[0023] The collective communication performance testing method provided in this embodiment of the invention is executed by a collective communication performance testing device, which can be configured in a computer. The computer can be a local computer or a cloud computer. The local computer can be a computer, tablet, etc., and no specific limitation is made here.
[0024] Figure 1 This is a flowchart illustrating the collective communication performance testing method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps: S110. Based on the processor hardware information of the computing node and the platform network layer information, determine the model parameters related to the collective communication performance.
[0025] According to the present invention, a method for testing aggregated communication performance includes determining model parameters related to aggregated communication performance based on the processor hardware information of computing nodes and platform network layer information. Specifically, the model parameters include network communication parameters, memory communication parameters, type parameters of point-to-point communication primitives, and bandwidth utilization parameters. Based on the network topology defined by the platform network layer information, network communication parameters are defined for communication across different network layers, and these parameters characterize the point-to-point communication latency at different network layers. Based on the processor hardware information, memory communication parameters are defined for shared memory point-to-point communication under different process core-binding methods. Type parameters of underlying point-to-point communication primitives are defined, including at least request-response and bidirectional switching types, and the correspondence between these type parameters and communication latency models is determined. Based on the network protocol adopted by the platform network layer information, bandwidth utilization parameters related to effective transmission bandwidth are defined.
[0026] Specifically, the test platform is assumed to be a heterogeneous high-performance computing cluster containing 8 computing nodes, interconnected by two layers of Infiniband network: the access layer (Leaf) and the core layer (Spine). The processors within each node are CPUs with 4 NUMA domains.
[0027] First, network layer modeling is performed. Based on the platform's network topology, communication delay parameters across different network layers are defined. Network communication parameter β1 is defined to describe the communication delay between nodes within the access layer (e.g., communication processes traversing the same access layer switch); network communication parameter β2 is defined to describe the communication delay between nodes across the core layer (e.g., communication processes traversing core layer switches).
[0028] Secondly, for intra-node shared memory communication, memory communication parameters are defined according to different process core binding methods. Parameter α is defined. intra Used to characterize the point-to-point communication latency between two processes bound to the same NUMA domain; define parameter α. inter Used to characterize the communication latency between two processes bound to different NUMA domains.
[0029] The underlying communication primitives are categorized into ping type (based on MPI_Send / MPI_Recv) and ring type (based on MPI_Sendrecv), with the primitive type parameter defined as type∈{ping,ring}. For example, the combination of MPI_Send and MPI_Recv primitives is defined as "request-response type", and the MPI_Sendrecv primitive is defined as "bidirectional exchange type".
[0030] Based on the RoCE or Infiniband protocols adopted by the platform, and considering their pipeline efficiency and link saturation characteristics, a bandwidth utilization parameter n is defined to correct the effective transmission bandwidth.
[0031] By completing the above definition, that is, based on the hardware processor information (NUMA domain structure) and the platform network hierarchy information (two-layer Infiniband topology), the network communication parameters β1 and β2 and the memory communication parameter α were determined. intra With α inter This study establishes a complete set of model parameters related to aggregated communication performance, including point-to-point communication primitive type parameters (request-response and bidirectional switching) and bandwidth utilization parameter n. T(α,β,n,l,b,type) represents the time model for the i-th point-to-point communication using primitive type on the channel, where l is the message length and b is the number of concurrent transmissions. This establishes a precise parameter framework for subsequent targeted point-to-point benchmarking.
[0032] This embodiment refines and parameterizes the hardware architecture of the heterogeneous computing cluster, ensuring that the performance model's foundation strictly corresponds to the physical reality of the specific platform. Specifically, network layer modeling (defining β1 and β2) and intra-node NUMA structure identification (defining α) are crucial. intra α inter This approach accurately captures the differences between cross-node network latency and intra-node memory access latency, ensuring the correct differentiation and quantification of communication costs in hybrid channels (shared memory and network). Defining type parameters based on communication primitive behavior (request-response and bidirectional switching) reflects the performance differences brought about by different communication modes at the underlying operational level. Combining this with the bandwidth utilization parameter 'n' defined by the network protocol further quantifies the impact of network protocol stack overhead and link contention on effective bandwidth. The determination of this series of model parameters ensures that subsequent measurements and analyses no longer rely on general assumptions about the hardware architecture, but are built on a solid foundation of structured and quantitative descriptions of the platform's specific communication capabilities. This provides crucial and accurate parameter inputs for ultimately achieving high-precision prediction of aggregated communication performance across different hardware platforms.
[0033] S120. Based on the determined model parameters, different combinations of communication features are configured and point-to-point communication tests are conducted to obtain measured parameter values under different communication scenarios.
[0034] According to the present invention, a method for testing the performance of aggregated communication includes obtaining measured parameter values under different communication scenarios by configuring different combinations of communication features and conducting point-to-point communication tests based on determined model parameters. Specifically, this includes: within a single computing node, performing point-to-point communication tests by changing the combination of message length, process core binding method, concurrent transmission quantity, and point-to-point communication primitive type, obtaining shared memory communication time consumption data under different feature combinations, and calculating the corresponding memory communication parameter values based on the time consumption data; and between multiple computing nodes, performing point-to-point communication tests by changing the combination of message length, the number of network layers traversed by the communication process, concurrent transmission quantity, and point-to-point communication primitive type, obtaining network communication time consumption data under different feature combinations, and calculating the corresponding network communication parameter values and bandwidth utilization parameter values based on the time consumption data.
[0035] Specifically, model parameters were measured for different communication scenarios. For shared memory communication within a single node, the time required to send and receive messages was measured under different characteristics by changing message length, concurrent transmission count, process core binding method, and point-to-point communication type, thus obtaining parameter values under different characteristics. The characteristic variation range is described as follows: message length from 1 byte to 1M bytes; concurrent transmission count from 1 to n / 2, where n is the maximum number of cores in a single node; process core binding method using 1 / 2 and 2 / 3; point-to-point communication primitives using either Ping or Ring, and measurements were performed. , These are the model parameters for the algorithm during the i-th communication on the channel.
[0036] For cross-node communication parameters, the time required to send and receive messages under different characteristics was measured by changing the message length, concurrent transmission count, number of network layers traversed by the communication process, and point-to-point communication type, thus obtaining parameter values under different characteristics. The characteristic variation range is described as follows: message length from 1 byte to 1M bytes; concurrent transmission count from 1 to n (maximum number of cores per node); number of network layers traversed by the communication process from 0 to k, where k is the platform's network layer number; both Ping and Ring primitives were used for point-to-point communication, and measurements were taken. and , These are the model parameters for the algorithm during the i-th communication on the channel. This refers to network hierarchical structure information.
[0037] Specifically, shared memory communication parameters were measured within a single compute node (equipped with 4 NUMA domains, each with 4 cores). A benchmark program was written to systematically change the following combinations of characteristics and perform point-to-point communication tests between process pairs: message length started at 1 byte and increased exponentially to 1 megabyte (e.g., 1B, 2B, 4B, ..., 1MB); process core binding was set to "within the same NUMA domain" (intra-NUMA), "between different NUMA domains" (inter-NUMA), and "mixed binding" (some processes within the same domain, others between different domains); the number of concurrent transmissions started at 1 pair of processes and gradually increased to half the total number of node cores (i.e., 8 pairs of processes); the point-to-point communication primitives used were the MPI_Send / MPI_Recv combination (request-response) and MPI_Sendrecv (bidirectional exchange). For each combination of features, such as a message length of 64KB, inter-NUMA core binding, 4 concurrent processes, and the use of the MPI_Sendrecv primitive, multiple communications are performed and the average round-trip time is measured. Based on this time data, the shared memory communication parameter value α_inter_sendrecv(64KB, 4) for that specific combination of features is calculated using a predefined model framework. By traversing the above parameter space, a multi-dimensional parameter lookup table is established, which records the memory communication parameter values under different message lengths, core binding methods, concurrency levels, and primitive types.
[0038] Cross-node communication parameters were measured across multiple compute nodes (e.g., using a subset of 4 nodes). Using the same benchmark procedure, the following combination of features was varied: message length range was the same as in intra-node testing; the number of network layers traversed by the communication process was set according to the platform topology, including "Layer 0" (two nodes under the same access layer switch), "Layer 1" (traversing access layer switches but not the core layer), and "Layer 2" (traversing core layer switches); the number of concurrent transmissions gradually increased from 1 pair of inter-node communication processes to the total number of core processes on a single node (i.e., 16 pairs of processes, assuming paired communication between nodes); and both MPI_Send / MPI_Recv and MPI_Sendrecv primitive types were used. For each combination of features, for example, with a message length of 512KB, communication traversing a Layer 1 network (inter-access layer), 8 concurrent process pairs, and using the MPI_Send / MPI_Recv primitives, point-to-point communication latency and effective bandwidth were measured in this scenario. Based on this time-consuming data and combined with network topology information, the corresponding network communication delay parameter β_1_send(512KB, 8) and the parameter n_1_send(512KB, 8) characterizing the effective bandwidth utilization of the protocol under this path were calculated. Finally, by integrating the measurement data within and between all nodes, a structured set of measured parameter values covering all typical communication scenarios and operating modes of the platform was formed.
[0039] This embodiment replaces the coarse estimation of hardware performance or reliance on large-scale historical operational data in traditional modeling methods with a systematic and gridded point-to-point communication benchmark test, directly obtaining first-hand, real performance data from the target hardware platform. This experimental approach ensures that the obtained parameter values (α, β, n) accurately reflect the actual performance of the specific platform under different memory access modes, network paths, load concurrency, and underlying communication primitives. It provides high-fidelity, fine-grained basic data input for subsequent construction of aggregate communication performance models, fundamentally improving the accuracy of model predictions and the ability to characterize the hardware characteristics of specific platforms. Simultaneously, this measurement framework itself has high scalability and platform adaptability; by simply adjusting the test topology, network layers, and concurrency limits, it can be quickly adapted to different hardware systems, laying a practical foundation for the general application of this method on different computing platforms.
[0040] S130. Analyze the source code of the communication algorithm of the set under test and obtain the communication information during its communication process.
[0041] According to the present invention, a method for testing the performance of aggregate communication includes parsing the source code of the aggregate communication algorithm under test to obtain communication information during the communication process. Specifically, the communication information includes the node number of the process, the channel type between processes, the network hierarchy path between processes, the number of concurrent transmissions on the same channel in the same communication round, and the type parameters of point-to-point communication primitives. Based on the algorithm logic in the source code of the aggregate communication algorithm under test, all source process numbers and destination process numbers in each communication round are determined, forming a process pair mapping relationship. The node number of the process is determined based on the process pair mapping relationship. Based on the computing node position of the process pair in the process pair mapping relationship, the channel type between each pair of processes is determined to be either a shared memory channel or a network channel. If the channel type is determined to be a network channel, the network hierarchy path required for communication between the current process pairs is further analyzed and determined in conjunction with the platform network hierarchy information. Based on the logic of the aggregate communication algorithm under test, the number of concurrent process pairs using the same channel type and the same network hierarchy path in the same communication round is counted. Based on the source code, the type parameters of the underlying point-to-point communication primitives actually called in each communication round are identified and recorded.
[0042] Specifically, we take a typical implementation of the "MPI_Allgather" operation in the open-source MPICH library, the recursive doubling algorithm, as an example. We read the C source code of this algorithm and statically analyze its deterministic communication pattern in each round of communication based on its loop and conditional branch logic. For example, in a scenario where the total number of processes is P=8, the algorithm executes log2(8)=3 rounds. In the first round, the logic in the source code instructs each process to exchange data with a process at a distance of 1 (i.e., process i and process i⊕1, where ⊕ represents bitwise XOR). By parsing the index calculation in the code, we determine the source and destination process numbers for all four pairs of communication in this round, such as process pairs (0,1), (2,3), (4,5), and (6,7), and record these process pairs in a preset process-node mapping table, thereby determining the physical node number of each process. For example, assume processes 0,1,2,3 are mapped to node A, and processes 4,5,6,7 are mapped to node B.
[0043] The channel type is determined based on the node location of each pair of communicating processes. Since process pairs (0,1) and (2,3) are both within node A, their channel type is determined to be a "shared memory channel" within node A. Process pairs (0,4) and (1,5) are located in nodes A and B respectively, and their channel type is determined to be a "network channel". For process pairs determined to be network channels, such as (0,4), further analysis is conducted using the known cluster network topology (assuming a two-layer structure including access layer switches). By querying the switch information connected to nodes A and B, it is determined that the network communication between them needs to cross the "access layer" network layer, thus determining their network layer path to be "cross-access layer".
[0044] Based on the algorithm's characteristic that communication occurs in parallel within the same round, the number of concurrent process pairs using the same channel and network path is counted. For example, in the first round, all four communication pairs are logically concurrent, but two of them (0,1 and 2,3) share a "shared memory channel within node A," and they are concurrent on that channel; the other two pairs (4,5 and 6,7) share a "shared memory channel within node B," and are also concurrent. As for the network channel, it may not exist in this round, or, according to the mapping relationship, there may be specific concurrent network communication pairs.
[0045] By analyzing the actual MPI communication functions called in the source code, such as identifying that the algorithm uses the MPI_Sendrecv function to implement data exchange in each round, the point-to-point communication primitive type parameter used by the algorithm in each round of communication is recorded as "bidirectional exchange type". Through the above steps, a complete analysis of the communication information of this recursive doubling algorithm is completed.
[0046] This embodiment achieves accurate and unambiguous static analysis of the internal communication behavior of the set communication algorithm by directly analyzing its source code. This method can automatically and accurately extract the key micro-parameters required for the macro-performance model: precise process pair relationships, channel type, hierarchical information of network paths, the actual number of concurrent communication pairs, and the specific types of communication primitives used at the underlying level. This avoids the information loss and errors caused by treating set communication as a black box for overall performance fitting, ensuring that the input information for subsequent performance model construction is completely consistent with the actual execution logic of the algorithm. This fine-grained, code-analysis-based characterization of communication behavior is the core prerequisite and key advantage for ultimately achieving high-precision set communication performance prediction.
[0047] S140. Based on the measured parameter values, the communication information, and the communication rounds and concurrency relationship of the communication algorithm of the set under test, a performance model is constructed to estimate the overall time consumption of the communication algorithm of the set under test.
[0048] According to a method for testing the performance of aggregated communication provided by the present invention, the method for constructing a performance model for estimating the overall communication time of the aggregated communication algorithm under test based on the measured parameter values, the communication information, and the communication rounds and concurrency relationships of the algorithm under test includes: for each process pair in the communication information, selecting corresponding parameters from the measured parameter values according to the channel type, network hierarchical path, message length, number of concurrent process pairs, and point-to-point communication primitive type of the process pair, and calculating the estimated time of the process pair in the current communication round; comparing the estimated time of all process pairs within the same communication round, and taking the maximum value as the estimated communication time of the current round; for all communication rounds of the aggregated communication algorithm under test, sequentially obtaining the estimated communication time, and accumulating the estimated communication time of all rounds to obtain a performance model characterizing the overall communication time of the aggregated communication algorithm under test.
[0049] Specifically, taking the RingAllgather algorithm running on an 8-process cluster with 4 nodes as an example, its performance model is constructed, and the time consumption of the entire communication operation can be expressed as:
[0050] Where P represents the number of processes, and Here are the model parameters for the algorithm during the i-th communication on the channel, where l represents the message length and b is the number of concurrent transmissions. This refers to the network hierarchical structure information. The algorithm uses the MPI_SendRecv primitive for communication at the bottom layer.
[0051] Based on the communication information obtained from the preceding steps, it is known that the algorithm performs P-1=7 rounds of communication. In each round, each process sends data to its logical right neighbor and receives data from its left neighbor. Based on the process-node mapping (e.g., processes 0-1 on node A, processes 2-3 on node B, processes 4-5 on node C, and processes 6-7 on node D) and the network topology (two InfiniBand layers), the channel type and network path for each process pair in each round can be determined. For example, in a certain round, process pairs (0,1), (2,3), (4,5), and (6,7) are all intra-node shared memory channels; while process pairs (1,2), (3,4), and (5,6) may be cross-node network channels, and according to the topology, they need to cross the access layer.
[0052] For each process pair in each round, based on its channel type and other characteristics, the corresponding parameters are selected from the measured parameter values for time consumption calculation. For example, for a process pair (0,1) in a shared memory channel within a node, given the message length l, the number of concurrent process pairs b in this round on that channel (e.g., if only this pair communicates concurrently within node A in this round, b=1), and the primitive they use is "bidirectional switching", the corresponding memory communication parameter value α_intra_sendrecv(l, 1) is indexed from the parameter lookup table and selected for calculation. Its estimated time consumption T_pair may be calculated as α_intra_sendrecv(l, 1) * l.
[0053] Similarly, for a cross-node network channel process pair (1,2), given its message length l, the number b of concurrent process pairs in this round on this network path (across the access layer) (e.g., if there is only this one pair, b=1), and using the "bidirectional switching" primitive, the corresponding network communication parameter β_leaf_sendrecv(l, 1) and bandwidth utilization parameter n_leaf_sendrecv(l, 1) are selected from the parameter table. Its estimated time consumption can be calculated as β_leaf_sendrecv(l, 1) * (l / n_leaf_sendrecv(l, 1)). This calculation process is repeated for all process pairs in the same round.
[0054] Within the same communication round, the calculated estimated time for all process pairs is compared. Due to the synchronous nature of communication, the actual communication time in this round depends on the slowest process pair. Therefore, the maximum value among all T_pairs in this round is taken as the estimated communication time T_round_i for that round. Finally, the above process of "process pair time calculation -> taking the maximum value within the round" is repeated for all 7 communication rounds of the Ring Allgather algorithm, resulting in T_round_1 to T_round_7. The estimated communication time for these 7 rounds is then summed: T_total = Σ T_round_i, and the resulting T_total is the performance model representing the overall communication time of the RingAllgather algorithm under this specific hardware platform and process layout.
[0055] Alternatively, the binomial broadcast algorithm and the recursive doubling all gather algorithm can be used.
[0056] Taking the binomial broadcast algorithm as an example, it is decomposed into... Round communication, each round involves For a process, the time taken for its entire communication operation can be precisely expressed as:
[0057] Where P represents the number of processes, and Here are the model parameters for the algorithm during the i-th communication on the channel, where l represents the message length and b is the number of concurrent transmissions. This is the network hierarchical structure information. This formula indicates that the algorithm uses the MPI_Send and MPI_Recv primitives for communication at the bottom layer.
[0058] For the recursive doubling all gather algorithm, the time consumption expression for the entire communication operation is as follows:
[0059] Where P represents the number of processes, and Here are the model parameters for the algorithm during the i-th communication on the channel, where l represents the message length and b is the number of concurrent transmissions. This refers to the network hierarchical structure information. The underlying layer of this algorithm uses the MPI_Sendrecv primitive for communication.
[0060] This embodiment accurately establishes macroscopic algorithm performance prediction based on a systematic combination of microscopic communication behavior and measured hardware parameters. By matching the most suitable measured parameters (distinguishing between channel, network path, concurrency, and primitive type) for each communication pair, it ensures that the model reflects the true cost of the underlying communication. Employing a "maximum value per round" strategy, it accurately simulates the bottleneck effect in synchronous aggregate communication where the slowest link determines the round time. The final cumulative model fully characterizes the serial overhead of multi-round communication. The performance model constructed by this method is no longer a rough estimate based on overall empirical formulas, but a fine simulation of the details of algorithm execution and hardware interaction, thereby significantly improving the time prediction accuracy for complex aggregate communication operations, especially in multi-node hybrid communication scenarios.
[0061] S150. Based on the performance model and combined with the actual communication scale parameters input, the performance of the communication algorithm of the set under test is evaluated and a performance report is generated.
[0062] According to a method for testing the performance of aggregated communication based on the present invention, the method evaluates the performance of the aggregated communication algorithm under test and generates a performance report based on the performance model and the input actual communication scale parameters. Specifically, the method includes: substituting the actual communication scale parameters into the performance model to calculate the estimated total communication time of the aggregated communication algorithm under test; calculating at least one communication performance indicator based on the estimated total communication time, the communication performance indicator including communication latency, effective throughput, or network bandwidth utilization; and summarizing and organizing the test environment information, the performance model, the actual communication scale parameters, the estimated total communication time, and the communication performance indicators to generate a comprehensive performance report containing the performance evaluation conclusions.
[0063] Specifically, suppose we need to evaluate the performance of the MPI_Allgather operation using the Recursive Doubling algorithm on an InfiniBand cluster consisting of 16 nodes (32 cores each). First, based on the established performance model for this platform and algorithm, we obtain the actual communication scale parameters. These parameters include the total number of processes involved in the communication, P (e.g., using all 512 processes), and the length of data to be collected from a single process, l (e.g., 128KB of data per process). We then substitute these parameters, P=512 and l=128KB, into the performance model.
[0064] By performing model calculations, for example, by substituting the formulas constructed in the aforementioned steps:
[0065] Alternatively, by running a simulation script based on this model, the estimated total communication time to complete the entire Allgather operation at this scale can be calculated, for example, the result is T_total = 4.2 milliseconds.
[0066] Based on this estimated total communication time, a series of performance metrics are calculated. The overall communication latency of the algorithm can be calculated as T_total (4.2 milliseconds). Further calculations of the effective throughput are performed; for example, if the total amount of data transmitted by the algorithm is approximately (P * l) = 512 * 128KB = 64MB, then the throughput = (64MB) / (4.2ms). Simultaneously, network bandwidth utilization can be estimated, for example, by comparing the above effective throughput with the theoretical peak network bandwidth measured by the platform to obtain the utilization percentage.
[0067] Finally, a comprehensive performance report is generated, which automatically summarizes and organizes the following: test environment information (cluster configuration, node hardware, network topology, software stack version, etc.), the performance model used, the actual input communication scale parameters (P=512, l=128KB), the calculated estimated total communication time (4.2 milliseconds), and the derived performance metrics (latency, throughput, bandwidth utilization). Based on this data, the report will also automatically generate performance evaluation conclusions, such as "Under the current platform configuration and scale, this recursive doubling algorithm is expected to provide approximately 15.2 GB / s of Allgather effective throughput, with network bandwidth utilization of approximately 68% of the theoretical peak," and may include a comparison with model prediction results of similar algorithms, providing quantitative basis for system optimization or algorithm selection.
[0068] This embodiment transforms all the meticulous modeling and analysis work done in the early stages into a quantitative evaluation conclusion that is user-oriented and can be directly used for decision-making. By inputting actual communication scale parameters that users care about into a precise model, reliable performance prediction data can be obtained quickly, avoiding the huge overhead and uncertainty of large-scale practical testing. Automated indicator calculation and report generation standardize and streamline the performance evaluation process, and provide multi-dimensional performance insights. This significantly lowers the threshold and cost for users to conduct cross-platform performance analysis, algorithm selection, or system configuration optimization, transforming aggregate communication performance prediction from a complex research method into a practical tool that can directly support engineering practice and decision-making.
[0069] The following describes the collective communication performance testing device provided by the present invention. The collective communication performance testing device described below can be referred to in correspondence with the collective communication performance testing method described above.
[0070] like Figure 2 The image shows a collective communication performance testing device provided by the present invention, comprising: The model parameter acquisition module 210 is used to determine model parameters related to the collective communication performance based on the processor hardware information and platform network layer information of the computing node. The measured parameter acquisition module 220 is used to acquire measured parameter values under different communication scenarios based on determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests. The algorithm parsing module 230 is used to parse the source code of the communication algorithm of the set under test and obtain the communication information during the communication process. The performance model construction module 240 is used to construct a performance model for estimating the overall time consumption of the communication algorithm of the set under test based on the measured parameter values, the communication information, and the communication rounds and concurrency relationship of the communication algorithm of the set under test. The performance evaluation module 250 is used to evaluate the performance of the communication algorithm of the set under test based on the performance model and combined with the input actual communication scale parameters, and generate a performance report.
[0071] Specifically, the functions of each module in the user account management system provided in this embodiment of the invention correspond one-to-one with the operation flow of each step in the above method-like embodiments, and the achieved effects are also the same. For details, please refer to the above embodiments, and this will not be repeated in this embodiment of the invention.
[0072] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340. The processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a collective communication performance testing method. This method includes: determining model parameters related to collective communication performance based on the processor hardware information and platform network layer information of the computing node; obtaining measured parameter values under different communication scenarios by configuring different combinations of communication features and conducting point-to-point communication tests based on the determined model parameters; parsing the source code of the collective communication algorithm under test to obtain communication information during its communication process; constructing a performance model for estimating the overall time consumption of the collective communication algorithm under test based on the measured parameter values, communication information, and the communication rounds and concurrency relationships of the collective communication algorithm under test; and evaluating the performance of the collective communication algorithm under test and generating a performance report based on the performance model and the input actual communication scale parameters.
[0073] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0074] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the collective communication performance testing method provided by the above methods. The method includes: determining model parameters related to collective communication performance based on the processor hardware information and platform network layer information of the computing node; obtaining measured parameter values under different communication scenarios by configuring different combinations of communication features and conducting point-to-point communication tests based on the determined model parameters; parsing the source code of the collective communication algorithm under test to obtain communication information during its communication process; constructing a performance model for estimating the overall time consumption of the collective communication algorithm under test based on the measured parameter values, communication information, and the communication rounds and concurrency relationships of the collective communication algorithm under test; and evaluating the performance of the collective communication algorithm under test and generating a performance report based on the performance model and the input actual communication scale parameters.
[0075] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the collective communication performance testing method provided by the above methods. The method includes: determining model parameters related to collective communication performance based on the processor hardware information and platform network layer information of the computing node; obtaining measured parameter values under different communication scenarios by configuring different combinations of communication features and conducting point-to-point communication tests based on the determined model parameters; parsing the source code of the collective communication algorithm under test to obtain communication information during its communication process; constructing a performance model for estimating the overall time consumption of the collective communication algorithm under test based on the measured parameter values, communication information, and the communication rounds and concurrency relationships of the collective communication algorithm under test; and evaluating the performance of the collective communication algorithm under test and generating a performance report based on the performance model and the input actual communication scale parameters.
[0076] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for testing the performance of aggregated communication, characterized in that, include: Based on the processor hardware information of computing nodes and the platform network layer information, model parameters related to the performance of aggregate communication are determined. Based on the determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests, the measured parameter values under different communication scenarios are obtained. Analyze the source code of the communication algorithm of the set under test to obtain the communication information during the communication process; Based on the measured parameter values, the communication information, and the communication rounds and concurrency relationship of the communication algorithm of the set under test, a performance model is constructed to estimate the overall time consumption of the communication algorithm of the set under test. Based on the performance model and combined with the actual communication scale parameters input, the performance of the communication algorithm of the set under test is evaluated and a performance report is generated.
2. The method for testing the performance of aggregated communication according to claim 1, characterized in that, The processor hardware information and platform network layer information based on the computing nodes are used to determine the model parameters related to the collective communication performance, specifically including: The model parameters include network communication parameters, memory communication parameters, type parameters of point-to-point communication primitives, and bandwidth utilization parameters; Based on the network topology defined by the platform's network hierarchy information, network communication parameters are defined for communication across different network layers. These network communication parameters are used to characterize the point-to-point communication latency at different network layers. Based on the processor hardware information, define memory communication parameters for point-to-point shared memory communication under different process core-binding methods; Define type parameters for underlying point-to-point communication primitives, wherein the type parameters include at least request-response type and bidirectional exchange type, and determine the correspondence between the type parameters and the communication latency model; Based on the network protocol adopted by the platform's network layer information, a bandwidth utilization parameter related to the effective transmission bandwidth is defined.
3. The method for testing the performance of aggregated communication according to claim 2, characterized in that, Based on the determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests, the measured parameter values under different communication scenarios are obtained, specifically including: Within a single computing node, by changing the combination of message length, process core binding method, concurrent transmission quantity, and point-to-point communication primitive type, point-to-point communication tests are performed to obtain shared memory communication time data under different feature combinations, and the corresponding memory communication parameter values are calculated based on the time data. Between multiple computing nodes, by changing the combination of message length, the number of network layers traversed by the communication process, the number of concurrent transmissions, and the type of point-to-point communication primitives, point-to-point communication tests are performed to obtain network communication time data under different feature combinations, and the corresponding network communication parameter values and bandwidth utilization parameter values are calculated based on the time data.
4. The method for testing the performance of aggregated communication according to claim 1, characterized in that, The process of parsing the source code of the communication algorithm of the set under test and obtaining communication information during the communication process specifically includes: Communication information includes the node number of the process, the channel type between processes, the network hierarchy path between processes, the number of concurrent transmissions on the same channel in the same communication round, and the type parameters of point-to-point communication primitives; Based on the algorithm logic in the source code of the algorithm under test, determine all source process numbers and destination process numbers in each communication round of the algorithm under test, form a process pair mapping relationship, and determine the node number of the process based on the process pair mapping relationship. Based on the location of the computing node in the process pair mapping relationship, determine whether the channel type between each pair of processes is a shared memory channel or a network channel. If the channel type is determined to be a network channel, then the network layer path required for inter-process communication is further analyzed and determined by combining the platform network layer information. Based on the communication algorithm logic of the set under test, the number of concurrent process pairs using the same channel type and the same network layer path in the same communication round is counted. Based on the source code, identify and record the type parameters of the underlying point-to-point communication primitives that are actually invoked in each communication round.
5. The method for testing the performance of aggregated communication according to claim 1, characterized in that, The process of constructing a performance model for estimating the overall time consumption of the communication algorithm of the set under test, based on the measured parameter values, the communication information, and the communication rounds and concurrency relationships of the algorithm, specifically includes: For each process pair in the communication information, based on the channel type, network layer path, message length, number of concurrent process pairs, and point-to-point communication primitive type of the process pair, the corresponding parameters are selected from the measured parameter values to calculate the estimated time consumption of the process pair in the current communication round. Within the same communication round, the estimated time of all process pairs is compared, and the maximum value is taken as the estimated communication time for the current round. For all communication rounds of the communication algorithm under test, the estimated communication time is obtained sequentially, and the estimated communication time of all rounds is accumulated to obtain a performance model characterizing the overall communication time of the communication algorithm under test.
6. The method for testing the performance of aggregated communication according to claim 1, characterized in that, The process of evaluating the performance of the communication algorithm under test based on the performance model and in conjunction with the actual communication scale parameters, and generating a performance report, specifically includes: Substitute the actual communication scale parameters into the performance model for calculation to obtain the estimated total communication time of the communication algorithm for the set under test. Based on the estimated total communication time, at least one communication performance indicator is calculated, including communication delay, effective throughput, or network bandwidth utilization. The test environment information, the performance model, the actual communication scale parameters, the estimated total communication time, and the communication performance indicators are summarized and organized to generate a comprehensive performance report that includes performance evaluation conclusions.
7. A device for testing the performance of integrated communication systems, characterized in that, include: The model parameter acquisition module is used to determine model parameters related to the collective communication performance based on the processor hardware information of the computing node and the platform network layer information. The measured parameter acquisition module is used to obtain measured parameter values under different communication scenarios based on determined model parameters, by configuring different combinations of communication features and conducting point-to-point communication tests. The algorithm parsing module is used to parse the source code of the communication algorithm of the set under test and obtain the communication information during the communication process; The performance model construction module is used to construct a performance model for estimating the overall time consumption of the communication algorithm of the set under test based on the measured parameter values, the communication information, and the communication rounds and concurrency relationship of the communication algorithm of the set under test. The performance evaluation module is used to evaluate the performance of the communication algorithm of the set under test based on the performance model and combined with the input actual communication scale parameters, and generate a performance report.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the collective communication performance testing method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the set communication performance testing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the set communication performance testing method as described in any one of claims 1 to 6.