Sparse matrix vector multiplication calculation communication method on depth processor cluster

By adopting CSR-D storage structure and non-blocking communication technology in the deep computing processor cluster, the sparse matrix vector multiplication calculation is optimized, which solves the problem of high communication time cost in the LOBPCG method, significantly improves the computing efficiency, and achieves high-performance Eigenvalue solution.

CN118568401APending Publication Date: 2024-08-30COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410632062.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In deep computing processor clusters, when the LOBPCG method is used to solve sparse matrix eigenvalue problems, sparse matrix vector multiplication calculations involve a large communication time cost, resulting in low computational efficiency, especially in distributed cross-node heterogeneous environments.

Method used

A multi-layer computing communication method is designed to achieve non-blocking communication through the CSR-D storage structure and MPI_Isend(), MPI_Irecv() functions, optimize sparse matrix vector multiplication calculations, reduce communication volume, and between the host side and the device side Perform data overlap processing.

Benefits of technology

The computing efficiency of sparse matrix vector multiplication has been improved. The performance of single-device accelerator card has been increased by 50 times. The computing performance of single-host core has been accelerated by 32 times. The parallel efficiency of traditional standardization technology has been increased by about 30%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568401A
    Figure CN118568401A
Patent Text Reader

Abstract

The invention discloses a sparse matrix vector multiplication calculation communication method on a depth processor cluster, which comprises the following steps of: 1) selecting or building a heterogeneous fusion calculation system, and deploying a depth calculation processor as an accelerator card on each equipment end; 2) dividing the sparse matrix A and the subspace vector x into a plurality of sparse matrix blocks and subspace vector blocks according to a row equipartition mode, and storing the sparse matrix block Ai and the corresponding subspace vector block xi in the ith host end; the host end transmits the received sparse matrix blocks to the equipment ends bound with the host end, and all the equipment ends execute the steps (3)-(4) to complete SPMV calculation; 3) the equipment end I divides the sparse matrix block Ai into a plurality of sparse matrix sub-blocks according to columns; 4) storing xi participating in calculation of the diagonal matrix block Aii locally for direct calculation; xj participating in calculation of the non-diagonal matrix block Aij is stored in non-local processors, and the processors perform data communication to obtain a required vector xj for calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distributed cross-node communication and relates to a sparse matrix-vector multiplication calculation communication method on a deep processor cluster. Background Art

[0002] Solving the problem of obtaining eigenvalues ​​and eigenvectors of large sparse matrices is a core computational problem in many computational sciences and numerical simulations. For example, there are a large number of sparse eigenvalue numerical solutions in electronic structure, material design, simulation, and quantum chemistry calculations. The standard eigenvalue problem for sparse matrices described in this article can be described as follows:

[0003] Ax=μx (1)

[0004] Here the matrix A is a real symmetric positive definite matrix. μ is the eigenvalue and x is the eigenvector.

[0005] Usually, an iterative method is selected to solve the sparse eigenvalue problem for large-scale sparse matrices. The Locally Optimal Block Preconditioned Conjugate Gradient (LOBPCG) method is a subspace iterative method specifically used for solving the eigenvalues ​​of symmetric positive definite matrices, and has advantages in solving large-scale symmetric matrices. The essence of LOBPCG is that it can quickly obtain the minimum (or maximum) eigenvalue through a series of conjugate gradient directions. By combining the block algorithm with various preprocessing techniques and preprocessors, it can show high efficiency on the traditional central processing unit (CPU) architecture, and is often used to solve large-scale symmetric positive definite linear systems.

[0006] With the development of computing clusters, heterogeneous fusion computing architectures that combine host-side central processing units (CPUs) and device-side accelerator cards are more common on computing clusters. Deep-learning computing units (DCUs) are coprocessor products suitable for accelerating computing-intensive tasks and are a type of accelerator card. By distributing computing-intensive tasks to multiple processors for parallel computing, there is a speed advantage over using only the host side for computing. However, for distributed cross-node heterogeneous computing environments, although data distribution to different processors for parallel computing has brought about an increase in computing speed, it has brought about a communication time cost for some units that need to perform global data calculations. In a distributed cross-node heterogeneous environment, the LOBPCG method needs to multiply the sparse matrix A by the generated subspace vector x in the calculation of eigenvalues, that is, Ax=y. New subspace vectors x will be continuously generated during the calculation process of the LOBPCG method, while the sparse matrix A remains unchanged during the solution process.

