petsc-3.13.6 2020-09-29
Report Typos and Errors

PetscMemoryGetCurrentUsage

Returns the current resident set size (memory used) for the program.

Synopsis

#include "petscsys.h" 
PetscErrorCode  PetscMemoryGetCurrentUsage(PetscLogDouble *mem)
Not Collective

Output Parameter

mem -memory usage in bytes

Options Database Key

-memory_view - Print memory usage at end of run
-malloc_log - Activate logging of memory usage

Notes

The memory usage reported here includes all Fortran arrays (that may be used in Section 1.5 Writing Application Codes with PETSc-defined sections of code). This routine thus provides a more complete picture of memory usage than PetscMallocGetCurrentUsage() for codes that employ Fortran with hardwired arrays.

See Also

PetscMallocGetMaximumUsage(), PetscMemoryGetMaximumUsage(), PetscMallocGetCurrentUsage(), PetscMemorySetGetMaximumUsage(), PetscMemoryView()

Level

intermediate

Location

src/sys/memory/mem.c

Examples

src/ts/tutorials/ex11.c.html

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages