[petsc-users] Yet another inversion question

Jed Brown jed at 59A2.org
Sun May 2 14:36:40 CDT 2010


On Sun, 2 May 2010 14:10:35 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
>     Perhaps. But the current get column code is terribly inefficient.
>
>     So is the issue that MatMatSolve(A,B,X) requires TWO dense
> matrices B and X, instead of just one and that is too much memory?
> 
>     Perhaps we could modify MatMatSolve(A,B,X) to allow an in-place
> version (i.e. B == X) that uses only 1 or several work vectors then
> you no longer have this memory issue? Should I add this?

It would be easy to make MatGetColumnVector faster (use better than
linear search, maybe specialize for AIJ).  If it's really important to
make this fast then MatMatSolve for sparse B might make sense, but I
think it's well worth benchmarking first because I'm not convinced that
MatGetColumnVector will take a significant amount of the time (at least
after easy speedups) compared to the solves.

SuperLU_Dist (and maybe other direct solvers?) have a MatMatSolve API,
if this indicates that it actually solves multiple systems at once, then
the performance difference over solving lots of single-vector systems
might make specializing worthwhile.

But the purist in me still thinks the solution is to provide support for
doing whatever users want to do with these resulting matrices (or just
document as the use cases come up).

Jed


More information about the petsc-users mailing list