[0007] In a distributed environment, when using the LOBPCG method to solve the eigenvalues ​​of a sparse matrix A, the distribution of data on each processor is as follows: Figure 1 As shown, Figure 1 It is represented as an 8*8 storage matrix, where the matrix is ​​divided into row blocks and the data is distributed in different processors; P(0), P(1), P(2), etc. represent processors, and 0 to 7 represent row numbers; each processor process only has part of the data of the sparse matrix A and vector x divided by rows. In the sparse matrix-vector multiplication process, Figure 1 For example, processor P(0) has rows 0 and 1 of sparse matrix A and rows 0 and 1 of vector x, processor P(1) has rows 2 and 3 of sparse matrix A and rows 2 and 3 of vector x, etc. In the process of sparse matrix vector multiplication, processor P0 needs to obtain the vector x elements of other processors to complete the complete sparse matrix vector multiplication operation of rows 0 and 1 of sparse matrix A, and write the result into rows 0 and 1 of vector y after the operation is completed. Process 0 (represented by P(0)) needs to receive the vector block x data stored in P(1), P(2), and P(3) to complete the complete sparse matrix vector multiplication calculation of P(0) matrix block, and store the calculation result in vector block y of P(0). When one-to-one binding is adopted between the host side and the device side, the device sides cannot communicate directly with each other. The data of vector x needs to be transferred from the device side to the host side first. After the host side communicates, the required vector x data is obtained and transmitted back to the device side. The device side can then perform calculations and summarize the results and write them into vector y.

[0008] Data communication between the host and device, as well as communication on the host side, is constrained by memory bandwidth limitations and communication costs, resulting in a large amount of communication time cost in implementing sparse matrix-vector multiplication in deep computing processor clusters, which seriously affects computing time and efficiency, making it difficult to efficiently implement the LOBPCG algorithm on deep computing processor clusters. How to quickly perform sparse matrix-vector multiplication has become an important technical issue. Summary of the invention

[0009] In view of the problems existing in the prior art, the purpose of the present invention is to provide a sparse matrix-vector multiplication calculation communication method on a deep computing processor cluster. The environment targeted by the present invention is a deep computing processor cluster including multiple host terminals and device terminals, in which each host terminal of the cluster is connected to a device terminal, the host terminals can communicate with each other, the device terminals can only communicate with the host terminals, and the device terminals cannot communicate directly with each other. The present invention proposes a multi-layer computing communication method with minimal communication volume adapted to a distributed heterogeneous environment for the sparse eigenvalue iteration to solve the local optimal block preconditioned conjugate gradient method in a deep computing processor cluster, and designs a multi-layer computing communication sparse matrix-vector multiplication module with minimal communication volume on a large-scale heterogeneous cluster, which improves the computational efficiency of the existing sparse matrix-vector multiplication standardization method by 30%.

[0010] In order to solve the above technical problems, the technical solution proposed by the present invention includes the following steps:

[0011] A sparse matrix-vector multiplication communication method on a deep processor cluster, the steps comprising:

[0012] 1) Select or build a heterogeneous fusion computing system; the heterogeneous fusion computing system includes multiple host terminals and multiple device terminals, each host terminal is bound to a device terminal, the host terminals are connected to each other, the device terminals are connected to the host terminals to which they are bound, and a deep computing processor is deployed on each device terminal as an accelerator card;

[0013] 2) The sparse matrix A for feature solving using the LOBPCG algorithm and the subspace vector x generated during the LOBPCG algorithm call are divided into multiple sparse matrix blocks and subspace vector blocks by row averaging. i and its corresponding subspace vector block x i Stored to the corresponding i-th host; the i-th host receives the sparse matrix block A i The result vector y is passed to the device I bound to it, and each of the device ends executes steps 3) to 4) to complete the SPMV calculation and obtain the corresponding result vector y i ;

[0014] 3) The device end I receives the sparse matrix block A i Divide into multiple sparse matrix sub-blocks A by column ij ; Sparse matrix sub-block A ij is a sparse matrix block A i The data in the jth column;

[0015] 4) The device end I uses the deployed deep computing processor to perform diagonal sparse matrix sub-block A ii and the subspace vector block x i The calculation is performed directly and stored on the device end I; if the subspace vector block required for the calculation of the non-diagonal sparse matrix sub-block is located on the device end K, the required subspace vector block is obtained through the device end I and the k-th host end bound to the device end K, and the calculation is performed with the corresponding non-diagonal sparse matrix sub-block; and the device end I sends the subspace vector block required for the calculation of other device ends J to the device end J via the device end I and the j-th host end bound to the device end J.

