Block-Structured AMR Software Framework
BLProfStats Class Reference

#include <AMReX_BLProfStats.H>

Inheritance diagram for BLProfStats:
CommProfStats RegionsProfStats

Classes

struct  BLPDataBlock
 
struct  CallTreeNode
 
struct  FuncStat
 
struct  TimeRange
 
struct  TimeRangeCompare
 

Public Types

enum  FilterStatus {
  UNDEFINED , ON , OFF , INCLUDEALL ,
  INCLUDENONE
}
 

Public Member Functions

 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 AddFunctionName (const std::string &fname)
 
virtual void InitBLProfDataBlock (const int proc, const std::string &filename, const long seekpos)
 
virtual void CollectFuncStats (amrex::Vector< amrex::Vector< FuncStat > > &funcStats)
 
virtual void WriteSummary (std::ostream &ios, bool bwriteavg=false, int whichProc=0, bool graphTopPct=true)
 
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 AddTimeMinMax (const double, const double)
 
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 SetCSVersion (int)
 
virtual void AddCStatsHeaderFileName (const std::string &)
 
virtual void AddFunctionName (const std::string &, int)
 
virtual void InitCStatsDataBlock (int, long, long, const std::string &, long)
 
virtual void AddProbDomain (const int, const amrex::Box &)
 
