Symbolic factorization of a large sparse matrix

조회 수: 5 (최근 30일)
Zohar
Zohar 2019년 12월 19일
편집: Zohar 2025년 2월 15일
I'm solving a series of problems Ax=b, where A changes, but still has the same sparsity pattern. To exploit that, in the initialization, I only perform symbolic factoriazation once.
Currently, I use pardiso:
I was wondering how come matlab doesn't offer something like this, considering that the mldivide (based on Tim Davis's SuiteSparse) is supposed to be the fastest option?

채택된 답변

Zohar
Zohar 2019년 12월 23일
편집: Zohar 2025년 2월 15일
  1. When a symmetric matrix (Hessian) is involved, MA57 is used (ldl), which is faster than suitesparse.
  2. The symbolic factorization is the reordering that produces sparser factors. It's done by default with amd (metis is another option).
More details:
From [Boyd09, app. C.3]:
"For the sparse Cholesky factorization, the re-ordering permutation P is often determined using only sparsity pattern of the matrix A, and not the particular numerical values of the nonzero elements of A. Once P is chosen, we can also determine the sparsity pattern of L without knowing the numerical values of the nonzero entries of A. These two steps combined are called the symbolic factorization of A, and form the first step in a sparse Cholesky factorization. In contrast, the permutation matrices in a sparse LU factorization do depend on the numerical values in A, in addition to its sparsity pattern.
The symbolic factorization is then followed by the numerical factorization, i.e., the calculation of the nonzero elements of L. Software packages for sparse Cholesky factorization often include separate routines for the symbolic and the numerical factorization. This is useful in many applications, because the cost of the symbolic factorization is significant, and often comparable to the numerical factorization."
Watch for the following pitfall: when using analyzePattern (style Eigen Pardiso wrapper), the nonzero pattern needs to be preserved throughout the iterations. Matlab by default (in certain common operations) prunes nonzeros that are numerically zeros thus upsetting the pattern. I used to have unexplained crashes with Pardiso matlab wrapper.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by