[0016] Furthermore, the sparse matrix block A received by the i-th host i After being converted into a CSR-D storage structure, it is transferred to the device end I bound thereto; the CSR-D storage structure includes a plurality of triplets and 6 arrays for storing data communication information, each of which includes a sparse matrix block A i The array includes: a receiving element array recvcolid, which is used to store the storage position of the data to be received in other processors; a receiving index array recvindex, which is used to store the data row index to be obtained from each other processor; a receiving tag array recvflag, which is used to store whether it is necessary to receive data from other processors; a sending element array sendcolid, which is used to store the storage position of the data to be sent to other processors in this processor; a sending index array sendindex, which is used to store the data row index to be sent to other processors; and a sending tag array sendflag, which is used to store whether it is necessary to send data to other processors.

[0017] Furthermore, the host ends perform non-blocking communication through MPI_Isend() and MPI_Irecv() functions.

[0018] Furthermore, the sparse matrix A is a sparse matrix for solving characteristics in electronic structure, material design, simulation or quantum chemical calculation using LOBPCG algorithm.

[0019] Compared with the prior art, the present invention has the following positive effects:

[0020] 1) The computing performance of a single device-side accelerator card is 50 times higher than that of a single host-side core;

[0021] 2) A single device-side accelerator card can achieve 32 times faster performance than a single 32-core host-side accelerator card;

[0022] 3) Compared with traditional standardized technology, the parallel efficiency is improved by about 30%. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 Figure 1 shows how sparse matrices and vectors are distributed across different processors.

[0024] Figure 2 This is an example diagram of the sparse matrix-vector multiplication calculation process.

[0025] Figure 3 Schematic diagram of the process of calculating communication overlap.

[0026] Figure 4 Schematic diagram of MPI non-blocking communication process.

[0027] Figure 5 To expand the capability comparison chart,

[0028] (a) Scalability results of the new LOBPCG algorithm, (b) scalability results of SLEPc. DETAILED DESCRIPTION

[0029] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.

[0030] The present invention stores the sparse matrix A and the subspace vector x generated in the process of calling the LOBPCG algorithm in the host side in a row-average manner; transmits the data of the host side to the device side; for each sparse matrix block A of the device side i , convert it into the CSR-D storage structure in this patent; execute the sparse matrix vector multiplication SPMV (SParseMatrix-Vector multiplication) data calculation communication overlap parallel implementation method in this patent to complete the SPMV calculation; after the calculation is completed, the calculation result vector y i Stored on the device side; if the host side needs it, the calculated result vector y is transmitted from the device side back to the host side.

[0031] The input of the LOBPCG process is the sparse matrix A to be solved for characteristics in the fields of electronic structure, material design, simulation and quantum chemistry calculation, and a given initial subspace vector x. If the initial subspace vector x is not input, a set of data of the initial subspace vector x is randomly generated. During the solution process, the subspace vector x is continuously iteratively updated until the subspace vector x meets the convergence conditions, and the output is an approximate eigenvector x.

[0032] The present invention firstly needs to create a new data storage structure for the sparse matrix A. In the process of solving the eigenvalue using the LOBPCG algorithm, the sparse matrix A remains unchanged, and only the subspace vector x changes continuously during the iteration process, so the process only needs to be performed once.

[0033] The initial storage method of the sparse matrix A is to divide it into sparse matrix blocks A according to the rows i They are stored in different processors (e.g. P(0) stores the data of the 0th and 1st rows of matrix A, and P(1) stores the data of the 2nd and 3rd rows of matrix A), and the sparse matrix block A i The storage of A adopts a row compression storage structure that takes up less space than the complete storage. The sparse matrix A is accessed through the triple row index, column number and element value. i The present invention further improves the CSR storage structure and proposes a new CSR-D storage structure, which is generated on the host side. The CSR-D format further encapsulates the sparse matrix block A in each process. i communication information to optimize communication during computation.