virtual TimeRange MakeRegionPlt (amrex::FArrayBox &, int, int, int, amrex::Vector< amrex::Vector< 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 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 ()
 

Protected Member Functions

bool InTimeRange (int proc, Real calltime)
 

Protected Attributes

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

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
 

Private Member Functions

void ReadBlock (BLPDataBlock &dBlock)
 
void ReadBlockNoOpen (BLPDataBlock &dBlock)
 
void ClearBlock (BLPDataBlock &dBlock)
 

Friends

int yyparse (void *)
 

Member Enumeration Documentation

◆ FilterStatus

Enumerator
UNDEFINED 
ON 
OFF 
INCLUDEALL 
INCLUDENONE 

Constructor & Destructor Documentation

◆ BLProfStats()

BLProfStats::BLProfStats ( )

◆ ~BLProfStats()

BLProfStats::~BLProfStats ( )

Member Function Documentation

◆ AddBarrier()

virtual void BLProfStats::AddBarrier ( long  ,
const std::string &  ,
long   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddCalcEndTime()

virtual void BLProfStats::AddCalcEndTime ( double  cet)
inlinevirtual

◆ AddCommHeaderFileName()

virtual void BLProfStats::AddCommHeaderFileName ( const std::string &  )
inlinevirtual

Reimplemented in CommProfStats.

◆ AddCStatsHeaderFileName()

virtual void BLProfStats::AddCStatsHeaderFileName ( const std::string &  )
inlinevirtual

Reimplemented in RegionsProfStats.

◆ AddEdisonPID()

virtual void BLProfStats::AddEdisonPID ( int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddFinestLevel()

virtual void BLProfStats::AddFinestLevel ( const int  )
inlinevirtual

Reimplemented in CommProfStats.

◆ AddFunctionName() [1/2]

virtual void BLProfStats::AddFunctionName ( const std::string &  ,
int   
)
inlinevirtual

Reimplemented in RegionsProfStats.

◆ AddFunctionName() [2/2]

void BLProfStats::AddFunctionName ( const std::string &  fname)
virtual

Reimplemented in RegionsProfStats.

◆ AddGrid3D()

virtual void BLProfStats::AddGrid3D ( int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddGridLevel()

virtual void BLProfStats::AddGridLevel ( const int  ,
const int   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddMaxLevel()

virtual void BLProfStats::AddMaxLevel ( const int  )
inlinevirtual

Reimplemented in CommProfStats.

◆ AddNameTag()

virtual void BLProfStats::AddNameTag ( const long  ,
const long   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddNameTagName()

virtual void BLProfStats::AddNameTagName ( const std::string &  )
inlinevirtual

Reimplemented in CommProfStats.

◆ AddPiece()

bool BLProfStats::AddPiece ( std::list< TimeRange > &  addToHere,
const TimeRange pieceToAdd 
)
static

◆ AddProbDomain()

virtual void BLProfStats::AddProbDomain ( const int  ,
const amrex::Box  
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddReduction()

virtual void BLProfStats::AddReduction ( const long  ,
const long   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddRefRatio()

virtual void BLProfStats::AddRefRatio ( const int  ,
const amrex::IntVect  
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddRegionName()

void BLProfStats::AddRegionName ( const std::string &  rname,
int  rnumber 
)

◆ AddTagRange()

virtual void BLProfStats::AddTagRange ( const long  ,
const long   
)
inlinevirtual

Reimplemented in CommProfStats.

◆ AddTimeMinMax()

virtual void BLProfStats::AddTimeMinMax ( const double  ,
const double   
)
inlinevirtual

Reimplemented in RegionsProfStats, and CommProfStats.

◆ AddTimerTime()

virtual void BLProfStats::AddTimerTime ( const double  )
inlinevirtual

Reimplemented in CommProfStats.

◆ AddTopoCoord()

virtual void BLProfStats::AddTopoCoord ( const int  ,
const int  ,
const int  ,
const int  ,
const int  ,
const bool  = false 
)
inlinevirtual

Reimplemented in CommProfStats.

◆ BarrierNumbersToNames()

const std::map<int, std::string>& BLProfStats::BarrierNumbersToNames ( )
inline

◆ BLPFNames()

const amrex::Vector<std::string>& BLProfStats::BLPFNames ( )
inline

◆ CheckData()

void BLProfStats::CheckData ( )

◆ ClearBlock()

void BLProfStats::ClearBlock ( BLPDataBlock dBlock)
private

◆ CloseAllStreams()

void BLProfStats::CloseAllStreams ( )
static

◆ CollectFuncStats()

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

Reimplemented in RegionsProfStats.

◆ GetFilterTimeRanges()

const amrex::Vector<std::list<TimeRange> >& BLProfStats::GetFilterTimeRanges ( ) const
inline

◆ GetMaxRNumber()

int BLProfStats::GetMaxRNumber ( ) const
inline

◆ GetNOutFiles()

static int BLProfStats::GetNOutFiles ( )
inlinestatic

◆ GetNProcs()

static int BLProfStats::GetNProcs ( )
inlinestatic

◆ GetProc()

int BLProfStats::GetProc ( ) const
inline

◆ GetRegionTimeRanges()

const amrex::Vector<amrex::Vector<amrex::Vector<TimeRange> > >& BLProfStats::GetRegionTimeRanges ( )
inline

◆ InitBLProfDataBlock()

void BLProfStats::InitBLProfDataBlock ( const int  proc,
const std::string &  filename,
const long  seekpos 
)
virtual

◆ InitCommDataBlock()

virtual void BLProfStats::InitCommDataBlock ( const int  ,
const long  ,
const std::string &  ,
const long  ,
const std::string &  = "",
const int  = -1 
)
inlinevirtual

Reimplemented in CommProfStats.

◆ InitCStatsDataBlock()

virtual void BLProfStats::InitCStatsDataBlock ( int  ,
long  ,
long  ,
const std::string &  ,
long   
)
inlinevirtual

Reimplemented in RegionsProfStats.

◆ InitDBlocks()

static bool BLProfStats::InitDBlocks ( )
inlinestatic

◆ InitFilterTimeRanges()

void BLProfStats::InitFilterTimeRanges ( )

◆ InTimeRange()

bool BLProfStats::InTimeRange ( int  proc,
Real  calltime 
)
protected

◆ MakeFilterFile()

void BLProfStats::MakeFilterFile ( const std::string &  ffname)

◆ MakeRegionPlt()

virtual TimeRange BLProfStats::MakeRegionPlt ( amrex::FArrayBox ,
int  ,
int  ,
int  ,
amrex::Vector< amrex::Vector< amrex::Box >> &   
)
inlinevirtual

Reimplemented in RegionsProfStats.

◆ OpenAllStreams()

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

◆ RangeIntersection()

std::list< BLProfStats::TimeRange > BLProfStats::RangeIntersection ( std::list< TimeRange > &  rangeList,
const TimeRange pieceToIntersect 
)
static

◆ ReadBlock()

void BLProfStats::ReadBlock ( BLPDataBlock dBlock)
private

◆ ReadBlockNoOpen()

void BLProfStats::ReadBlockNoOpen ( BLPDataBlock dBlock)
private

◆ RegionNames()

const std::map<std::string, int>& BLProfStats::RegionNames ( )
inline

◆ RegionNumbers()

const std::map<int, std::string>& BLProfStats::RegionNumbers ( )
inline

◆ RemovePiece()

bool BLProfStats::RemovePiece ( std::list< TimeRange > &  removeFromHere,
const TimeRange pieceToRemove 
)
static

◆ SetBLPVersion()

virtual void BLProfStats::SetBLPVersion ( const int  blpv)
inlinevirtual

◆ SetCPVersion()

virtual void BLProfStats::SetCPVersion ( const int  )
inlinevirtual

Reimplemented in CommProfStats.

◆ SetCSSize()

virtual void BLProfStats::SetCSSize ( const int  )
inlinevirtual

Reimplemented in CommProfStats.

◆ SetCSVersion()

virtual void BLProfStats::SetCSVersion ( int  )
inlinevirtual

Reimplemented in RegionsProfStats.

◆ SetDirName()

static void BLProfStats::SetDirName ( const std::string &  dirname)
inlinestatic

◆ SetFilter() [1/2]

void BLProfStats::SetFilter ( BLProfStats::FilterStatus  fs)

◆ SetFilter() [2/2]

void BLProfStats::SetFilter ( BLProfStats::FilterStatus  fs,
const std::string &  rname,
int  rnumber 
)

◆ SetFilterTimeRanges()

void BLProfStats::SetFilterTimeRanges ( const amrex::Vector< std::list< TimeRange > > &  ftr)

◆ SetFNames()

void BLProfStats::SetFNames ( const amrex::Vector< std::string > &  fNames)
inline

◆ SetGPercent()

static void BLProfStats::SetGPercent ( Real  p)
inlinestatic

◆ SetInitDataBlocks()

static void BLProfStats::SetInitDataBlocks ( bool  b)
inlinestatic

◆ SetMaxRNumber()

void BLProfStats::SetMaxRNumber ( int  n)
inline

◆ SetNOutFiles()

static void BLProfStats::SetNOutFiles ( const int  nof)
inlinestatic

◆ SetNProcs()

static void BLProfStats::SetNProcs ( int  p)
inlinestatic

◆ SetProc()

void BLProfStats::SetProc ( int  p)
inline

◆ SetRegionTimeRanges() [1/2]

void BLProfStats::SetRegionTimeRanges ( const amrex::Vector< amrex::Vector< amrex::Vector< TimeRange > > > &  rtr)
inline

◆ SetRegionTimeRanges() [2/2]

void BLProfStats::SetRegionTimeRanges ( const TimeRange tr,
const int  n,
const int  r,
const int  t 
)
inline

◆ SetVerbose()

static void BLProfStats::SetVerbose ( int  vlevel = 0)
inlinestatic

◆ TimeRangeInitialized()

static bool BLProfStats::TimeRangeInitialized ( )
inlinestatic

◆ Verbose()

static int BLProfStats::Verbose ( )
inlinestatic

◆ WhichRegions()

std::set< int > BLProfStats::WhichRegions ( int  proc,
Real  t 
)

◆ WriteSummary()

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

Reimplemented in RegionsProfStats.

Friends And Related Function Documentation

◆ yyparse

int yyparse ( void *  )
friend

Member Data Documentation

◆ barrierNumbersToNames

std::map<int, std::string> BLProfStats::barrierNumbersToNames
protected

◆ bDefaultInclude

bool BLProfStats::bDefaultInclude
protected

◆ bInitDataBlocks

bool BLProfStats::bInitDataBlocks
staticprotected

◆ blpDataBlocks

amrex::Vector<BLPDataBlock> BLProfStats::blpDataBlocks
protected

◆ blpDataFileNames

std::map< std::string, int > BLProfStats::blpDataFileNames
staticprotected

◆ blpDataStreams

Vector< std::ifstream * > BLProfStats::blpDataStreams
staticprotected

◆ blpFNames

amrex::Vector<std::string> BLProfStats::blpFNames
protected

◆ blProfVersion

int BLProfStats::blProfVersion
staticprotected

◆ bTimeRangeInitialized

bool BLProfStats::bTimeRangeInitialized
staticprotected

◆ calcEndTime

Real BLProfStats::calcEndTime
protected

◆ currentDataBlock

int BLProfStats::currentDataBlock
protected

◆ currentProc

int BLProfStats::currentProc
protected

◆ dataNProcs

int BLProfStats::dataNProcs
staticprotected

◆ dirName

std::string BLProfStats::dirName
staticprotected

◆ excludeSet

std::set<int> BLProfStats::excludeSet
protected

◆ filterTimeRanges

amrex::Vector<std::list<TimeRange> > BLProfStats::filterTimeRanges
protected

◆ gPercent

Real BLProfStats::gPercent
staticprotected

◆ includeSet

std::set<int> BLProfStats::includeSet
protected

◆ maxRegionTime

Real BLProfStats::maxRegionTime
protected

◆ maxRNumber

int BLProfStats::maxRNumber
protected

◆ minRegionTime

Real BLProfStats::minRegionTime
protected

◆ nOutFiles

int BLProfStats::nOutFiles
staticprotected

◆ regionNames

std::map<std::string, int> BLProfStats::regionNames
protected

◆ regionNumbers

std::map<int, std::string> BLProfStats::regionNumbers
protected

◆ regionTimeRanges

amrex::Vector<amrex::Vector<amrex::Vector<TimeRange> > > BLProfStats::regionTimeRanges
protected

◆ verbose

int BLProfStats::verbose
staticprotected

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