[petsc-users] PetscMemoryGetMaximumUsage

Michael Povolotskyi mpovolot at purdue.edu
Mon Jul 8 15:49:42 CDT 2013


On 07/08/2013 04:47 PM, Jed Brown wrote:
> Michael Povolotskyi <mpovolot at purdue.edu> writes:
>
>> Dear Petsc developers and users,
>> is there any example that shows how to use the
>> PetscMemoryGetMaximumUsage function?
> It works like this:
>
>    PetscMemorySetGetMaximumUsage(); // somewhere early in your program, or run with -malloc_log
>
>    // create and destroy some objects
>
>    PetscLogDouble mem;
>    PetscMemoryGetMaximumUsage(&mem);
>
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscMemoryGetMaximumUsage.html
Thank you.
Just to clarify:

PetscMemorySetGetMaximumUsage();

is called only once. Correct?

Michael.



More information about the petsc-users mailing list