IBAMR  IBAMR version 0.19.
Static Public Member Functions | Static Private Attributes | List of all members
SAMRAI::tbox::MemoryUtilities Struct Reference

Class MemoryUtilities provides utility methods to access information about the memory characteristics of an application.
Currently, there are only methods, one called "printMemoryInfo()" which does a simple dump of the current memory usage on a processor, and "recordMemoryInfo()" which records the memory for post-process analysis.
More...

#include <tbox/MemoryUtilities.h>

Static Public Member Functions

static void printMemoryInfo (std::ostream &os)
 
static void recordMemoryInfo (double time=0.0)
 
static void printMaxMemory (std::ostream &os)
 

Static Private Attributes

static double s_max_memory
 

Detailed Description

Calls to these methods may be placed at various points in an application to track memory usage characteristics. For applications running on a single processor, the call the print method is likely sufficient. The information can simply be printed to a log file or output stream. For applications running on multiple processors, or which otherwise have complex memory patterns that cannot easily be deciphered from prints to a log file, the record method may be more useful. Use of this method requires the TAU (Tuning and Analysis Utilities) package to keep a profile of the recorded memory information so that it can be analyzed via a post-processing tool.

Note that all member functions of this class are static so it is not necessary to instantiate the class. Simply call the functions as static functions; e.g.,MemoryUtilities::function(...).

Member Function Documentation

◆ printMemoryInfo()

static void SAMRAI::tbox::MemoryUtilities::printMemoryInfo ( std::ostream &  os)
static

Print memory information to the supplied output stream.

◆ recordMemoryInfo()

static void SAMRAI::tbox::MemoryUtilities::recordMemoryInfo ( double  time = 0.0)
static

Record memory info to be analyzed by TAU (Tuning and Analysis Utilities). If tracing is enabled, you can supply a time at which the memory is recorded. This method requires SAMRAI to be configured with TAU. If it is not, the method will do nothing.

◆ printMaxMemory()

static void SAMRAI::tbox::MemoryUtilities::printMaxMemory ( std::ostream &  os)
static

Print maximum memory used (i.e. high-water mark) to the supplied output stream.

Member Data Documentation

◆ s_max_memory

double SAMRAI::tbox::MemoryUtilities::s_max_memory
staticprivate

The documentation for this struct was generated from the following file: