A method, device, apparatus and readable medium for determining optimal process mapping

By establishing a set of process decomposition combinations and calculating the grid size deviation value and judgment coefficient, the error problem in the ocean model POP performance modeling analysis is solved, the optimal process mapping on different hardware platforms is achieved, and the accuracy of performance prediction is improved. accuracy.

CN114924883BActive Publication Date: 2024-10-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210605732.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2024-10-15
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

In the performance modeling analysis of ocean mode POP, the existing technology has large errors and fails to effectively consider the hardware platform. As a result, the performance error of a single ocean mode is about 6.5%, making it difficult to quickly find the optimal process mapping solution to improve performance.

Method used

By obtaining the resolution of the calculation example and the number of cores of the hardware platform, a set of multiple process decomposition combinations is established, the grid size deviation value and the judgment coefficient are calculated, and the element is determined whether it is the optimal process mapping of the POP mode, and the POP mode is judged in advance. The performance does not need to consider the communication and calculation of the mode itself.

Benefits of technology

It realizes the quick acquisition of the optimal process mapping of the ocean module POP on different hardware platforms, reduces the performance error, and improves the accuracy of performance prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114924883B_ABST
    Figure CN114924883B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and readable medium for determining the optimal process mapping of the POP mode, the method comprising: obtaining parameters of different process numbers and corresponding grid block sizes, and establishing a set of multiple process decomposition combinations based on the parameters of different process numbers and corresponding grid block sizes; calculating the grid size deviation value of each set based on the parameters of each grid block size in the set, and selecting elements in the set corresponding to a grid size deviation value of 0 to form a first subset; calculating a judgment coefficient based on the number of cores of each node and the different number of processes in the set, and selecting elements in the set corresponding to an integer judgment coefficient to form a second subset; determining whether the parameter corresponding to the element is the optimal process mapping of the POP mode according to the relationship between each element in the set and the first subset and the second subset. By using the solution of the present invention, the performance of the POP mode can be judged in advance without considering the communication and calculation of the mode itself.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more specifically to a method, apparatus, device and readable medium for determining an optimal process mapping of a POP mode. Background Art

[0002] When running the CCSM (Community Climate System Model) coupled mode or the POP mode alone on the server, how to quickly find an optimal process mapping solution to quickly improve application performance is the focus of application performance optimization.

[0003] When the current technical solution performs performance modeling analysis on the ocean mode POP, the computational characteristics of the ocean mode POP are divided into two parts: barotropic and baroclinic. Barotropic is a two-dimensional calculation that describes the pressure on the ocean surface. The conjugate gradient method is used to solve a large-scale sparse linear equation system. The solution process is mainly based on BLAS1 operations and matrix-vector multiplication. There are a large number of neighbor communications and MPI_Allreduce global communications in each iteration process. Therefore, the performance of the barotropic part is mainly reflected in the communication consumption; the baroclinic part is to solve the three-dimensional fluid equation, which is solved using the explicit frog leaping integral method. This part is computationally intensive and has a small amount of neighbor communications, that is, the baroclinic part is mainly based on calculation. Then, the barotropic part and the baroclinic part are respectively modeled for performance according to the operation characteristics of communication and calculation. In the existing technical solution, the performance prediction under different process conditions is mainly carried out by giving the number of processes P and examples. The performance model is very complex, and the performance model mainly predicts the performance of other processes based on the known process performance. First, a performance benchmark needs to be obtained through the operation mode, that is, T_colum and T_unit are obtained, before the next step of calculation can be carried out. Secondly, the model does not take into account the current hardware platform. In addition, the model obtained by using this model analysis has a large error, and the performance error of the single ocean mode is about 6.5%. Summary of the invention

[0004] In view of this, the purpose of an embodiment of the present invention is to propose a method, device, equipment and readable medium for determining the optimal process mapping of the POP mode. By using the technical solution of the present invention, the performance of the POP mode can be judged in advance without considering the communication and calculation of the mode itself.

[0005] Based on the above purpose, according to one aspect of the present invention, a method for determining an optimal process mapping of a POP mode is provided, comprising the following steps:

[0006] Obtaining the resolution of the example and the number of cores of each node of the hardware platform, and obtaining different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establishing a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters;

