[petsc-users] Memory logging in fortran

Barry Smith bsmith at mcs.anl.gov
Wed May 22 18:39:46 CDT 2013


   Colin,

    PetscMemoryGetCurrentUsage() and MaximumUsage() us calls to the underlying operating system to get how much memory the process is using, as such they will also include external package memory. Unfortunately it depends on the operating system providing this information and often it does not, this is why you get 0. If you are a hacker you could look at the source for PetscMemoryGetCurrentUsage() and see how to get the information for your OS and add it to this routine.

   Barry



On May 22, 2013, at 6:31 PM, Colin McAuliffe <cjm2176 at columbia.edu> wrote:

> Hi all,
> 
> When calling PetscMemoryGetCurrentUsage or PetscMemoryGetMaximumUsage in a fortran code the memory usage returned is always zero. Adding command line options such as -malloc_log and -memory_info doesn't change this result. Is there something else I'm missing? Also, will use of these two functions give memory used by external packaged called by petsc?
> 
> All the best,
> Colin
> 
> -- 
> Colin McAuliffe
> PhD Candidate
> Columbia University
> Department of Civil Engineering and Engineering Mechanics



More information about the petsc-users mailing list