A multi-node mpi collective communication performance modeling method and system

By measuring the multi-core processors and platform network hierarchy information within a node, and combining this with MPI source code analysis, a mathematical formula was established to predict communication time. This solved the problem of low-cost prediction of cross-node MPI set communication overhead and achieved more accurate communication time prediction.

CN119676099BActive Publication Date: 2025-11-28XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411941181.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-11-28
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

Existing technologies struggle to predict the overhead of cross-node MPI ensemble communication in supercomputing systems at low cost, especially in large-scale scientific computing, where existing models cannot effectively incorporate the hierarchical structure of supercomputing networks for accurate prediction.

Method used

By measuring the multi-core processor information within the node and the platform network hierarchy information, model parameters are determined, MPI source code communication behavior is analyzed, and mathematical formulas are established to predict communication time based on point-to-point communication time under different characteristics, taking into account the supercomputing network hierarchy and communication primitive types.

Benefits of technology

The model can more accurately predict the communication time of multi-node ensemble communication operations, adapt to different hardware platforms, reduce costs, and improve prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676099B_ABST
    Figure CN119676099B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-node MPI set communication performance modeling method and system, first according to the information of multi-core processor in node and platform network hierarchy information, determine the model parameters required to be measured;Then measure the communication parameters in node and the inter-node communication parameters located on different network hierarchy on platform;Next, analyze the set communication source code and simulate the communication algorithm behavior, obtain all communication characteristics of each round of communication of algorithm;Finally, the corresponding parameters are selected in combination with the communication characteristics, and the communication time of each round is expressed by the mathematical formula of the corresponding parameters.The application compared with existing model, introduce the supercomputer network hierarchy structure information and the point-to-point communication primitive type used by communication algorithm bottom, expand the model application range from single-node shared memory model to multi-node shared memory and interconnection network hybrid model, and the model can more accurately predict the communication time of multi-node set communication operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of high-performance computing and network modeling technology, specifically relating to a method and system for modeling the performance of multi-node MPI ensemble communication. Background Technology

[0002] Message Passing Interface (MPI) is the most widely used communication middleware in high-performance computing and has become the de facto communication interface used by HPC applications. According to Chunduri et al., nearly 30% of core time in modern production systems is spent on MPI, and aggregated communication accounts for 66% of the overall MPI execution time.

[0003] Establishing a collective communication performance model aims to predict the performance of various communication operations under given communication and platform characteristics. It is a key technology for analyzing communication bottlenecks, reducing communication overhead, and achieving communication load balancing. Existing collective communication performance modeling methods mainly include machine learning-based modeling and statistical method-based modeling. Models based on machine learning methods such as KNN, XGBoost, and RandomForest can handle the nonlinear relationship between communication time and communication characteristics well, but these models require large datasets for training, resulting in high costs and limited extrapolation capabilities. Statistical method-based modeling mainly predicts communication time by analyzing parameters of the communication middleware. Typical communication performance models for the current communication middleware include τ-Lop and C-Lop. These models abstract hardware complexity by using parameters related to the communication middleware, thus avoiding dependence on hardware details. However, τ-Lop and C-Lop still have some shortcomings; they struggle to predict the performance of cross-node communication operations in conjunction with the hierarchical structure of supercomputing networks.

[0004] As scientific computing problems become increasingly complex and large-scale, the scale of scientific applications running on supercomputers continues to expand. Next-generation supercomputing systems will run applications on hundreds of thousands of nodes and tens of millions of cores. Therefore, how to enable communication performance models to predict cross-node communication overhead at a low cost has become an urgent problem to be solved. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a multi-node MPI set communication performance modeling method and system to address the shortcomings of the prior art, thereby solving the technical problem of large cross-node communication overhead in communication performance model prediction.

[0006] The present invention adopts the following technical solution:

[0007] A method for modeling the communication performance of multi-node MPI ensembles includes the following steps:

[0008] Based on the multi-core processor information within the node and the platform network hierarchy information, determine the model parameters to be measured;

[0009] For all model parameters obtained, point-to-point communication parameters located in different NUMA domains were measured for intra-node shared memory communication; for cross-node communication parameters, point-to-point communication parameters located in different network layers were measured.