[0034] like Figure 2 As shown, taking processor P(0) as an example, when the sparse matrix vector multiplication module is called, P(0) needs to receive the elements of the 2nd row vector block x from P(1), the elements of the 4th and 5th row vector block x from P(2), and the elements of the 7th row vector block x from P(3). It needs to send the elements of the 2nd row vector block x to P(2) and the elements of the 1st row vector block x to P(3). The sparse matrix A is divided into sparse matrix blocks A in different processors P(i). i ,exist Figure 2 Each processor P(i) has a unique color identifier. According to the characteristics of sparse matrix-vector multiplication and matrix storage characteristics, in each processor, the calculation data of the diagonal blocks are stored in the local processor, while the calculation data of the non-diagonal blocks are stored in other processors, and data exchange is required. The processor in the present invention refers to a combination of a central processing unit CPU and a deep computing processor DCU; the data communication process is embodied in three processes: copying data from DCU to CPU, communicating data between CPUs, and copying data from CPU to DCU. Both CPU and DCU participate in the data communication.

[0035] In order to store data communication information between different processors, the present invention adds 6 arrays for storing data communication information on the basis of the CSR storage structure, thereby forming a CSR-D data storage structure. The 6 additional arrays are:

[0036] Receive the communication list array:

[0037] Receive element array recvcolid: stores the data to be received in the storage location of other processors, by traversing the sparse matrix A in the local processor i The non-zero columns of are obtained.

[0038] Receive index array recvindex: stores the data row index that needs to be obtained from each other processor. By traversing the sparse matrix A in the local processor i The non-zero columns of are summed up.

[0039] Receive flag array recvflag: stores whether data needs to be received from other processors. "1" indicates that the current processor needs to receive data from other processors, and "0" indicates that the current processor does not need to receive data from other processors.

[0040] Send a mailing list array:

[0041] Sending element array sendcolid: stores the storage location of the data to be sent to other processors in this processor. It is obtained by collecting the receiving element array recvcolid array from other processors.

[0042] Send index array sendindex: stores the data row index that needs to be sent to other processors. It is obtained by collecting and summarizing the received element array recvcolid from other processors.

[0043] Send flag array sendflag: stores whether data needs to be sent to other processors. "1" means the current processor needs to send data to other processors, and "0" means the current processor does not need to send data to other processors.

[0044] Through the CSR-D storage structure, the host-side process can easily obtain the necessary data information participating in the calculation of other processors and communicate when exchanging data, and each two processors only need to communicate with each other once to obtain data information, and the vector elements for data communication are also the vector elements participating in the calculation.

[0045] During the data replication between the host and device and the execution of host communication, the necessity of sending or receiving data for a specific process is determined by the communication arrays recvflag and sendflag, thereby avoiding MPI communication of unnecessary data. In the CSR-D format, the receive communication list array and the send communication list array identify the sparse matrix A ij The non-zero column index involved in the calculation of each sub-block is calculated, and the same column index in the same sub-block is merged. This method ensures that the data sent and received only contains the elements actually involved in the calculation. That is, the communication method with the minimum communication volume proposed in the present invention.

[0046] Next, the second content of the present invention is introduced: a specific calculation and communication method for sparse matrix-vector multiplication.

[0047] Considering a sparse matrix A with a CSR-D data storage structure, the processor Pi stores the sparse matrix blocks A divided evenly by rows. i and vector block x i , and the sparse matrix block A i Further divided into sparse matrix sub-blocks A by column ij . Then the sparse matrix-vector multiplication can be defined as:

[0048]

[0049] When performing sparse matrix-vector multiplication, the diagonal sparse matrix subblock A ii and vector block x i The data is stored in the local processor and can be directly calculated on the device side without any communication. When performing diagonal sparse matrix sub-block calculations on the device side, the host side and the device side communicate with each other according to the data communication information stored in CSR-D. i The necessary data is transferred. When the data is transferred to the host side, non-blocking communication between the host sides is performed through the MPI_Isend() and MPI_Irecv() functions. Once the data transmitted by another processor is received and copied to the device side, the corresponding device-side kernel is started to start the calculation. Taking P(0) as the current process, P(0) process sends data to P(1) process and receives data from P(2) process, and P(0) process has obtained data from P(3) process, the overlap of data calculation and communication is reflected in the following aspects:

[0050] (1) The computation of the diagonal blocks of process P(0) overlaps with the computation and communication of its off-diagonal blocks.

[0051] (2) Overlap between the off-diagonal blocks of data transmitted by process P(0) and the data received from process P(2).

[0052] (3) Host-side data communication between P(0) process and P(1) process and P(2) process, as well as the computation and communication overlap of the data received by P(3) process.

[0053] In addition to designing computational communication overlap, we also achieve minimal communication through the design of the CSR-D data storage format. Therefore, an effective single-time data communication relationship is established between different processes, and each data transmission only transmits necessary data information, effectively improving computational efficiency and reducing communication overhead.

