Block-Structured AMR Software Framework
RegionsProfStats Class Reference

#include <AMReX_RegionsProfStats.H>

Inheritance diagram for RegionsProfStats:
BLProfStats

Classes

struct  DataBlock
 

Public Member Functions

 RegionsProfStats ()
 
 ~RegionsProfStats ()
 
virtual void AddCStatsHeaderFileName (const std::string &hfn)
 
virtual void SetCSVersion (int csv)
 
int GetCSVersion () const
 
void SetMaxFNumber (int n)
 
int GetMaxFNumber () const
 
void AddFunctionName (const std::string &)
 
virtual void AddFunctionName (const std::string &fname, int fnumber)
 
virtual void AddTimeMinMax (double tmin, double tmax)
 
TimeRange MakeRegionPlt (amrex::FArrayBox &rFab, int noregionnumber, int width, int height, amrex::Vector< amrex::Vector< amrex::Box >> &regionBoxes)
 
virtual void CollectFuncStats (amrex::Vector< amrex::Vector< FuncStat > > &funcStats)
 
virtual void WriteSummary (std::ostream &os, bool bwriteavg=false, int whichProc=0, bool graphTopPct=true)
 
bool AllCallTimesFAB (amrex::FArrayBox &actFab, const std::string &whichFuncName)
 
void FillAllCallTimes (amrex::Vector< amrex::Vector< Real > > &allCallTimes, const std::string whichFuncName, int whichFuncNumber, const amrex::Box &procBox)
 
void CheckRegionsData ()
 
virtual void InitCStatsDataBlock (int proc, long nrss, long ntracestats, const std::string &filename, long seekpos)
 
bool TraceDataValid () const
 
void SyncFNamesAndNumbers ()
 
bool InitRegionTimeRanges (const amrex::Box &procBox)
 
void WriteHTML (std::ostream &os, bool simpleCombine=true, int whichProc=0)
 
void PrintCallTreeNode (CallTreeNode &callTree, amrex::Vector< std::string > &fNumberNames)
 
void CreateVCallStats (CallTreeNode &callTree, amrex::Vector< amrex::BLProfiler::CallStats > &vCallStatsNC)
 
void WriteHTMLNC (std::ostream &os, int whichProc=0)
 
void WriteTextTrace (std::ostream &os, bool simpleCombine=true, int whichProc=0, std::string delimString="\t")
 
const amrex::Vector< std::string > & NumbersToFName () const
 
void FillRegionTimeRanges (amrex::Vector< amrex::Vector< TimeRange >> &rtr, int whichProc)
 
- Public Member Functions inherited from BLProfStats
 BLProfStats ()
 
 ~BLProfStats ()
 
void AddRegionName (const std::string &rname, int rnumber)
 
std::set< int > WhichRegions (int proc, Real t)
 
void SetProc (int p)
 
int GetProc () const
 
void SetMaxRNumber (int n)
 
int GetMaxRNumber () const
 
void InitFilterTimeRanges ()
 
void SetFilterTimeRanges (const amrex::Vector< std::list< TimeRange > > &ftr)
 
const amrex::Vector< std::list< TimeRange > > & GetFilterTimeRanges () const
 
void SetRegionTimeRanges (const amrex::Vector< amrex::Vector< amrex::Vector< TimeRange > > > &rtr)
 
void SetRegionTimeRanges (const TimeRange &tr, const int n, const int r, const int t)
 
const amrex::Vector< amrex::Vector< amrex::Vector< TimeRange > > > & GetRegionTimeRanges ()
 
const std::map< std::string, int > & RegionNames ()
 
const std::map< int, std::string > & RegionNumbers ()
 
const std::map< int, std::string > & BarrierNumbersToNames ()
 
void MakeFilterFile (const std::string &ffname)
 
void SetFilter (FilterStatus fs, const std::string &rname, int rnumber)
 
void SetFilter (FilterStatus fs)
 
virtual void SetBLPVersion (const int blpv)
 
virtual void InitBLProfDataBlock (const int proc, const std::string &filename, const long seekpos)
 
virtual void AddCalcEndTime (double cet)
 
virtual void SetCPVersion (const int)
 
virtual void SetCSSize (const int)
 
virtual void InitCommDataBlock (const int, const long, const std::string &, const long, const std::string &="", const int=-1)
 
