Before the selected inversion step, the matrix saved in DistSparseMatrix format must first be factorized. In principle, for symmetric matrices, this can be done with any \(LDL^T\) factorization or \(LU\) factorization routines. For unsymmetric matrices, only the latter can be used. In the current version of PEXSI, SuperLU_DIST v3.3 is used for the \(LU\) factorization.
The basic steps for factorization include:
DistSparseMatrix
into the native format (SuperMatrix
in SuperLU_DIST) of the factorization routine.A thin interface for the mpi grid strucutre in SuperLU.
A thin interface for passing parameters to set the SuperLU options.
Convert a distributed sparse matrix in compressed sparse column format into the SuperLU compressed row format. The output is saved in the current SuperLUMatrix.
This routine factorizes the superlu matrix symbolically. Symbolic factorization contains three steps.
This routine is controlled via SuperLUOptions. In particular, the column permutation strategy is controlled by SuperLUOptions::ColPerm. Similarly, the row permutation strategy is controlled by SuperLUOptions::RowPerm.
Performs LU factorization numerically.
In SuperLU_DIST, the same symbolic factorization can be reused for factorizing different matrices. To reuse the symbolic factorization, one should follow the steps below.
(After symbolic factorization)
SuperMatrix
.DistSparseMatrix
into the native format (SuperMatrix
in SuperLU_DIST) of the factorization routine.Releases the data in A but keeps other data, such as LUstruct.
This allows one to perform factorization of matrices of the same pattern, such as the option
fact = SamePattern_SameRowPerm
in SuperLU_DIST.
Distribute redistrbutes the SuperMatrix in parallel so that it is ready for the numerical factorization.