[0010] By analyzing the communication behavior of specific set communication algorithms in the MPI source code and combining the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm.

[0011] Preferably, the model parameters to be measured are determined based on the multi-core processor information within the node and the platform network hierarchy information. For intra-node communication, the model uses... Indicates a concurrent transfer on a shared memory channel. A length of The point-to-point communication time of messages; This indicates the core location where two processes are bound, whether they are in the same NUMA, across NUMA, or both simultaneously. Pick or , This indicates that the underlying system uses MPI_Send and MPI_Recv for communication. This indicates that the underlying system uses MPI_Sendrecv for communication;

[0012] For cross-node communication, the model uses This indicates that processes distributed across two nodes are transmitted concurrently through a network channel. A length of The point-to-point communication time of messages; This indicates the network layers that the two nodes span.

[0013] Preferably, for shared memory communication within a single node, the time required to send and receive messages under different characteristics is measured by changing the message length, the number of concurrent transmissions, the process core binding method, and the point-to-point communication type, thereby obtaining the parameter values ​​under different characteristics;

[0014] For cross-node communication parameters, the time required to send and receive messages under different characteristics is measured by changing the message length, the number of concurrent transmissions, the number of network layers traversed by the communication process, and the point-to-point communication type, thereby obtaining parameter values ​​under different characteristics.

[0015] Preferably, for shared memory communication within a single node, 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 is... , and Point-to-point communication primitives are used respectively or Two kinds;

[0016] For cross-node communication parameters, 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); the number of network layers traversed by the communication process from 0 to k, where k is the platform's network layer number; point-to-point communication primitives are used respectively. or Two types.

[0017] Preferably, the communication behavior of specific set communication algorithms in the MPI source code is analyzed, and combined with the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm, specifically as follows:

[0018] Based on the code logic, the source process IDs and destination process IDs participating in this round of communication are deduced, and the node IDs of the processes are determined by combining the mapping relationship, thereby determining the channel type of each pair of communication.

[0019] If the communication is based on a network channel, the network layer information of the communication nodes needs to be further determined by combining the platform node topology;

[0020] Count the number of concurrent transmissions on the same channel during this round of communication;

[0021] Determine the type of point-to-point communication used in this round of communication based on the code;

[0022] Combining the channel type, message length, number of concurrent transmissions, location information of each pair of communication processes, and point-to-point communication type obtained in the previous step, the time required for each pair of communication in this round is represented by corresponding parameters; the maximum value among all communication times in this round is taken as the estimated time for this round of communication.

[0023] By summing up the communication times of all rounds, the overall communication time of a set of communication operations is expressed using a mathematical formula for parameters.

[0024] Preferably, based on the code, if the point-to-point communication type used in this round of communication is an MPI_Send or MPI_Recv primitive, then subsequent communication will use... The type parameter represents the time cost;

[0025] If it is an MPI_Sendrecv primitive, use Type parameters; at the same time, the message length of this round of communication is determined according to the code logic.

[0026] Preferably, the communication time of all rounds is accumulated, and the overall communication time of a set of communication operations is expressed by a mathematical formula for the parameters. For the binomial broadcast algorithm, the time consumption of the entire communication operation is... Represented as:

[0027]

[0028] in, For the number of processes, This indicates that the algorithm is in the channel. Upper i Round-robin communication model parameters, For message length, For concurrent transmission count, For network hierarchical structure information, This indicates that the underlying layer uses the MPI_Send and MPI_Recv primitives for communication.

[0029] Preferably, the communication time of all rounds is accumulated, and the overall communication time of a set communication operation is expressed by a mathematical formula for the parameters. For the recursive doubling allgather algorithm, the time consumption of the entire communication operation is... Represented as:

[0030]

[0031] in, For the number of processes, This indicates that the algorithm is in the channel. Upper i Round-robin communication model parameters, For message length, For concurrent transmission count, For network hierarchical structure information, This indicates that the underlying layer uses the MPI_Sendrecv primitive for communication.

[0032] Preferably, the communication time of all rounds is accumulated, and the overall communication time of a set communication operation is expressed by a mathematical formula for the parameters. For the ring allgather algorithm, the time consumption of the entire communication operation is... Represented as:

[0033]

[0034] in, For the number of processes, This indicates that the algorithm is in the channel. Upper i Round-robin communication model parameters, For message length, For concurrent transmission count, For network hierarchical structure information, This indicates that the underlying layer uses the MPI_Sendrecv primitive for communication.

[0035] Secondly, embodiments of the present invention provide a multi-node MPI ensemble communication performance modeling system, comprising:

[0036] The parameter module determines the model parameters to be measured based on the multi-core processor information within the node and the platform network hierarchy information.

[0037] The measurement module measures all model parameters. For intra-node shared memory communication, it measures point-to-point communication parameters located in different NUMA domains. For cross-node communication parameters, it measures point-to-point communication parameters located in different network layers.

[0038] The module is constructed to analyze the communication behavior of specific set communication algorithms in the MPI source code. Combined with the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm.

[0039] Thirdly, a computer device includes 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 steps of the above-described multi-node MPI set communication performance modeling method.

[0040] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the above-described multi-node MPI set communication performance modeling method.

[0041] Fifthly, a chip includes 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 steps of the above-described multi-node MPI set communication performance modeling method.

[0042] In a sixth aspect, embodiments of the present invention provide an electronic device, including a computer program, which, when executed by the electronic device, implements the steps of the above-described multi-node MPI set communication performance modeling method.

[0043] Compared with the prior art, the present invention has at least the following beneficial effects:

[0044] A performance modeling method for multi-node MPI ensemble communication is proposed. First, by combining multi-core processor information within nodes and platform network hierarchy information, the model parameters to be measured are determined. Next, the model parameters under different feature combinations are measured. Then, the communication behavior of the ensemble communication algorithm is analyzed. Finally, the overall communication time of the algorithm is expressed using mathematical formulas for the model parameters. By introducing supercomputing network hierarchy information and the type of point-to-point communication primitives used at the bottom layer of the communication algorithm, the application scope of the model is expanded from a single-node shared memory model to a hybrid model of multi-node shared memory and interconnected networks. This allows the model to more accurately predict the communication time of multi-node ensemble communication operations.

[0045] Furthermore, based on the multi-core processor information within the node and the platform network hierarchy information, the maximum number of concurrent parameters to be measured and the maximum number of network layers for cross-node communication are determined. This step enables the model to adapt to different hardware platforms.

[0046] Furthermore, by changing message length, concurrent transmission count, process core binding method, number of cross-node communication network layers, and point-to-point communication type, and measuring point-to-point communication parameters under different feature combinations, the performance of point-to-point communication under different feature combinations can be reflected.

[0047] Furthermore, the message length varies from 1 byte to 1 megabyte, because the parameter value for larger message lengths will exhibit a linear change, which can be deduced from the 1 megabyte parameter; point-to-point communication primitives use or There are two types, which are the underlying communication primitives used by the recursive communication algorithm; the maximum concurrent transmission count for single-node communication is n / 2, where n is the maximum number of cores on a single node, because one communication requires two cores; the process-core binding method within a node is acceptable. , and The number of concurrent transmissions for cross-node communication parameters ranges from 1 to n, where n is the maximum number of cores in a single node; the number of network layers traversed by the communication process ranges from 0 to k, where k is the platform's network layer number, because the communication performance between nodes at different network layers varies significantly.

[0048] Furthermore, the communication behavior of specific set communication algorithms in the MPI source code is analyzed. By simulating the execution process of the communication algorithm, the number of concurrent communications, message length, process core binding method, number of cross-node communication network layers, and point-to-point communication type in each round of communication during the algorithm execution process are obtained, thereby obtaining the communication time formula represented by the model parameters.

[0049] Furthermore, if it is an MPI_Send or MPI_Recv primitive, it will use The type parameter represents the time cost; if it is an MPI_Sendrecv primitive, use... Type parameters; this classification allows for a better differentiation of the performance of different communication primitives.

