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&#39;m seeing 2 (from -log_summary):<div>
<br></div><div><div>              Matrix     2              2   1634161540     0</div></div><div><br></div><div>Then when using -snes_mf_operator with ilu as the preconditioner I&#39;m actually seeing _3_!</div><div><br></div>
<div>              Matrix     3              3   3080557036     0</div><div><br></div><div>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&#39;ve double checked that we&#39;re not calling MatCreate more than once in our code.  So is this expected behavior or am I doing something wrong somewhere else?  What&#39;s the best way to track this down... maybe print a stack trace inside MatCreate?</div>
<div><br></div><div>Particulars:</div><div>PETSc 3.1-p8 (yes yes old... ;-)</div><div>Using it through libMesh</div><div><br></div><div>Thanks,</div><div>Derek</div>