virtual void AddBarrier (long, const std::string &, long)
 
virtual void AddReduction (const long, const long)
 
virtual void AddTimerTime (const double)
 
virtual void AddNameTag (const long, const long)
 
virtual void AddNameTagName (const std::string &)
 
virtual void AddTagRange (const long, const long)
 
virtual void AddGridLevel (const int, const int)
 
virtual void AddGrid3D (int, int, int, int, int, int, int, int, int, int, int, int, int, int)
 
virtual void AddFinestLevel (const int)
 
virtual void AddMaxLevel (const int)
 
virtual void AddRefRatio (const int, const amrex::IntVect &)
 
virtual void AddTopoCoord (const int, const int, const int, const int, const int, const bool=false)
 
virtual void AddCommHeaderFileName (const std::string &)
 
virtual void AddProbDomain (const int, const amrex::Box &)
 
virtual void AddEdisonPID (int, int, int, int, int, int, int, int, int)
 
void CheckData ()
 
const amrex::Vector< std::string > & BLPFNames ()
 
void SetFNames (const amrex::Vector< std::string > &fNames)
 

Static Public Member Functions

static void SetInitDataBlocks (bool b)
 
static bool InitDBlocks ()
 
static void InitDataFileNames (const amrex::Vector< std::string > &hfn)
 
static const amrex::Vector< std::string > & GetHeaderFileNames ()
 
static void OpenAllStreams (const std::string &dirname)
 
static void CloseAllStreams ()
 
- Static Public Member Functions inherited from BLProfStats
static int Verbose ()
 
static void SetVerbose (int vlevel=0)
 
static void SetDirName (const std::string &dirname)
 
static void SetNOutFiles (const int nof)
 
static int GetNOutFiles ()
 
static void SetNProcs (int p)
 
static int GetNProcs ()
 
static bool AddPiece (std::list< TimeRange > &addToHere, const TimeRange &pieceToAdd)
 
static std::list< TimeRangeRangeIntersection (std::list< TimeRange > &rangeList, const TimeRange &pieceToIntersect)
 
static bool RemovePiece (std::list< TimeRange > &removeFromHere, const TimeRange &pieceToRemove)
 
static void SetInitDataBlocks (bool b)
 
static bool InitDBlocks ()
 
static void SetGPercent (Real p)
 
static void OpenAllStreams (const std::string &dirname)
 
static void CloseAllStreams ()
 
static bool TimeRangeInitialized ()
 

Private Member Functions

bool Include (const FuncStat &fs)
 
void ReadBlock (DataBlock &dBlock, bool readRSS=true, bool readTraces=true)
 
void ReadBlockNoOpen (DataBlock &dBlock, bool readRSS=true, bool readTraces=true)
 
bool ReadBlock (DataBlock &dBlock, const int nmessages)
 
void ClearBlock (DataBlock &dBlock)
 

Private Attributes

int currentDataBlock
 
int csVersion
 
int maxFNumber
 
amrex::Vector< std::map< std::string, int > > mFNameNumbersPerProc
 
amrex::Vector< amrex::Vector< int > > fnameRemap
 
std::map< std::string, int > mFNameNumbersLocal
 
amrex::Vector< std::string > numbersToFName
 
amrex::Vector< DataBlockdataBlocks
 

Static Private Attributes

static amrex::Vector< std::string > regHeaderFileNames
 
static amrex::Vector< std::ifstream * > regDataStreams
 
static std::map< std::string, int > regDataFileNames
 
static std::map< Real, std::string, std::greater< Real > > mTimersTotalsSorted
 
static bool bInitDataBlocks
 
static bool persistentStreams
 

Friends

int yyparse (void *)
 

Additional Inherited Members

- Public Types inherited from BLProfStats
enum  FilterStatus {
  UNDEFINED , ON , OFF , INCLUDEALL ,
  INCLUDENONE
}
 
- Protected Member Functions inherited from BLProfStats
bool InTimeRange (int proc, Real calltime)
 
- Protected Attributes inherited from BLProfStats
int maxRNumber
 
int currentProc
 
int currentDataBlock
 
Real calcEndTime
 
Real minRegionTime
 
Real maxRegionTime
 
std::map< std::string, int > regionNames
 
std::map< int, std::string > regionNumbers
 
