[petsc-users] Number of Matrices with -snes_mf and -snes_mf_operator

Jed Brown jedbrown at mcs.anl.gov
Thu Mar 1 10:37:14 CST 2012


snes_mf_operator has one MFFD (almost free), your assembled matrix, and the
factored matrix created by the preconditioner.
On Mar 1, 2012 10:16 AM, "Derek Gaston" <friedmud at gmail.com> wrote:

> In trying to track down where all of our memory usage is coming from I
> noticed that PETSc is saying that more matrices than I expect are getting
> created.  For instance, with -snes_mf I would expect to see just one matrix
> (we always create one, even with -snes_mf)... but instead I'm seeing 2
> (from -log_summary):
>
>               Matrix     2              2   1634161540     0
>
> Then when using -snes_mf_operator with ilu as the preconditioner I'm
> actually seeing _3_!
>
>               Matrix     3              3   3080557036     0
>
> As you can see, our matrices are fairly heavy (cubic hermites in 3d have a
> heavy sparsity pattern) so it would be awesome to keep the number of them
> down.  I've double checked that we're not calling MatCreate more than once
> in our code.  So is this expected behavior or am I doing something wrong
> somewhere else?  What's the best way to track this down... maybe print a
> stack trace inside MatCreate?
>
> Particulars:
> PETSc 3.1-p8 (yes yes old... ;-)
> Using it through libMesh
>
> Thanks,
> Derek
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120301/413b18aa/attachment.htm>


More information about the petsc-users mailing list