<div class="gmail_quote">On Tue, May 31, 2011 at 09:44, Thomas Witkowski <span dir="ltr"><<a href="mailto:thomas.witkowski@tu-dresden.de">thomas.witkowski@tu-dresden.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Is there a simple way to get the amount of memory that was allocated for a specific matrix?</blockquote></div><div><br></div>If complied --with-log=1 (the default), then<div><br><div>PetscLogDouble allocated = ((PetscObject)mat)->mem;</div>
<div><br></div><div>will give you the total amount of memory that was logged as being allocated for the matrix. This is not necessarily everything, and I don't know if reallocation (if you didn't preallocate correctly) is logged consistently.</div>
</div>