[0007] Calculate the grid size deviation value of each set based on the parameters of each grid block size in the set, and select the elements in the set corresponding to the grid size deviation value of 0 to form a first subset;

[0008] The judgment coefficient is calculated based on the number of cores of each node and the number of different processes in the set, and the elements in the set corresponding to the judgment coefficient being an integer are selected to form a second subset;

[0009] According to the relationship between each element in the set and the first subset and the second subset, it is determined whether the parameter corresponding to the element is the optimal process mapping of the POP mode.

[0010] According to an embodiment of the present invention, calculating the grid size deviation value of each set based on the parameter of each grid block size in the set, and selecting elements in the set corresponding to the grid size deviation value of 0 to form a first subset includes:

[0011] According to the formula S n =(bx n -by n ) 2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the collection;

[0012] The calculated result is S n The elements in the set corresponding to the value of 0 constitute the first subset.

[0013] According to an embodiment of the present invention, calculating the judgment coefficient based on the number of cores of each node and the number of different processes in the set, and selecting elements in the set corresponding to the judgment coefficient being an integer to form a second subset includes:

[0014] According to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node;

[0015] The calculated result is h n The elements in the set corresponding to the integer values ​​constitute the second subset.

[0016] According to an embodiment of the present invention, determining whether a parameter corresponding to each element in the set is an optimal process mapping of the POP mode according to a relationship between the first subset and the second subset includes:

[0017] In response to the element belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is an optimal process mapping corresponding to the current hardware platform;

[0018] In response to the element belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is an optimal process mapping, but has poor performance on the current hardware platform;

[0019] In response to the element not belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is suitable for the current hardware platform but is not an optimal process mapping;

[0020] In response to the element not belonging to the first subset and the element not belonging to the second subset, it is determined that the parameter corresponding to the element is not suitable for the current hardware platform and is not an optimal process mapping.

[0021] According to another aspect of the present invention, there is also provided a device for determining an optimal process mapping of a POP mode, the device comprising:

[0022] An acquisition module, the acquisition module is configured to acquire a resolution of the example and the number of cores of each node of the hardware platform, and acquire different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establish a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters;

[0023] A calculation module, the calculation module is configured to calculate the grid size deviation value of each set based on the parameters of each grid block size in the set, and select elements in the set corresponding to the grid size deviation value of 0 to form a first subset;

[0024] Establish a module, wherein the establishment module is configured to calculate a judgment coefficient based on the number of cores of each node and the number of different processes in the set, and select elements in the set corresponding to the judgment coefficient being an integer to form a second subset;

[0025] The determination module is configured to determine whether the parameter corresponding to each element in the set is the optimal process mapping of the POP mode according to the relationship between the first subset and the second subset.

[0026] According to one embodiment of the present invention, the computing module is further configured to:

[0027] According to the formula S n =(bx n -by n )2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the collection;

[0028] The calculated result is S n The elements in the set corresponding to the value of 0 constitute the first subset.

[0029] According to one embodiment of the present invention, the establishment module is further configured to:

[0030] According to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node;

[0031] The calculated result is h n The elements in the set corresponding to the integer values ​​constitute the second subset.

[0032] According to one embodiment of the present invention, the determination module is further configured to:

[0033] In response to the element belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is an optimal process mapping corresponding to the current hardware platform;

[0034] In response to the element belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is an optimal process mapping, but has poor performance on the current hardware platform;

[0035] In response to the element not belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is suitable for the current hardware platform but is not an optimal process mapping;

[0036] In response to the element not belonging to the first subset and the element not belonging to the second subset, it is determined that the parameter corresponding to the element is not suitable for the current hardware platform and is not an optimal process mapping.

[0037] Another aspect of the embodiments of the present invention further provides a computer device, the computer device comprising:

[0038] at least one processor; and

[0039] The memory stores computer instructions executable on the processor, and the instructions implement the steps of any one of the above methods when executed by the processor.