[0050] It is understandable that the beneficial effects of the second aspect mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0051] In summary, by introducing information about the hierarchical structure of supercomputing networks, the model of this invention can more accurately predict the communication time of multi-node ensemble communication operations.

[0052] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a schematic diagram of the process of the present invention;

[0055] Figure 2 A percentage error plot for the binomial broadcast algorithm in multi-node model prediction;

[0056] Figure 3 A schematic diagram of a computer device provided in an embodiment of the present invention;

[0057] Figure 4 This is a block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0058] The technical solutions of the embodiments of the present 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 the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0060] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0061] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this invention generally indicates that the preceding and following objects have an "or" relationship.

[0062] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.

[0063] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0064] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0065] This invention provides a method for modeling the performance of multi-node MPI ensemble communication. By measuring point-to-point communication parameters under different core-binding methods within a single node and point-to-point communication parameters at different network layers when crossing nodes, the communication time of ensemble communication operations is expressed using mathematical formulas for the parameters, thereby obtaining an ensemble communication performance model. This method, combined with supercomputing network hierarchical structure information, expands the application scope of the model from a single-node shared memory model to a multi-node shared memory and network hybrid model. The model can better predict the communication time of ensemble communication operations in large-scale parallel programs.

[0066] Example 1

[0067] Please see Figure 1 The present invention provides a method for modeling the performance of multi-node MPI ensemble communication, comprising the following steps:

[0068] S1. Based on the multi-core processor information within the node and the platform network hierarchy information, determine the model parameters to be measured; the model parameters are used... express;

[0069] The modeling factors involved include: channel type Message length concurrent transmission count Process-core binding method Network hierarchical structure information Low-level communication types .

[0070] For intra-node communication, the model uses Indicates a concurrent transfer on a shared memory channel. A length of The point-to-point communication time of the message; where, This indicates the core location where the two processes are bound, and they can be located in the same NUMA (Non-NUMA). ), cross NUMA ( ) and the simultaneous existence of two situations ( ); Desirable or : This indicates that the underlying system uses MPI_Send and MPI_Recv for communication. This indicates that the underlying layer uses the MPI_Sendrecv primitive for communication;

[0071] For cross-node communication, the model uses This indicates that processes distributed across two nodes are transmitted concurrently through a network channel. A length of The point-to-point communication time of the message; at this time This indicates the network layers spanned by the two nodes, and its value range depends on the specific number of network layers on the platform. For example... The value ranges from 0 to 3, representing communication within the same blade, across blades, across racks, and across cabinets, respectively.

[0072] S2. Measure all parameters of the model on the given platform;

[0073] For the relevant parameters of intra-node communication, the time required to send and receive messages under different characteristics is measured by changing the message length, concurrent transmission count, process core binding method, and point-to-point communication type, thereby obtaining the parameter values ​​under different characteristics.

[0074] 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 per node; process core binding method is... , and Point-to-point communication primitives are used respectively or Two types.

[0075] For the relevant parameters of inter-node communication, the time required to send and receive messages under different characteristics is measured by changing the message length, the number of concurrent transmissions, the number of network layers crossed by the communication process, and the point-to-point communication type, so as to obtain the parameter values ​​under different characteristics.

[0076] 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); the number of network layers traversed by the communication process from 0 to k, where k is the platform's network layer number; point-to-point communication primitives are used respectively. or Two types.

[0077] S3. Analyze the communication behavior of specific set communication algorithms in the MPI source code, and obtain the communication time formula represented by each parameter by simulating the execution process of the communication algorithm.

[0078] S301. Based on the code logic, calculate the source process number and destination process number of all processes participating in this round of communication, and determine the node number of the process by combining the mapping relationship, and then determine the channel type of each pair of communication.

[0079] S302. If the communication is based on a network channel, the network layer information of the communication node needs to be further determined in conjunction with the platform node topology.

[0080] S303. Count the number of concurrent transmissions on the same channel in this round of communication;

[0081] S304. Determine the point-to-point communication type used in this round of communication based on the code:

[0082] If it is an MPI_Send or MPI_Recv primitive, then it will be used subsequently. The type parameter represents the time cost;

[0083] If it is an MPI_Sendrecv primitive, then use Type parameters; at the same time, the message length of this round of communication is determined according to the code logic.