std::map< int, std::string > barrierNumbersToNames
 
std::set< int > includeSet
 
std::set< int > excludeSet
 
bool bDefaultInclude
 
amrex::Vector< amrex::Vector< amrex::Vector< TimeRange > > > regionTimeRanges
 
amrex::Vector< std::list< TimeRange > > filterTimeRanges
 
amrex::Vector< std::string > blpFNames
 
amrex::Vector< BLPDataBlockblpDataBlocks
 
- Static Protected Attributes inherited from BLProfStats
static int verbose
 
static int blProfVersion
 
static int dataNProcs
 
static int nOutFiles
 
static std::string dirName
 
static bool bInitDataBlocks
 
static bool bTimeRangeInitialized
 
static std::map< std::string, int > blpDataFileNames
 
static Real gPercent
 
static amrex::Vector< std::ifstream * > blpDataStreams
 

Constructor & Destructor Documentation

◆ RegionsProfStats()

RegionsProfStats::RegionsProfStats ( )

◆ ~RegionsProfStats()

RegionsProfStats::~RegionsProfStats ( )

Member Function Documentation

◆ AddCStatsHeaderFileName()

void RegionsProfStats::AddCStatsHeaderFileName ( const std::string &  hfn)
virtual

Reimplemented from BLProfStats.

◆ AddFunctionName() [1/2]

void RegionsProfStats::AddFunctionName ( const std::string &  )
inlinevirtual

Reimplemented from BLProfStats.

◆ AddFunctionName() [2/2]

void RegionsProfStats::AddFunctionName ( const std::string &  fname,
int  fnumber 
)
virtual

Reimplemented from BLProfStats.

◆ AddTimeMinMax()

void RegionsProfStats::AddTimeMinMax ( double  tmin,
double  tmax 
)
virtual

Reimplemented from BLProfStats.

◆ AllCallTimesFAB()

bool RegionsProfStats::AllCallTimesFAB ( amrex::FArrayBox actFab,
const std::string &  whichFuncName 
)

◆ CheckRegionsData()

void RegionsProfStats::CheckRegionsData ( )

◆ ClearBlock()

void RegionsProfStats::ClearBlock ( DataBlock dBlock)
private

◆ CloseAllStreams()

void RegionsProfStats::CloseAllStreams ( )
static

◆ CollectFuncStats()

void RegionsProfStats::CollectFuncStats ( amrex::Vector< amrex::Vector< FuncStat > > &  funcStats)
virtual

Reimplemented from BLProfStats.

◆ CreateVCallStats()

void RegionsProfStats::CreateVCallStats ( CallTreeNode callTree,
amrex::Vector< amrex::BLProfiler::CallStats > &  vCallStatsNC 
)

◆ FillAllCallTimes()

void RegionsProfStats::FillAllCallTimes ( amrex::Vector< amrex::Vector< Real > > &  allCallTimes,
const std::string  whichFuncName,
int  whichFuncNumber,
const amrex::Box procBox 
)

◆ FillRegionTimeRanges()

void RegionsProfStats::FillRegionTimeRanges ( amrex::Vector< amrex::Vector< TimeRange >> &  rtr,
int  whichProc 
)

◆ GetCSVersion()

int RegionsProfStats::GetCSVersion ( ) const
inline

◆ GetHeaderFileNames()

static const amrex::Vector<std::string>& RegionsProfStats::GetHeaderFileNames ( )
inlinestatic

◆ GetMaxFNumber()

int RegionsProfStats::GetMaxFNumber ( ) const
inline

◆ Include()

bool RegionsProfStats::Include ( const FuncStat fs)
private

◆ InitCStatsDataBlock()

void RegionsProfStats::InitCStatsDataBlock ( int  proc,
long  nrss,
long  ntracestats,
const std::string &  filename,
long  seekpos 
)
virtual

Reimplemented from BLProfStats.

◆ InitDataFileNames()

void RegionsProfStats::InitDataFileNames ( const amrex::Vector< std::string > &  hfn)
static

◆ InitDBlocks()

static bool RegionsProfStats::InitDBlocks ( )
inlinestatic

◆ InitRegionTimeRanges()

bool RegionsProfStats::InitRegionTimeRanges ( const amrex::Box procBox)

◆ MakeRegionPlt()