[0040] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0041] The present invention has the following beneficial technical effects: the method for determining the optimal process mapping of the POP mode provided by the embodiment of the present invention obtains the resolution of the example and the number of cores of each node of the hardware platform, and obtains different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establishes a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters; calculates the grid size deviation value of each set based on the parameter of each grid block size in the set, and selects the elements in the set corresponding to the grid size deviation value of 0 to form a first subset; calculates the judgment coefficient based on the number of cores of each node and the different number of processes in the set, and selects the elements in the set corresponding to the judgment coefficient as an integer to form a second subset; the technical solution of determining whether the parameter corresponding to each element in the set is the optimal process mapping of the POP mode according to the relationship between each element in the set and the first subset and the second subset can judge the performance of the POP mode in advance without considering the communication and calculation of the mode itself. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic flow chart of a method for determining an optimal process mapping of a POP mode according to an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of an apparatus for determining an optimal process mapping of a POP mode according to an embodiment of the present invention;

[0045] Figure 3 is a schematic diagram of a computer device according to an embodiment of the present invention;

[0046] Figure 4 FIG. 1 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0048] Based on the above objectives, a first aspect of an embodiment of the present invention provides an embodiment of a method for determining an optimal process mapping of a POP mode. Figure 1 Shown is a schematic flow chart of the method.

[0049] like Figure 1 As shown in , the method may include the following steps:

[0050] S1 obtains the resolution of the example and the number of cores of each node of the hardware platform, obtains different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establishes a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters.

[0051] First, obtain the resolution of the example and the number of cores per node (P). Then, according to the resolution of the example, obtain the optimal process decomposition information recommended by the model from the pop_decomp.xml file. The number of meridional grids can be obtained according to the resolution ( ), the number of latitudinal grids ( ) and a series of process decomposition combinations, including: different numbers of processes ( ), the corresponding grid block size ( , ) and the mesh decomposition type ( ). For a specific example, and is a fixed quantity, Determined by the pop_decomp.xml file, we define a collection , where x1, x2, x n Each is an element in the set, and each element corresponds to different parameters, that is, each Corresponding to a specific ,Right now:

[0052]

[0053]

[0054] …

[0055] .

[0056] S2 calculates the grid size deviation value of each set based on the parameters of each grid block size in the set, and selects elements in the set corresponding to the grid size deviation value of 0 to form a first subset.

[0057] According to the grid block size and Parameters are used to judge Each quantity in is calculated according to the following formula 、 、…, , where s n For x n The grid size deviation value corresponding to the parameter in .

[0058]

[0059]

[0060] …

[0061]

[0062] After calculation, 、 、…, The value of 0 is selected, assuming that the corresponding The values ​​are , here 、 、…, ∈[1, ] From this we can get The corresponding process ( ).

[0063] for 、 、…, Take the value that is not equal to 0 and calculate the β value. , where β represents the offset. The closer β is to 1, the better the performance is, and the larger β is, the worse the performance is.

[0064] S3 calculates the judgment coefficient based on the number of cores of each node and the number of different processes in the set, and selects the elements in the set corresponding to the judgment coefficient being an integer to form a second subset.

[0065] The judgment coefficient h corresponding to each element is calculated according to the number of processes (N) of each element in the set and the number of cores (P) corresponding to each computing node of the hardware platform. The formula is as follows:

[0066]

[0067]

[0068] …

[0069]

[0070] Bundle 、 、…, The number of processes whose value is an integer Select it, assuming the corresponding The values ​​are , here 、 、…, ∈[1,n] .

[0071] S4 determines whether the parameter corresponding to each element in the set is an optimal process mapping of the POP mode according to the relationship between the first subset and the second subset.

[0072] According to the two subsets obtained above, 、 、…, Make a classification, The value in is used to judge:

[0073] when and When The corresponding It is the optimal process mapping method corresponding to the current hardware platform.

[0074] when and When The corresponding It is the optimal process mapping method, but the effect is slightly poor on the current hardware platform. It can be used.

[0075] when and When The corresponding Although it is suitable for the current hardware platform, it is not the optimal process mapping method and the effect is slightly worse. Value is , The larger the size, the worse the performance.

[0076] when and When The corresponding It is neither suitable for the current hardware platform nor the optimal process mapping method, and its performance is poor. Value is , The larger the value, the worse the performance. Finally, we can determine the optimal process mapping based on the output results. The main technical problem to be solved by the present invention is to establish a method for determining the optimal process mapping, which does not consider the calculation and communication time. When a calculation example is given, only the hardware platform and the number of processes are considered to quickly obtain the optimal process mapping of the ocean module POP on different hardware platforms. The method of the present invention can be used to determine the optimal process mapping when using the ocean module POP.

