memory reporting question

Matthew Knepley knepley at
Thu Sep 17 18:23:28 CDT 2009

On Thu, Sep 17, 2009 at 6:04 PM, Matt Funk <mafunk at> wrote:

> Hi,
> I am wondering whether the -memory_info option and the
> PetscMemoryGetMaximumUsage<>()
> call report different things.
> The reason i am asking is because i call the PetscMemoryGetCurrentUsage fcn
> in my code and it shows:
> 5.25558e+08.

This call get_rusage(), so it gives you the entire process size.

> At the end of the run the -memory_info option reports:
> max process malloc()'ed: 4.00524e+08

This is a sampling of rusage every time an object is destroyed.

> max petsc malloc()'ed: 1.15254e+08.

This is all the memory malloced using PetscMalloc() summed.


> So i am a little confused by those numbers unless the fcn call is the more
> complete picture (as said on the manual page)
> I guess then my question is whether the -memory_info corresponds to the
> PetscMalloc* fcns?
> thanks
> matt

What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list