Red Phosphorus
Red Phosphorus

Reputation: 11

Reusing symbolic factorization for sparse non-PSD matrix in matlab

I want to solve a large sparse matrix equation Ax=b in MATLAB many times, where A has the same sparsity pattern but different values each time. A is not positive definite but symmetric here.

The computation takes most of the time in my program, so I hope to accelerate it.

What is the best way to reuse the symbolic factorization in MATLAB?

I heard about several options, but not sure which is the best (or possible) way:

Any help is welcomed! Thank you! :)

Upvotes: 1

Views: 171

Answers (1)

Zohar Levi
Zohar Levi

Reputation: 769

I'm wondering the same thing. So far, I concluded:

https://au.mathworks.com/matlabcentral/answers/497464-symbolic-factorization-of-a-large-sparse-matrix

and I'm using

https://au.mathworks.com/matlabcentral/answers/497401-pardiso-reuse-symbolic-factorization

which is buggy, at least in the matlab interface:

  1. Sometimes, the solution is inaccurate. This could be due to zeros in the init iter that aren't accounted for in the pattern. Also, I'm not sure exactly how does the symbolic factorization works and if it depends on the matrix values. If indeed it doesn't, then to resolve this, I can fill in eps in the Hessian pattern.
  2. Sometimes, there are unexplained crashes.
  3. I still feel (I'm monitoring it) that there are memory leaks even with factoring every time.

I'll try to update if I find something.

Upvotes: 0

Related Questions