[0077] Through the technical solution of the present invention, the performance of the POP mode can be judged in advance without considering the communication and calculation of the mode itself.

[0078] In a preferred embodiment of the present invention, the grid size deviation value of each set is calculated based on the parameter of each grid block size in the set, and the elements in the set corresponding to the grid size deviation value of 0 are selected to form a first subset, including:

[0079] According to the formula S n =(bx n -by n ) 2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the collection;

[0080] The calculated result is S n The elements in the set corresponding to the value of 0 form the first subset. and Parameters are used to judge Each quantity in is calculated according to the following formula 、 、…, , where s n For x n The grid size deviation value corresponding to the parameter in .

[0081]

[0082]

[0083] …

[0084]

[0085] After calculation, 、 、…, The value of 0 is selected, assuming that the corresponding The values ​​are , here 、 、…, ∈[1, ] From this we can get The corresponding process ( ).in constitutes the first subset.

[0086] for 、 、…, Take the value that is not equal to 0 and calculate the β value. , where β represents the offset. The closer β is to 1, the better the performance is, and the larger β is, the worse the performance is.

[0087] In a preferred embodiment of the present invention, the judgment coefficient is calculated based on the number of cores of each node and the number of different processes in the set, and the elements in the set corresponding to the judgment coefficient being an integer are selected to form the second subset, including:

[0088] According to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node;

[0089] The calculated result is h n The elements in the set corresponding to the integer value of form the second subset. The judgment coefficient h corresponding to each element is calculated according to the number of processes (N) of each element in the set and the number of cores (P) corresponding to each computing node of the hardware platform. The formula is as follows:

[0090]

[0091]

[0092] …

[0093]

[0094] Bundle 、 、…, The number of processes whose value is an integer Select it, assuming the corresponding The values ​​are , here 、 、…, ∈[1,n] .in The second subset

[0095] In a preferred embodiment of the present invention, determining whether a parameter corresponding to each element in the set is an optimal process mapping of the POP mode according to the relationship between the first subset and the second subset includes:

[0096] In response to the element belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is an optimal process mapping corresponding to the current hardware platform;

[0097] In response to the element belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is an optimal process mapping, but has poor performance on the current hardware platform;

[0098] In response to the element not belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is suitable for the current hardware platform but is not an optimal process mapping;

[0099] In response to the element not belonging to the first subset and the element not belonging to the second subset, it is determined that the parameter corresponding to the element is not suitable for the current hardware platform and is not an optimal process mapping.

[0100] The technical solution of the present invention only needs to know the number of CPU cores P corresponding to the computing node on a specific hardware platform to obtain the current optimal process mapping combination and judge the performance of the mode in advance without considering too much communication and calculation of the mode itself.

[0101] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM). The above-mentioned computer program embodiment can achieve the same or similar effect as any of the above-mentioned method embodiments corresponding thereto.

[0102] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0103] Based on the above purpose, a second aspect of an embodiment of the present invention provides a device for determining an optimal process mapping of a POP mode, such as Figure 2 As shown, the device 200 includes:

[0104] An acquisition module, the acquisition module is configured to acquire a resolution of the example and the number of cores of each node of the hardware platform, and acquire different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establish a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters;

[0105] A calculation module, the calculation module is configured to calculate the grid size deviation value of each set based on the parameters of each grid block size in the set, and select elements in the set corresponding to the grid size deviation value of 0 to form a first subset;

[0106] Establish a module, wherein the establishment module is configured to calculate a judgment coefficient based on the number of cores of each node and the number of different processes in the set, and select elements in the set corresponding to the judgment coefficient being an integer to form a second subset;

[0107] The determination module is configured to determine whether the parameter corresponding to each element in the set is the optimal process mapping of the POP mode according to the relationship between the first subset and the second subset.

[0108] In a preferred embodiment of the present invention, the calculation module is further configured to:

[0109] According to the formula S n =(bx n -by n ) 2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the collection;

[0110] The calculated result is S n The elements in the set corresponding to the value of 0 constitute the first subset.

[0111] In a preferred embodiment of the present invention, the establishment module is further configured to:

[0112] According to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node;

[0113] The calculated result is h n The elements in the set corresponding to the integer values ​​constitute the second subset.

[0114] In a preferred embodiment of the present invention, the determination module is further configured to:

[0115] In response to the element belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is an optimal process mapping corresponding to the current hardware platform;

[0116] In response to the element belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is an optimal process mapping, but has poor performance on the current hardware platform;

[0117] In response to the element not belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is suitable for the current hardware platform but is not an optimal process mapping;

[0118] In response to the element not belonging to the first subset and the element not belonging to the second subset, it is determined that the parameter corresponding to the element is not suitable for the current hardware platform and is not an optimal process mapping.

[0119] Based on the above purpose, a third aspect of an embodiment of the present invention provides a computer device. Figure 3 FIG. 2 is a schematic diagram of an embodiment of a computer device provided by the present invention. Figure 3 As shown, the embodiment of the present invention includes the following apparatus: at least one processor S21; and a memory S22, the memory S22 stores computer instructions S23 that can be run on the processor, and when the instructions are executed by the processor, the following method is implemented:

[0120] Obtaining the resolution of the example and the number of cores of each node of the hardware platform, and obtaining different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establishing a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters;

[0121] Calculate the grid size deviation value of each set based on the parameters of each grid block size in the set, and select the elements in the set corresponding to the grid size deviation value of 0 to form a first subset;

[0122] The judgment coefficient is calculated based on the number of cores of each node and the number of different processes in the set, and the elements in the set corresponding to the judgment coefficient being an integer are selected to form a second subset;

[0123] According to the relationship between each element in the set and the first subset and the second subset, it is determined whether the parameter corresponding to the element is the optimal process mapping of the POP mode.

[0124] In a preferred embodiment of the present invention, the grid size deviation value of each set is calculated based on the parameter of each grid block size in the set, and the elements in the set corresponding to the grid size deviation value of 0 are selected to form a first subset, including:

[0125] According to the formula S n =(bx n -by n ) 2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the collection;

[0126] The calculated result is S n The elements in the set corresponding to the value of 0 constitute the first subset.

[0127] In a preferred embodiment of the present invention, the judgment coefficient is calculated based on the number of cores of each node and the number of different processes in the set, and the elements in the set corresponding to the judgment coefficient being an integer are selected to form the second subset, including:

[0128] According to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node;

[0129] The calculated result is h n The elements in the set corresponding to the integer values ​​constitute the second subset.

[0130] In a preferred embodiment of the present invention, determining whether a parameter corresponding to each element in the set is an optimal process mapping of the POP mode according to the relationship between the first subset and the second subset includes:

[0131] In response to the element belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is an optimal process mapping corresponding to the current hardware platform;

[0132] In response to the element belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is an optimal process mapping, but has poor performance on the current hardware platform;

[0133] In response to the element not belonging to the first subset and the element belonging to the second subset, determining that a parameter corresponding to the element is suitable for the current hardware platform but is not an optimal process mapping;

[0134] In response to the element not belonging to the first subset and the element not belonging to the second subset, it is determined that the parameter corresponding to the element is not suitable for the current hardware platform and is not an optimal process mapping.

[0135] Based on the above purpose, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium. Figure 4 FIG. 2 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 4 As shown, the computer-readable storage medium S31 stores a computer program S32 that performs the above method when executed by a processor.

[0136] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0137] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.

