The present invention implements a high-performance batch parallel
LU decomposition method based on GPU for small and medium-sized dense matrices of a
simulation system. The method includes: S1, calculating the Jacobian matrix of the model unit of the
simulation system at each
time step, and taking these matrices as sub-matrices, and splicing them into a large matrix H; S2, dividing the internal blocks of each sub-matrix, and allocating a GPU thread group to each sub-matrix according to the size of the blocks; S3, the GPU thread group sequentially completes the selection of the main element of all columns in each
diagonal block, the update of the right block of the row where the
diagonal block is located, the exchange of the internal column of the
diagonal block with the main element column, and the update of all the block data below and below the column where the diagonal block is located in a diagonal order from the upper left to the lower right, thereby completing the
LU decomposition of all sub-matrices in the large matrix H. The present invention can increase the performance in an approximately
linear trend as the
batch number increases, and can accelerate the solution speed when implicitly solving a model containing a large batch of small ordinary differential equations, and effectively shorten the
simulation time.