[0084] S305. Combining the channel type, message length, number of concurrent transmissions, location information of each pair of communication processes, and point-to-point communication type obtained above, the time required for each pair of communication in this round can be represented by corresponding parameters; take the maximum value among all communication times in this round as the estimated time for this round of communication.

[0085] S306. By summing up the communication time of all rounds, the overall communication time of a set communication operation can be expressed by a mathematical formula of parameters.

[0086] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."

[0087] Example 2

[0088] This invention provides a multi-node MPI ensemble communication performance modeling system, which can be used to implement the above-mentioned multi-node MPI ensemble communication performance modeling method. Specifically, the multi-node MPI ensemble communication performance modeling system includes a parameter module, a measurement module, and a construction module.

[0089] The parameter module determines the model parameters to be measured based on the multi-core processor information within the node and the platform network hierarchy information.

[0090] The measurement module measures all model parameters. For intra-node shared memory communication, it measures point-to-point communication parameters located in different NUMA domains. For cross-node communication parameters, it measures point-to-point communication parameters located in different network layers.

[0091] The module is constructed to analyze the communication behavior of specific set communication algorithms in the MPI source code. Combined with the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm.

[0092] Example 3

[0093] This invention provides a terminal device comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used for the operation of a multi-node MPI ensemble communication performance modeling method, including:

[0094] Based on the multi-core processor information within the node and the platform network hierarchy information, the model parameters to be measured are determined. For all the model parameters obtained, for shared memory communication within a single node, the point-to-point communication parameters located on different NUMA domains are measured respectively; for cross-node communication parameters, the point-to-point communication parameters located on different network layers are measured respectively. The communication behavior of specific set communication algorithms in the MPI source code is analyzed, and combined with the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm.

[0095] Please see Figure 3 The terminal device is a computer device. In this embodiment, the computer device 60 includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When executed by the processor 61, the computer program 63 implements the multi-node MPI ensemble communication performance modeling method of this embodiment. To avoid repetition, details are omitted here. Alternatively, when executed by the processor 61, the computer program 63 implements the functions of each model / unit in the multi-node MPI ensemble communication performance modeling system of this embodiment. To avoid repetition, details are omitted here.

[0096] Computer device 60 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 3 This is merely an example of computer device 60 and does not constitute a limitation on computer device 60. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.

[0097] The processor 61 may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0098] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or RAM of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device 60.

[0099] Furthermore, the memory 62 may include both internal storage units of the computer device 60 and external storage devices. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.

[0100] Please see Figure 4 The terminal device is an electronic device 600, which is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0101] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0102] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.

[0103] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0104] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0105] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0106] Example 4

[0107] This invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the terminal device and extended storage media supported by the terminal device; it can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). It should be noted that more specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0108] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium can also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0109] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0110] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the multi-node MPI collection communication performance modeling method in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor in the following steps:

[0111] Based on the multi-core processor information within the node and the platform network hierarchy information, the model parameters to be measured are determined. For all the model parameters obtained, for shared memory communication within a single node, the point-to-point communication parameters located on different NUMA domains are measured respectively; for cross-node communication parameters, the point-to-point communication parameters located on different network layers are measured respectively. The communication behavior of specific set communication algorithms in the MPI source code is analyzed, and combined with the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm.

[0112] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present 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 the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0113] Example 5

[0114] Taking the Tianhe platform with a 4-layer network structure as an example, the steps include:

[0115] S1. Determine the model parameters to be measured based on the multi-core processor information within the node and the platform network hierarchy information;

[0116] For intra-node communication, the model uses Indicates a concurrent transfer on a shared memory channel. A length of The point-to-point communication time of messages. A single node of the Tianhe platform has 16 processor cores, divided into 8 NUMA domains, with 2 processor cores in each NUMA domain. Therefore, the parameters that need to be measured include: point-to-point communication parameters for communication processes located within the same NUMA, across NUMA domains, and both simultaneously, as well as the number of concurrent transmissions. Take 1 to 8;