BLProfStats::TimeRange RegionsProfStats::MakeRegionPlt ( amrex::FArrayBox rFab,
int  noregionnumber,
int  width,
int  height,
amrex::Vector< amrex::Vector< amrex::Box >> &  regionBoxes 
)
virtual

Reimplemented from BLProfStats.

◆ NumbersToFName()

const amrex::Vector<std::string>& RegionsProfStats::NumbersToFName ( ) const
inline

◆ OpenAllStreams()

void RegionsProfStats::OpenAllStreams ( const std::string &  dirname)
static

◆ PrintCallTreeNode()

void RegionsProfStats::PrintCallTreeNode ( CallTreeNode callTree,
amrex::Vector< std::string > &  fNumberNames 
)

◆ ReadBlock() [1/2]

void RegionsProfStats::ReadBlock ( DataBlock dBlock,
bool  readRSS = true,
bool  readTraces = true 
)
private

◆ ReadBlock() [2/2]

bool RegionsProfStats::ReadBlock ( DataBlock dBlock,
const int  nmessages 
)
private

◆ ReadBlockNoOpen()

void RegionsProfStats::ReadBlockNoOpen ( DataBlock dBlock,
bool  readRSS = true,
bool  readTraces = true 
)
private

◆ SetCSVersion()

virtual void RegionsProfStats::SetCSVersion ( int  csv)
inlinevirtual

Reimplemented from BLProfStats.

◆ SetInitDataBlocks()

static void RegionsProfStats::SetInitDataBlocks ( bool  b)
inlinestatic

◆ SetMaxFNumber()

void RegionsProfStats::SetMaxFNumber ( int  n)
inline

◆ SyncFNamesAndNumbers()

void RegionsProfStats::SyncFNamesAndNumbers ( )

◆ TraceDataValid()

bool RegionsProfStats::TraceDataValid ( ) const
inline

◆ WriteHTML()

void RegionsProfStats::WriteHTML ( std::ostream &  os,
bool  simpleCombine = true,
int  whichProc = 0 
)

◆ WriteHTMLNC()

void RegionsProfStats::WriteHTMLNC ( std::ostream &  os,
int  whichProc = 0 
)

◆ WriteSummary()

void RegionsProfStats::WriteSummary ( std::ostream &  os,
bool  bwriteavg = false,
int  whichProc = 0,
bool  graphTopPct = true 
)
virtual

Reimplemented from BLProfStats.

◆ WriteTextTrace()

void RegionsProfStats::WriteTextTrace ( std::ostream &  os,
bool  simpleCombine = true,
int  whichProc = 0,
std::string  delimString = "\t" 
)

Friends And Related Function Documentation

◆ yyparse

int yyparse ( void *  )
friend

Member Data Documentation

◆ bInitDataBlocks

bool RegionsProfStats::bInitDataBlocks
staticprivate

◆ csVersion

int RegionsProfStats::csVersion
private

◆ currentDataBlock

int RegionsProfStats::currentDataBlock
private

◆ dataBlocks

amrex::Vector<DataBlock> RegionsProfStats::dataBlocks
private

◆ fnameRemap

amrex::Vector<amrex::Vector<int> > RegionsProfStats::fnameRemap
private

◆ maxFNumber

int RegionsProfStats::maxFNumber
private

◆ mFNameNumbersLocal

std::map<std::string, int> RegionsProfStats::mFNameNumbersLocal
private

◆ mFNameNumbersPerProc

amrex::Vector<std::map<std::string, int> > RegionsProfStats::mFNameNumbersPerProc
private

◆ mTimersTotalsSorted

std::map< Real, std::string, std::greater< Real > > RegionsProfStats::mTimersTotalsSorted
staticprivate

◆ numbersToFName

amrex::Vector<std::string> RegionsProfStats::numbersToFName
private

◆ persistentStreams

bool RegionsProfStats::persistentStreams
staticprivate

◆ regDataFileNames

std::map< std::string, int > RegionsProfStats::regDataFileNames
staticprivate

◆ regDataStreams

Vector< std::ifstream * > RegionsProfStats::regDataStreams
staticprivate

◆ regHeaderFileNames

Vector< std::string > RegionsProfStats::regHeaderFileNames
staticprivate

The documentation for this class was generated from the following files: