4 #ifndef AMREX_DATASERVICES_H_
5 #define AMREX_DATASERVICES_H_
6 #include <AMReX_Config.H>
12 #ifdef BL_USE_PROFPARSER
49 #ifdef BL_USE_PROFPARSER
57 MakeFilterFileRequest,
79 int finestFillLevel,
const std::string &varname,
89 const std::string &varname);
92 bool WriteFab(
const std::string &fabfilename,
const Box ®ion,
int lev,
93 const std::string &varname);
96 bool WriteFab(
const std::string &fabfilename,
const Box ®ion,
int lev);
99 bool DumpSlice(
int slicedir,
int slicenum,
const std::string &varname);
102 bool DumpSlice(
int slicedir,
int slicenum);
105 bool DumpSlice(
const Box &slicebox,
const std::string &varname);
111 bool MinMax(
const Box &onBox,
const std::string &derived,
int level,
112 Real &dataMin, Real &dataMax,
bool &minMaxValid);
116 const std::string ¤tDerived,
117 int coarsestLevelToSearch,
int finestLevelToSearch,
118 int &intersectedLevel,
Box &intersectedGrid,
119 Real &dataPointValue,
bool &bPointIsValid);
122 void LineValues(
int lineBoxArraySize,
Box *lineBoxArray,
int whichDir,
123 const std::string ¤tDerived,
124 int coarsestLevelToSearch,
int finestLevelToSearch,
132 bool CanDerive(
const std::string &name)
const;
147 #ifdef BL_USE_PROFPARSER
148 bool ProfDataAvailable()
const {
return bProfDataAvailable; }
149 bool RegionDataAvailable()
const {
return bRegionDataAvailable; }
150 bool TraceDataAvailable()
const {
return bTraceDataAvailable; }
151 bool CommDataAvailable()
const {
return bCommDataAvailable; }
153 BLProfStats &GetBLProfStats() {
return blProfStats_H; }
155 CommProfStats &GetCommOutputStats() {
return commOutputStats_H; }
158 void CheckProfData();
160 void RunStats(std::map<int, std::string> &mpiFuncNames,
161 bool &statsCollected);
163 void RunSendsPF(std::string &plotfileName,
164 int maxSmallImageLength,
168 void RunTimelinePF(std::map<int, std::string> &mpiFuncNames,
169 std::string &plotfileName,
171 int maxSmallImageLength,
174 bool &statsCollected);
176 void RunACTPF(std::string &plotfileName,
177 int maxSmallImageLength,
181 void RunSyncPointData();
182 void RunSendRecvList();
186 void MakeRegionPlt(std::string &plotfileName);
187 void MakeFilterFile(std::string &fFileName);
189 void ProcessGridLog(
const std::string &gridlogFileName);
190 void ParseFilterFile();
192 void PrintCommStats(std::ostream &os,
bool printHeaderNames);
193 void WriteSummary(std::ostream &os,
bool bWriteAverage,
int whichProc,
194 bool bUseTrace,
bool graphTopPct);
197 void WriteHTML(
const std::string &fFileName,
bool simpleCombine,
int whichProc);
198 void WriteHTMLNC(
const std::string &fFileName,
int whichProc);
199 void WriteTextTrace(
const std::string &fFileName,
bool simpleCombine =
true,
200 int whichProc = 0, std::string delimString =
"\t");
217 #ifdef BL_USE_PROFPARSER
218 bool bProfDataAvailable;
219 bool bRegionDataAvailable;
220 bool bTraceDataAvailable;
221 bool bCommDataAvailable;
Definition: AMReX_BLProfStats.H:30
Definition: AMReX_CommProfStats.H:38
Definition: AMReX_RegionsProfStats.H:38
Definition: AMReX_AmrData.H:19
const Vector< std::string > & PlotVarNames() const
Definition: AMReX_AmrData.H:60
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:549
Definition: AMReX_DataServices.H:28
static void SetBatchMode()
Definition: AMReX_DataServices.cpp:387
void Init(const std::string &filename, const Amrvis::FileType &filetype)
Definition: AMReX_DataServices.cpp:148
Amrvis::FileType GetFileType() const
Definition: AMReX_DataServices.H:131
const Vector< std::string > & PlotVarNames() const
Definition: AMReX_DataServices.H:136
bool AmrDataOk()
Definition: AMReX_DataServices.H:138
bool DumpSlice(int slicedir, int slicenum, const std::string &varname)
DumpSlicePlaneOneVar.
Definition: AMReX_DataServices.cpp:1181
AmrData & AmrDataRef()
Definition: AMReX_DataServices.H:137
const std::string & GetFileName() const
Definition: AMReX_DataServices.H:130
void IncrementNumberOfUsers()
Definition: AMReX_DataServices.H:143
std::string fileName
Definition: AMReX_DataServices.H:204
static int dsArrayIndexCounter
Definition: AMReX_DataServices.H:213
DSRequestType
Definition: AMReX_DataServices.H:32
@ NewRequest
Definition: AMReX_DataServices.H:35
@ FillVarOneFab
Definition: AMReX_DataServices.H:37
@ FillVarArrayOfFabs
Definition: AMReX_DataServices.H:38
@ DumpSlicePlaneAllVars
Definition: AMReX_DataServices.H:43
@ WriteFabOneVar
Definition: AMReX_DataServices.H:40
@ DumpSlicePlaneOneVar
Definition: AMReX_DataServices.H:42
@ FillVarMultiFab
Definition: AMReX_DataServices.H:39
@ WriteFabAllVars
Definition: AMReX_DataServices.H:41
@ MinMaxRequest
Definition: AMReX_DataServices.H:46
@ InvalidRequestType
Definition: AMReX_DataServices.H:33
@ LineValuesRequest
Definition: AMReX_DataServices.H:48
@ DeleteRequest
Definition: AMReX_DataServices.H:36
@ ExitRequest
Definition: AMReX_DataServices.H:34
@ DumpSliceBoxOneVar
Definition: AMReX_DataServices.H:44
@ PointValueRequest
Definition: AMReX_DataServices.H:47
@ DumpSliceBoxAllVars
Definition: AMReX_DataServices.H:45
int iWriteToLevel
Definition: AMReX_DataServices.H:210
static void Dispatch(DSRequestType requestType, DataServices *ds,...)
Definition: AMReX_DataServices.cpp:408
void InitRegionTimeRanges()
Definition: AMReX_DataServices.cpp:323
AmrData amrData
Definition: AMReX_DataServices.H:206
int GetNumberOfUsers() const
Definition: AMReX_DataServices.H:142
void PointValue(int pointBoxArraySize, Box *pointBoxArray, const std::string ¤tDerived, int coarsestLevelToSearch, int finestLevelToSearch, int &intersectedLevel, Box &intersectedGrid, Real &dataPointValue, bool &bPointIsValid)
PointValueRequest.
Definition: AMReX_DataServices.cpp:1589
~DataServices()
Definition: AMReX_DataServices.cpp:378
int numberOfUsers
Definition: AMReX_DataServices.H:209
bool MinMax(const Box &onBox, const std::string &derived, int level, Real &dataMin, Real &dataMax, bool &minMaxValid)
MinMaxRequest.
Definition: AMReX_DataServices.cpp:1676
static Vector< DataServices * > dsArray
Definition: AMReX_DataServices.H:212
bool FillVar(FArrayBox *destFab, const Box &destBox, int finestFillLevel, const std::string &varname, int procWithFab)
FillVarOneFab.
Definition: AMReX_DataServices.cpp:1405
static bool profiler
Definition: AMReX_DataServices.H:216
int dsArrayIndex
Definition: AMReX_DataServices.H:208
void LineValues(int lineBoxArraySize, Box *lineBoxArray, int whichDir, const std::string ¤tDerived, int coarsestLevelToSearch, int finestLevelToSearch, XYPlotDataList *dataList, bool &lineIsValid)
LineValuesRequest.
Definition: AMReX_DataServices.cpp:1642
void DecrementNumberOfUsers()
Definition: AMReX_DataServices.H:144
Amrvis::FileType fileType
Definition: AMReX_DataServices.H:205
bool bAmrDataOk
Definition: AMReX_DataServices.H:207
static bool dsBatchMode
Definition: AMReX_DataServices.H:215
void ListDeriveFunc(std::ostream &os) const
Definition: AMReX_DataServices.cpp:1574
static void SetFabOutSize(int iSize)
Definition: AMReX_DataServices.cpp:393
int NumDeriveFunc() const
Definition: AMReX_DataServices.cpp:1583
bool CanDerive(const std::string &name) const
Definition: AMReX_DataServices.cpp:1555
DataServices()
Definition: AMReX_DataServices.cpp:140
static int dsFabOutSize
Definition: AMReX_DataServices.H:214
void SetWriteToLevel(const int iwtlev)
Definition: AMReX_DataServices.H:139
bool WriteFab(const std::string &fabfilename, const Box ®ion, int lev, const std::string &varname)
WriteFabOneVar: write a single variable to one fab.
Definition: AMReX_DataServices.cpp:1439
A Fortran Array of REALs.
Definition: AMReX_FArrayBox.H:229
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
Definition: AMReX_XYPlotDataList.H:71
FileType
Definition: AMReX_AmrvisConstants.H:86
Definition: AMReX_Amr.cpp:49
Definition: AMReX_BLProfStats.H:79