[0138] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0139] In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted through a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, which include any media that facilitate the transfer of computer programs from one location to another. The storage medium may be any available medium that can be accessed by a general or special-purpose computer. As an example and not by way of limitation, the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of instructions or data structures and can be accessed by a general or special-purpose computer or a general or special-purpose processor. In addition, any connection may be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves are used to send software from a website, server, or other remote source, the above-mentioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0140] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0141] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0142] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0143] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0144] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A method for determining an optimal process mapping for a POP mode, characterized in that: The following steps are involved: Obtaining the resolution of the example and the number of cores of each node of the hardware platform, and obtaining different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the example, and establishing a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters; Calculate the grid size deviation value of each set based on the parameters of each grid block size in the set, and select the elements in the set corresponding to the grid size deviation value of 0 to form a first subset; The judgment coefficient is calculated based on the number of cores of each node and the number of different processes in the set, and the elements in the set corresponding to the judgment coefficient being an integer are selected to form a second subset; Determine whether the parameter corresponding to each element in the set is an optimal process mapping of the POP mode according to the relationship between the first subset and the second subset; The grid size deviation value of each set is calculated based on the parameter of each grid block size in the set, and the elements in the set corresponding to the grid size deviation value of 0 are selected to form the first subset, including: according to formula S n =(bx n -by n ) 2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the set; n The elements in the set corresponding to the value of 0 constitute the first subset; The judgment coefficient is calculated based on the number of cores of each node and the number of different processes in the set, and the elements in the set corresponding to the judgment coefficient being an integer are selected to form the second subset, including: according to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node; h in the calculation result is n The elements in the set corresponding to the value of integer form the second subset; Determining whether the parameter corresponding to the element is the optimal process mapping of the POP mode according to the relationship between each element in the set and the first subset and the second subset includes: in response to the element belonging to the first subset and the element belonging to the second subset, determining that the parameter corresponding to the element is the optimal process mapping corresponding to the current hardware platform; in response to the element belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is the optimal process mapping, but the effect is poor on the current hardware platform; in response to the element not belonging to the first subset and the element belonging to the second subset, determining that the parameter corresponding to the element is suitable for the current hardware platform but not the optimal process mapping; in response to the element not belonging to the first subset and the element not belonging to the second subset, determining that the parameter corresponding to the element is not suitable for the current hardware platform and is not the optimal process mapping.

2. A device for determining an optimal process mapping for a POP mode, characterized in that: The device comprises: An acquisition module, wherein the acquisition module is configured to acquire a resolution of a calculation example and a number of cores of each node of a hardware platform, and acquire different process numbers and corresponding grid block size parameters from a preset file based on the resolution of the calculation example, and establish a set of multiple process decomposition combinations based on the different process numbers and corresponding grid block size parameters; A calculation module, wherein the calculation module is configured to calculate a grid size deviation value of each set based on a parameter of each grid block size in the set, and select elements in the set corresponding to a grid size deviation value of 0 to form a first subset; An establishment module is configured to calculate a judgment coefficient based on the number of cores of each node and the number of different processes in the set, and select elements in the set corresponding to the judgment coefficient being an integer to form a second subset; A determination module, wherein the determination module is configured to determine whether a parameter corresponding to each element in the set is an optimal process mapping of the POP mode according to a relationship between the first subset and the second subset; Wherein, the calculation module is further configured as follows: according to formula S n =(bx n -by n ) 2 Calculate the grid size deviation value, where S n is the grid size deviation value corresponding to the nth element in the set, bx n and by n is the parameter of the grid block size corresponding to the nth element in the set; n The elements in the set corresponding to the value of 0 constitute the first subset; The establishment module is also configured to: according to the formula h n =N n / P calculates the judgment coefficient corresponding to each element in the set, where h n is the judgment coefficient corresponding to the nth element in the set, N n is the number of processes corresponding to the nth element in the set, and P is the number of cores of each node; h in the calculation result is n The elements in the set corresponding to the value of integer form the second subset; The determination module is further configured to: in response to the element belonging to the first subset and the element belonging to the second subset, determine that the parameter corresponding to the element is the optimal process mapping corresponding to the current hardware platform; in response to the element belonging to the first subset and the element not belonging to the second subset, determine that the parameter corresponding to the element is the optimal process mapping, but the effect is poor on the current hardware platform; in response to the element not belonging to the first subset and the element belonging to the second subset, determine that the parameter corresponding to the element is suitable for the current hardware platform but not the optimal process mapping; in response to the element not belonging to the first subset and the element not belonging to the second subset, determine that the parameter corresponding to the element is not suitable for the current hardware platform and is not the optimal process mapping.

3. A computer device, characterized in that: include: at least one processor; as well as A memory storing computer instructions executable on the processor, wherein the instructions implement the steps of the method according to claim 1 when executed by the processor.

4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.