[0054] The communication overlap process is calculated as Figure 3 As shown, the x multiplied by the diagonal matrix block elements in each processor is stored in the local processor. For example, the 0,1 column of P(0) is multiplied by the 0,1 row of x. Therefore, this part can be calculated without communication between processors. At the same time, the device side of each processor can copy the x data required by other processors to the host side, and the host side transfers the data through MPI non-blocking communication. Once the required vector x elements are received, the part of the data can be transferred to the device side, and the device side performs sparse matrix-vector multiplication calculation.

[0055] Taking processors a and b as examples, the specific communication process of sparse matrix-vector multiplication is as follows:

[0056] (1) First, the device side of processors a and b performs sparse matrix-vector multiplication calculations on diagonal blocks by calling the DCU kernel, and at the same time copies the vector x required by other processors to the host side through the hipMemcpy() function.

[0057] (2) When the device side of processor a completes copying the vector x required by processor b to the host side of processor a, MPI asynchronous communication can be performed through the MPI_Isend() function and the MPI_Irecv() function. The host side of processor b receives the vector x data sent by processor a, and then copies the data to the device side b through the hipMemcpy() function. After receiving the data, the device side b calls the DCU kernel for calculation.

[0058] (3) Each processor repeats step (2) and sends data to other processors that need data until each processor obtains the required data.

[0059] This patent solves the unnecessary waiting time in the cross-node heterogeneous sparse matrix-vector multiplication algorithm, reduces the communication volume of data transmission, and thus accelerates the algorithm as a whole. In addition, this distributed heterogeneous communication reduces the amount of data that needs to be communicated through the design of the storage structure, thereby further increasing the parallelism and computing efficiency of the technology. The complete calculation and communication process is as follows:

[0060] (1) Diagonal matrix block calculation;

[0061] (2) The vector x required for the off-diagonal matrix block is copied from the device to the host;

[0062] (3) The host side communicates data through MPI non-blocking communication MPI_Isend() function and MPI_Irecv() function. Each host sends a data sending request to other hosts. When it is found that the request of a host is approved and the data communication is completed, data copying and calculation can be performed, and at the same time, the requests sent by other hosts can continue to be approved for data communication, such as Figure 4 As shown;

[0063] (4) The vector x required for the off-diagonal matrix block is copied from the host to the device;

[0064] (5) The device side calculates the off-diagonal matrix blocks;

[0065] (6) Write the result into vector y.

[0066] In step 3, data communication is performed through MPI non-blocking communication MPI_Isend() function and MPI_Irecv() function. Non-blocking communication can realize concurrent execution of calculation and communication, thereby improving calculation efficiency.

[0067] The present invention utilizes reasonable design calculation and communication process to realize the collaborative work of the host side and the device side, and realizes the following three types of overlap:

[0068] a) Overlap between host-side communication and host-device data transfer;

[0069] b) Overlap between device-side computation and host-device data transfer;

[0070] c) Overlap of host-side communication and device-side computation.

[0071] The present invention is directed to a sparse matrix-vector multiplication optimization algorithm required for iteratively solving a local optimal block preconditioned conjugate gradient method for sparse eigenvalues ​​in a large-scale distributed cross-node environment;

[0072] The present invention is adapted to the distributed heterogeneous environment with the multi-computing communication overlapping technology with the minimum communication volume;

[0073] The present invention proposes a new CSR-D data storage format for distributed cross-node environments;

[0074] The present invention provides the following overlapping processes of computing and communication between the host and device in a distributed cross-node environment:

[0075] ① The calculation of the diagonal matrix block and the data calculation communication of the non-diagonal block overlap;

[0076] ② The communication from the device to the host and the calculation on the device side overlap for non-diagonal matrix blocks;

[0077] ③ Non-diagonal matrix blocks overlap the communication from host to device and the computation on the device;

[0078] ④ The computation on the non-diagonal block device side and the communication between the host side overlap;

[0079] The present invention uses 1, 4, 8, and 16 processes to test a one million-order Laplacian matrix, as shown in Table 1. By comparing the unoptimized sparse matrix-vector multiplication with the optimized minimized communication sparse matrix-vector multiplication, the overall calling time can be improved by more than 2.8 times.

[0080] The focus of the analysis is to compare the execution time of the sparse matrix multiplication device-side calculation calls before and after optimization, and the proportion of the total execution time attributed to the sparse matrix multiplication. Here, "Proportion -1" represents the ratio of the execution time of the optimized sparse matrix multiplication call to the total sparse matrix multiplication execution time, and "Proportion -2" represents the execution time of the unoptimized version. As can be seen from the figure, the time consumption of the technical solution in this patent reduces the SPMV call time compared to the SPMV algorithm that does not minimize the communication volume, which effectively proves the effectiveness of the algorithm proposed in this patent. Among them, the overall call time of the SPMV kernel function can be increased by more than 2.8 times by minimizing the communication volume.

[0081] Table 1 Comparison results between optimized SPMV and unoptimized SPMV

[0082]

[0083] The present invention also compares and analyzes the new LOBPCG algorithm implemented by the sparse matrix vector multiplication method proposed in this patent with the international mainstream eigenvalue solution algorithm library SLEPc. Specifically, the effect of the new LOBPCG algorithm implemented by using 512 acceleration cards can exceed the acceleration effect of SLEPc using 512 host terminals by more than 60 times. The new LOBPCG algorithm implemented by the sparse matrix vector multiplication algorithm proposed in this patent is compared with the international mainstream eigenvalue solution algorithm library SLEPc. The comparison results are shown in Table 2. In addition, the scalability of the new LOBPCG algorithm is better than that of SLEPc. The parallel efficiency of SLEPc decreases after 128 CPUs, but the new LOBPCG algorithm always shows strong scalability, such as Figure 5 shown.

[0084] Table 2 shows the comparison results.

[0085] CPUs / DCUs 4 64 128 256 512 SLEPC 50058.2659 5793.7090 3799.0695 4303.2110 4495.6093 New LOBPCG 1662.8171 182.6484 164.8457 100.3241 71.0466 Speedup 30.1044 31.7205 23.0462 42.8930 63.2769

[0086] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.

Claims

1. A sparse matrix-vector multiplication communication method on a deep processor cluster, the steps comprising: 1) Select or build a heterogeneous fusion computing system; The heterogeneous fusion computing system includes multiple host terminals and multiple device terminals, each host terminal is bound to a device terminal, the host terminals are connected to each other in communication, and the device terminals are connected to the host terminals to which they are bound in communication. A deep computing processor is deployed on each device terminal as an accelerator card; 2) The sparse matrix A for feature solving using the LOBPCG algorithm and the subspace vector x generated during the LOBPCG algorithm call are divided into multiple sparse matrix blocks and subspace vector blocks by row averaging. i and its corresponding subspace vector block x i Stored to the corresponding i-th host; the i-th host receives the sparse matrix block A i The result vector y is passed to the device I bound to it, and each of the device ends executes steps 3) to 4) to complete the SPMV calculation and obtain the corresponding result vector y i ; 3) The device end I receives the sparse matrix block A i Divide into multiple sparse matrix sub-blocks A by column ij ; Sparse matrix sub-block A ij is a sparse matrix block A i The data in the jth column; 4) The device end I uses the deployed deep computing processor to perform diagonal sparse matrix sub-block A ii and the subspace vector block x i Directly calculate and store on the device end I; if the subspace vector block required for the calculation of the non-diagonal sparse matrix sub-block is located on the device end K, the required subspace vector block is obtained through the device end I and the k-th host end bound to the device end K, and the calculation is performed with the corresponding non-diagonal sparse matrix sub-block; And the device end I sends the subspace vector block required for calculation by other device ends J to the device end J via the device end I and the j-th host end bound to the device end J.

2. The method according to claim 1, characterized in that: The sparse matrix block A that the i-th host will receive i After being converted into a CSR-D storage structure, it is passed to the device end I bound to it; The CSR-D storage structure includes a plurality of triplets and six arrays for storing data communication information. Each of the triplets includes a sparse matrix block A i The row index, column number and element value of an element in the array; the array includes: a receiving element array recvcolid, which is used to store the storage location of the data to be received in other processors; The receive index array recvindex is used to store the data row index that needs to be obtained from each other processor; the receive tag array recvflag is used to store whether it is necessary to receive data from other processors; the send element array sendcolid is used to store the storage location of the data that needs to be sent to other processors in this processor; the send index array sendindex is used to store the data row index that needs to be sent to other processors; the send tag array sendflag is used to store whether it is necessary to send data to other processors.

3. The method according to claim 1 or 2, characterized in that: The host ends perform non-blocking communication via MPI_Isend() and MPI_Irecv() functions.

4. The method according to claim 1, characterized in that: The sparse matrix A is a sparse matrix for solving characteristics in electronic structure, material design, simulation or quantum chemical calculation using LOBPCG algorithm.