[0117] For cross-node communication, the model uses This indicates that processes distributed across two nodes are transmitted concurrently through a network channel. A length of The point-to-point communication time of messages. Because the Tianhe platform network has a four-layer structure, it is necessary to measure communication parameters within the same blade, across blades, across racks, and across cabinets, as well as the number of concurrent transmissions. Take numbers from 1 to 16.

[0118] S2. Measure all parameters of the model on the given platform;

[0119] For intra-node communication, the communication processes can be configured to reside in the same NUMA domain, different NUMA domains, or both by binding processes to cores. This is typically controlled via the `--cpu-bind` option of the scheduling system. The number of concurrent communication pairs is controlled by the number of processes started, with the process number varying to a positive even number up to 16. Furthermore, the message length needs to be controlled from 1 byte to 1 MB, and the point-to-point communication primitives should be used accordingly. or Two forms;

[0120] For cross-node communication, communication parameters between nodes located at different network layers are measured. For the Tianhe platform, two nodes need to be applied for separately: one for the same blade, one for a cross-blade, one for a cross-rack, and one for a cross-cabinet, and then measurements are performed on these nodes. The number of processes started simultaneously varies to a positive even number within 32; the message length is controlled from 1 byte to 1M bytes, and point-to-point communication primitives are used respectively. or Two forms.

[0121] S3. Analyze the communication behavior of specific set communication algorithms in the MPI source code, and obtain the communication time formula represented by each parameter by simulating the execution process of the communication algorithm.

[0122] Taking the binomial broadcast algorithm as an example, the algorithm requires P processes to participate. Round-robin communication doubles the number of processes participating in each round, doubles the interval between process numbers, and keeps the message length unchanged. Furthermore, the underlying layer uses... The communication primitives, namely the MPI_Send and MPI_Recv functions, are used for communication. Therefore, the time consumption of the entire communication operation is expressed as:

[0123]

[0124] Among them, channel type c, number of concurrent transmissions and network hierarchical information Further analysis is needed.

[0125] First, based on the code logic, calculate the source process IDs and destination process IDs participating in this round of communication. Combine this with the mapping relationship to determine the node IDs of the processes, and then determine the channel type for each pair of communications. If it is communication based on a network channel, it is necessary to further determine the network layer information of the communication nodes based on the platform node topology, and determine whether the two nodes of the communication processes are located in the same blade, across blades but in the same rack, across racks but in the same cabinet, or across cabinets. Then, count the number of concurrent transmissions on the same channel in this round of communication.

[0126] For the recursive doubling allgather algorithm, the algorithm requires P processes to participate in it. Round-robin communication, where the number of processes participating in each round remains the same, but the length of the messages sent is doubled; and the underlying implementation uses... The communication primitive, namely the MPI_Sendrecv function, is used for communication. Therefore, the time consumption of the entire communication operation is expressed as:

[0127]

[0128] Similarly, channel type c, concurrent transmission count and network hierarchical structure information Further analysis is needed.

[0129] For the ring allgather algorithm, the algorithm requires P processes to participate in it. Round-robin communication maintains a constant number of processes participating in each round, a constant message length, and uses the underlying technology... This is a type of communication primitive. Therefore, the time consumption of the entire communication operation is expressed as:

[0130]

[0131] Similarly, channel type c, concurrent transmission count and network hierarchical structure information Further analysis is needed. Regarding intra-node communication, since this algorithm involves both cross-NUMA domain communication and communication within the same NUMA domain, its characteristics... Should be taken For cross-node communication, the communication cost of each round of this algorithm needs to be the larger value between the communication time within a node and the communication time between nodes.

[0132] Please see Figure 2Experiments were conducted on the Tianjin supercomputing MT-3000 platform with 2, 4, 8, and 16 nodes and 32, 64, 128, and 256 processes using MPICH 4.0.2. The experimental results show that the MAPE of the multi-node binomial broadcasting algorithm is 6.96%, indicating that the modeling method of this invention is effective.

[0133] In summary, the present invention provides a multi-node MPI ensemble communication performance modeling method and system that considers the communication latency differences between nodes located at different network layers and the communication performance differences caused by the type of point-to-point communication primitives used at the bottom layer of the algorithm. The model can more accurately predict the ensemble communication performance across nodes.

[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0135] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0136] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0137] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0138] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0139] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0140] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random-access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0141] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0142] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0143] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0144] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A method for modeling the performance of multi-node MPI ensemble communication, characterized in that, Includes the following steps: Based on the multi-core processor information within the node and the platform network hierarchy information, the model parameters to be measured are determined. For intra-node communication, the model uses... Indicates a concurrent transfer on a shared memory channel. A length of The point-to-point communication time of messages; This indicates the core location where two processes are bound, whether they are in the same NUMA, across NUMA, or both simultaneously. Pick or , This indicates that the underlying system uses MPI_Send and MPI_Recv for communication. This indicates that the underlying system uses MPI_Sendrecv for communication; For cross-node communication, the model uses This indicates that processes distributed across two nodes are transmitted concurrently through a network channel. A length of The point-to-point communication time of messages; Indicates the network layers spanned by the two nodes; All model parameters obtained by measurement are as follows: for single-node shared memory communication, point-to-point communication parameters located on different NUMA domains are measured respectively; for cross-node communication parameters, point-to-point communication parameters located at different network layers are measured respectively; for single-node shared memory communication, the time required to send and receive messages under different characteristics is measured by changing message length, concurrent transmission number, process core binding method and point-to-point communication type, so as to obtain parameter values ​​under different characteristics. For cross-node communication parameters, the time required to send and receive messages under different characteristics is measured by changing message length, concurrent transmission count, number of network layers crossed by the communication process, and point-to-point communication type, thereby obtaining parameter values ​​under different characteristics; For shared memory communication within a single node, the characteristic variations are described as follows: message length from 1 byte to 1MB; concurrent transmission count from 1 to n / 2, where n is the maximum number of cores in a single node; and process core binding method. , and Point-to-point communication primitives are used respectively or Two kinds; For cross-node communication parameters, 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); the number of network layers traversed by the communication process from 0 to k, where k is the platform's network layer number; point-to-point communication primitives are used respectively. or Two kinds; By analyzing the communication behavior of specific set communication algorithms in the MPI source code and combining the obtained model parameters, the communication time formula represented by each model parameter is obtained by simulating the execution process of the communication algorithm. Specifically: Based on the code logic, the source process IDs and destination process IDs participating in this round of communication are deduced, and the node IDs of the processes are determined by combining the mapping relationship, thereby determining the channel type of each pair of communication. If the communication is based on a network channel, the network layer information of the communication nodes needs to be further determined by combining the platform node topology; Count the number of concurrent transmissions on the same channel during this round of communication; Determine the type of point-to-point communication used in this round of communication based on the code; Based on the obtained channel type, message length, number of concurrent transmissions, location information of each pair of communication processes, and point-to-point communication type, the time required for each pair of communication in this round is represented by corresponding parameters; the maximum value among all communication times in this round is taken as the estimated time for this round of communication. The total communication time of a set of communication operations is expressed by a mathematical formula for parameters by summing up the communication time of all rounds. Based on the code, if the point-to-point communication type used in this round of communication is MPI_Send or MPI_Recv primitives, then subsequent communication will use... The type parameter represents the time cost; If it is an MPI_Sendrecv primitive, use Type parameters; at the same time, the message length of this round of communication is determined according to the code logic.

2. The multi-node MPI ensemble communication performance modeling method according to claim 1, characterized in that, By summing up the communication times of all rounds, the overall communication time of a set of communication operations can be expressed using a mathematical formula for the parameters. For the binomial broadcast algorithm, the total communication operation time is... Represented as: in, For the number of processes, This indicates that the algorithm is in the channel. Upper i Round-robin communication model parameters, For message length, For concurrent transmission count, For network hierarchical structure information, This indicates that the underlying layer uses the MPI_Send and MPI_Recv primitives for communication.

3. The multi-node MPI ensemble communication performance modeling method according to claim 1, characterized in that, By summing up the communication times of all rounds, the overall communication time of a set of communication operations can be expressed using a mathematical formula for the parameters. For the recursive doubling allgather algorithm, the total time of the entire communication operation is... Represented as: in, For the number of processes, This indicates that the algorithm is in the channel. Upper i Round-robin communication model parameters, For message length, For concurrent transmission count, For network hierarchical structure information, This indicates that the underlying layer uses the MPI_Sendrecv primitive for communication.

4. The multi-node MPI ensemble communication performance modeling method according to claim 1, characterized in that, By summing the communication times of all rounds, the overall communication time of a set of communication operations is expressed using a mathematical formula for the parameters. For the ringallgather algorithm, the total time of the entire communication operation is... Represented as: in, For the number of processes, This indicates that the algorithm is in the channel. Upper i Round-robin communication model parameters, For message length, For concurrent transmission count, For network hierarchical structure information, This indicates that the underlying layer uses the MPI_Sendrecv primitive for communication.

5. A multi-node MPI ensemble communication performance modeling system, characterized in that, include: The parameter module determines the model parameters to be measured based on the multi-core processor information within the node and the platform network hierarchy information. For intra-node communication, the model uses... Indicates a concurrent transfer on a shared memory channel. A length of The point-to-point communication time of messages; This indicates the core location where two processes are bound, whether they are in the same NUMA, across NUMA, or both simultaneously. Pick or , This indicates that the underlying system uses MPI_Send and MPI_Recv for communication. This indicates that the underlying system uses MPI_Sendrecv for communication; For cross-node communication, the model uses This indicates that processes distributed across two nodes are transmitted concurrently through a network channel. A length of The point-to-point communication time of messages; Indicates the network layers spanned by the two nodes; The measurement module measures all model parameters. For shared memory communication within a single node, it measures point-to-point communication parameters located in different NUMA domains. For cross-node communication parameters, it measures point-to-point communication parameters located in different network layers. For shared memory communication within a single node, it measures the time required to send and receive messages under different characteristics by changing message length, concurrent transmission count, process core binding method, and point-to-point communication type, thereby obtaining parameter values ​​under different characteristics. For cross-node communication parameters, the time required to send and receive messages under different characteristics is measured by changing message length, concurrent transmission count, number of network layers crossed by the communication process, and point-to-point communication type, thereby obtaining parameter values ​​under different characteristics; For shared memory communication within a single node, the characteristic variations are described as follows: message length from 1 byte to 1MB; concurrent transmission count from 1 to n / 2, where n is the maximum number of cores in a single node; and process core binding method. , and Point-to-point communication primitives are used respectively or Two kinds; For cross-node communication parameters, 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); the number of network layers traversed by the communication process from 0 to k, where k is the platform's network layer number; point-to-point communication primitives are used respectively. or Two kinds; The module is constructed to analyze the communication behavior of specific set communication algorithms in the MPI source code. Combined with the obtained model parameters, the execution process of the communication algorithm is simulated to derive the communication time formula represented by each model parameter, specifically: Based on the code logic, the source process IDs and destination process IDs participating in this round of communication are deduced, and the node IDs of the processes are determined by combining the mapping relationship, thereby determining the channel type of each pair of communication. If the communication is based on a network channel, the network layer information of the communication nodes needs to be further determined by combining the platform node topology; Count the number of concurrent transmissions on the same channel during this round of communication; Determine the type of point-to-point communication used in this round of communication based on the code; Based on the obtained channel type, message length, number of concurrent transmissions, location information of each pair of communication processes, and point-to-point communication type, the time required for each pair of communication in this round is represented by corresponding parameters; the maximum value among all communication times in this round is taken as the estimated time for this round of communication. The total communication time of a set of communication operations is expressed by a mathematical formula for parameters by summing up the communication time of all rounds. Based on the code, if the point-to-point communication type used in this round of communication is MPI_Send or MPI_Recv primitives, then subsequent communication will use... The type parameter represents the time cost; If it is an MPI_Sendrecv primitive, use Type parameters; at the same time, the message length of this round of communication is determined according to the code logic.

Citation Information

Patent Citations

  • Heterogeneous perception data partitioning method for super computer data parallel application

    CN112433853A

  • Optimization method, device and equipment of MPI message communication algorithm and readable medium

    CN112738055A