3#include <AMReX_Config.H>
7#define BL_PROFILE_PASTE2(x, y) x##y
8#define BL_PROFILE_PASTE(x, y) BL_PROFILE_PASTE2(x, y)
35 ProfStats() : nCalls(0), totalTime(0.0), minTime(0.0),
36 maxTime(0.0), avgTime(0.0), variance(0.0) { }
38 Real totalTime, minTime, maxTime, avgTime, variance;
42 CallStats() : callStackDepth(-2), csFNameNumber(-2),
43 nCSCalls(0), totalTime(0.0),
44 stackTime(0.0), callTime(0.0) { }
45 CallStats(
int depth,
int fnamenumber) : callStackDepth(depth),
46 csFNameNumber(fnamenumber),
47 nCSCalls(0), totalTime(0.0),
48 stackTime(0.0), callTime(0.0) { }
49 CallStats(
int depth,
int fnamenumber,
int ncalls, Real totaltime,
50 Real stacktime, Real calltime) : callStackDepth(depth),
51 csFNameNumber(fnamenumber),
52 nCSCalls(ncalls), totalTime(totaltime),
53 stackTime(stacktime), callTime(calltime) { }
54 int callStackDepth, csFNameNumber;
56 Real totalTime, stackTime, callTime;
58 static int cstatsVersion;
59 static Real minCallTime, maxCallTime;
62 struct CallStatsStack {
63 CallStatsStack() : bFlushed(
false), index(-1) { }
64 CallStatsStack(
int idx) : bFlushed(
false), index(idx) { }
69 struct CallStatsPatch {
70 CallStatsPatch() : seekPos(-1), callStats(), fileName(
"") { }
71 CallStatsPatch(Long spos,
const CallStats &cs,
const std::string &fname)
72 : seekPos(spos), callStats(cs), fileName(fname) { }
80 : rssTime(0.0), rssRNumber(-2), rssStart(
false) { }
81 RStartStop(Real t,
int r,
bool s)
82 : rssTime(t), rssRNumber(r), rssStart(s) { }
137 CommStats() : cfType(InvalidCFT), size(-2), commpid(-2), tag(-2),
139 CommStats(CommFuncType cft,
int sz,
int cpid,
int tg, Real ts)
140 : cfType(cft), size(sz), commpid(cpid), tag(tg),
143 static std::string CFTToString(CommFuncType cft);
144 static CommFuncType StringToCFT(
const std::string &s);
145 static void Filter(CommFuncType cft);
146 static void UnFilter(CommFuncType cft);
148 static std::map<std::string, CommFuncType> cftNames;
149 static std::set<CommFuncType> cftExclude;
150 static int barrierNumber;
151 static int reductionNumber;
152 static int tagWrapNumber;
155 static Vector<std::pair<std::string,int> > barrierNames;
156 static Vector<std::pair<int,int> > nameTags;
157 static Vector<std::string> nameTagNames;
158 static Vector<int> tagWraps;
159 static int csVersion;
162 int size, commpid, tag;
166 static std::map<std::string, BLProfiler *> mFortProfs;
167 static Vector<std::string> mFortProfsErrors;
168 static Vector<BLProfiler *> mFortProfsInt;
169 static Vector<std::string> mFortProfsIntNames;
171 explicit BLProfiler(
const std::string &funcname);
172 BLProfiler(
const std::string &funcname,
bool bstart);
178 static void Finalize(
bool bFlushing =
false,
bool memCheck =
false);
180 static void WriteBaseProfile(
bool bFlushing =
false,
bool memCheck =
false);
181 static void WriteCallTrace(
bool bFlushing =
false,
bool memCheck =
false);
182 static void WriteCommStats(
bool bFlushing =
false,
bool memCheck =
false);
183 static void WriteFortProfErrors();
185 static void AddCommStat(
const CommFuncType cft,
const int size,
186 const int pid,
const int tag);
187 static void AddWait(
const CommFuncType cft,
const MPI_Request &reqs,
188 const MPI_Status &status,
const bool bc);
189 static void AddWaitsome(
const CommFuncType cft,
const Vector<MPI_Request> &reqs,
190 const int completed,
const Vector<MPI_Status> &status,
192 static void AddBarrier(
const std::string &message,
const bool bc);
193 static void AddNameTag(
const std::string &name);
194 static void AddAllReduce(
const CommFuncType cft,
const int size,
const bool bc);
195 static void TagRange(
const int tagmin,
const int tagmax);
196 static void AddTagWrap();
198 static void InitAMR(
const int flev,
const int mlev,
const Vector<IntVect> &rr,
199 const Vector<Box> pd);
206 static void ChangeFortIntName(
const std::string &fname,
int intname);
209 const bool writefabs);
210 static void AddStep(
const int snum);
211 static Real GetRunTime() {
return calcRunTime; }
212 static void SetRunTime(
Real rtime) { calcRunTime = rtime; }
214 static void RegionStart(
const std::string &rname);
215 static void RegionStop(
const std::string &rname);
217 static inline int NoTag() {
return -3; }
218 static inline int BeforeCall() {
return -5; }
219 static inline int AfterCall() {
return -7; }
221 static inline int ProcNumber() {
return procNumber; }
222 static void SetBlProfDirName(
const std::string &name) { blProfDirName = name; }
223 static void SetNoOutput() { bNoOutput =
true; }
225 static int GetBaseFlushSize() {
return baseFlushSize; }
226 static void SetBaseFlushSize(
int fsize) { baseFlushSize = fsize; }
227 static int GetCSFlushSize() {
return csFlushSize; }
228 static void SetCSFlushSize(
int fsize) { csFlushSize = fsize; }
229 static int GetTraceFlushSize() {
return traceFlushSize; }
230 static void SetTraceFlushSize(
int fsize) { traceFlushSize = fsize; }
232 static int GetFlushInterval() {
return flushInterval; }
233 static void SetFlushInterval(
int finterval) { flushInterval = finterval; }
234 static Real GetFlushTimeInterval() {
return flushTimeInterval; }
235 static void SetFlushTimeInterval(
Real ftinterval) { flushTimeInterval = ftinterval; }
237 static void SetNFiles(
int nfiles) { nProfFiles = nfiles; }
238 static int GetNFiles() {
return nProfFiles; }
241 Real bltstart, bltelapsed;
245 static bool bWriteAll, bWriteFabs, groupSets;
246 static bool bFirstCommWrite;
247 static bool bInitialized, bNoOutput;
248 static bool bFlushPrint;
249 static int currentStep, nProfFiles;
250 static int baseFlushSize, csFlushSize, traceFlushSize;
251 static int baseFlushCount, csFlushCount, traceFlushCount, flushInterval;
252 static int finestLevel, maxLevel;
253 static Real pctTimeLimit;
254 static Real calcRunTime;
255 static Real startTime;
256 static Real timerTime;
257 static Real flushTimeInterval;
259 static Vector<IntVect> refRatio;
260 static Vector<Box> probDomain;
262 static std::stack<Real> nestedTimeStack;
263 static std::map<int, Real> mStepMap;
264 static std::map<std::string, ProfStats> mProfStats;
265 static Vector<CommStats> vCommStats;
266 static std::string procName;
267 static int procNumber;
268 static bool blProfDirCreated;
269 static std::string blProfDirName;
270 static int BLProfVersion;
272 static bool OnExcludeList(CommFuncType cft);
273 static int NameTagNameIndex(
const std::string &name);
275 static std::map<std::string, int> mFNameNumbers;
276 static Vector<CallStats> vCallTrace;
279 static std::map<std::string, int> mRegionNameNumbers;
280 static int inNRegions;
281 static Vector<RStartStop> rStartStop;
282 static const std::string noRegionName;
284 static bool bFirstTraceWrite;
286 static Vector<CallStatsStack> callIndexStack;
287 static Vector<CallStatsPatch> callIndexPatch;
289#ifdef BL_TRACE_PROFILING
290 static int callStackDepth;
291 static int prevCallStackDepth;
294 using RIpair = std::pair<Real, int>;
296 bool operator()(
const RIpair &lhs,
const RIpair &rhs)
const {
297 return lhs.first > rhs.first;
308 BLProfileRegion (
const std::string& a_regname)
311 BLProfiler::RegionStart(regname);
314 ~BLProfileRegion () { BLProfiler::RegionStop(regname); }
320namespace BLProfilerUtils {
321 void WriteHeader(std::ostream &os,
const int colWidth,
322 const Real maxlen,
const bool bwriteavg);
324 void WriteRow(std::ostream &os,
const std::string &fname,
325 const BLProfiler::ProfStats &pstats,
const Real percent,
326 const int colWidth,
const Real maxlen,
327 const bool bwriteavg);
329 void WriteStats(std::ostream &os,
330 const std::map<std::string, BLProfiler::ProfStats> &mpStats,
331 const std::map<std::string, int> &fnameNumbers,
332 const Vector<BLProfiler::CallStats> &callTraces,
333 bool bwriteavg =
false,
bool bwriteinclusivetimes =
false);
337std::ostream &
operator<< (std::ostream &os,
const BLProfiler::CommStats &cs);
340inline std::string BLProfiler::CommStats::CFTToString(CommFuncType cft) {
342 case InvalidCFT:
return "InvalidCFT";
343 case AllReduceT:
return "AllReduceT";
344 case AllReduceR:
return "AllReduceR";
345 case AllReduceL:
return "AllReduceL";
346 case AllReduceI:
return "AllReduceI";
347 case AsendTsii:
return "AsendTsii";
348 case AsendTsiiM:
return "AsendTsiiM";
349 case AsendvTii:
return "AsendvTii";
350 case SendTsii:
return "SendTsii";
351 case SendvTii:
return "SendvTii";
352 case ArecvTsii:
return "ArecvTsii";
353 case ArecvTsiiM:
return "ArecvTsiiM";
354 case ArecvTii:
return "ArecvTii";
355 case ArecvvTii:
return "ArecvvTii";
356 case RecvTsii:
return "RecvTsii";
357 case RecvvTii:
return "RecvvTii";
358 case ReduceT:
return "ReduceT";
359 case ReduceR:
return "ReduceR";
360 case ReduceL:
return "ReduceL";
361 case ReduceI:
return "ReduceI";
362 case BCastTsi:
return "BCastTsi";
363 case GatherTsT1Si:
return "GatherTsT1Si";
364 case GatherTi:
return "GatherTi";
365 case GatherRiRi:
return "GatherRiRi";
366 case ScatterTsT1si:
return "ScatterTsT1si";
367 case Barrier:
return "Barrier";
368 case Waitsome:
return "Waitsome";
369 case NameTag:
return "NameTag";
370 case AllCFTypes:
return "AllCFTypes";
371 case NoCFTypes:
return "NoCFTypes";
372 case IOStart:
return "IOStart";
373 case IOEnd:
return "IOEnd";
374 case TagWrap:
return "TagWrap";
375 case Allgather:
return "Allgather";
376 case Alltoall:
return "Alltoall";
377 case Alltoallv:
return "Alltoallv";
378 case Gatherv:
return "Gatherv";
379 case Get_count:
return "Get_count";
380 case Iprobe:
return "Iprobe";
381 case Test:
return "Test";
382 case Wait:
return "Wait";
383 case Waitall:
return "Waitall";
384 case Waitany:
return "Waitany";
385 case NUMBER_OF_CFTS:
return "NUMBER_OF_CFTS";
387 return "*** Error: Bad CommFuncType.";
392#define BL_PROFILE_INITIALIZE() amrex::BLProfiler::Initialize();
393#define BL_PROFILE_INITPARAMS() amrex::BLProfiler::InitParams(); amrex::BLProfileSync::InitParams()
394#define BL_PROFILE_FINALIZE() amrex::BLProfiler::Finalize();
396#define BL_TINY_PROFILE_INITIALIZE()
397#define BL_TINY_PROFILE_FINALIZE()
399#define BL_TINY_PROFILE_MEMORYINITIALIZE()
400#define BL_TINY_PROFILE_MEMORYFINALIZE()
402#define BL_PROFILE(fname) amrex::BLProfiler bl_profiler_((fname));
403#define BL_PROFILE_T(fname, T) amrex::BLProfiler bl_profiler_((std::string(fname) + typeid(T).name()));
404#ifdef BL_PROFILING_SPECIAL
405#define BL_PROFILE_S(fname) amrex::BLProfiler bl_profiler_((fname));
406#define BL_PROFILE_T_S(fname, T) amrex::BLProfiler bl_profiler_((std::string(fname) + typeid(T).name()));
408#define BL_PROFILE_S(fname)
409#define BL_PROFILE_T_S(fname, T)
412#define BL_PROFILE_VAR(fname, vname) amrex::BLProfiler bl_profiler_##vname((fname));
413#define BL_PROFILE_VAR_NS(fname, vname) amrex::BLProfiler bl_profiler_##vname(fname, false);
414#define BL_PROFILE_VAR_START(vname) bl_profiler_##vname.start();
415#define BL_PROFILE_VAR_STOP(vname) bl_profiler_##vname.stop();
417#define BL_PROFILE_INIT_PARAMS(ptl,wall,wfabs) \
418 amrex::BLProfiler::InitParams(ptl,wall, wfabs);
419#define BL_PROFILE_ADD_STEP(snum) amrex::BLProfiler::AddStep(snum);
420#define BL_PROFILE_SET_RUN_TIME(rtime) amrex::BLProfiler::SetRunTime(rtime);
422#define BL_PROFILE_REGION(rname) \
423 AMREX_WARNING_PUSH_COUNTER \
424 amrex::BLProfileRegion BL_PROFILE_PASTE(bl_profile_region_, __COUNTER__)((rname)); \
427#define BL_PROFILE_REGION_START(rname) amrex::BLProfiler::RegionStart(rname);
428#define BL_PROFILE_REGION_STOP(rname) amrex::BLProfiler::RegionStop(rname);
431#define BL_PROFILE_REGION_VAR(fname, rvname) amrex::BLProfiler::RegionStart(fname); \
432 amrex::BLProfiler bl_profiler_##rvname((fname));
433#define BL_PROFILE_REGION_VAR_START(fname, rvname) amrex::BLProfiler::RegionStart(fname); \
434 bl_profiler_##rvname.start();
435#define BL_PROFILE_REGION_VAR_STOP(fname, rvname) bl_profiler_##rvname.stop(); \
436 amrex::BLProfiler::RegionStop(fname);
438#define BL_PROFILE_TINY_FLUSH()
439#define BL_PROFILE_FLUSH() { amrex::BLProfiler::Finalize(true); }
441#define BL_TRACE_PROFILE_FLUSH() { amrex::BLProfiler::WriteCallTrace(true, true); }
442#define BL_TRACE_PROFILE_SETFLUSHSIZE(fsize) { amrex::BLProfiler::SetTraceFlushSize(fsize); }
444#define BL_PROFILE_CHANGE_FORT_INT_NAME(fname, intname) { amrex::BLProfiler::ChangeFortIntName(fname, intname); }
446#ifdef BL_COMM_PROFILING
448#define BL_COMM_PROFILE(cft, size, pid, tag) { \
449 amrex::BLProfiler::AddCommStat(cft, size, pid, tag); \
451#define BL_COMM_PROFILE_BARRIER(message, bc) { amrex::BLProfiler::AddBarrier(message, bc); }
452#define BL_COMM_PROFILE_ALLREDUCE(cft, size, bc) { amrex::BLProfiler::AddAllReduce(cft, size, bc); }
453#define BL_COMM_PROFILE_REDUCE(cft, size, pid) { \
454 amrex::BLProfiler::AddCommStat(cft, size, pid, amrex::BLProfiler::NoTag()); }
455#define BL_COMM_PROFILE_WAIT(cft, reqs, status, bc) { \
456 amrex::BLProfiler::AddWait(cft, reqs, status, bc); \
458#define BL_COMM_PROFILE_WAITSOME(cft, reqs, completed, status, bc) { \
459 amrex::BLProfiler::AddWaitsome(cft, reqs, completed, status, bc); \
461#define BL_COMM_PROFILE_NAMETAG(message) { amrex::BLProfiler::AddNameTag(message); }
462#define BL_COMM_PROFILE_FILTER(cft) { amrex::BLProfiler::CommStats::Filter(cft); }
463#define BL_COMM_PROFILE_UNFILTER(cft) { amrex::BLProfiler::CommStats::UnFilter(cft); }
464#define BL_COMM_PROFILE_FLUSH() { amrex::BLProfiler::WriteCommStats(true, true); }
465#define BL_COMM_PROFILE_SETFLUSHSIZE(fsize) { amrex::BLProfiler::SetCSFlushSize(fsize); }
466#define BL_COMM_PROFILE_TAGRANGE(tagmin, tagmax) { \
467 amrex::BLProfiler::TagRange(tagmin, tagmax); }
468#define BL_COMM_PROFILE_TAGWRAP() { amrex::BLProfiler::AddTagWrap(); }
469#define BL_COMM_PROFILE_INITAMR(flev, mlev, rr, pd) { \
470 amrex::BLProfiler::InitAMR(flev, mlev, rr, pd); \
477#elif defined(AMREX_TINY_PROFILING)
482#define BL_PROFILE_INITIALIZE()
483#define BL_PROFILE_INITPARAMS()
484#define BL_PROFILE_FINALIZE()
486#define BL_TINY_PROFILE_INITIALIZE() amrex::TinyProfiler::Initialize(); amrex::BLProfileSync::InitParams()
487#define BL_TINY_PROFILE_FINALIZE() amrex::TinyProfiler::Finalize()
489#define BL_TINY_PROFILE_MEMORYINITIALIZE() amrex::TinyProfiler::MemoryInitialize()
490#define BL_TINY_PROFILE_MEMORYFINALIZE() amrex::TinyProfiler::MemoryFinalize()
492#define BL_PROFILE(fname) \
493 AMREX_WARNING_PUSH_COUNTER \
494 BL_PROFILE_IMPL(fname, __COUNTER__) \
496#define BL_PROFILE_IMPL(funame, counter) amrex::TinyProfiler BL_PROFILE_PASTE(tiny_profiler_, counter)((funame)); \
497 amrex::ignore_unused(BL_PROFILE_PASTE(tiny_profiler_, counter));
499#define BL_PROFILE_T(a, T)
500#define BL_PROFILE_S(fname)
501#define BL_PROFILE_T_S(fname, T)
503#define BL_PROFILE_VAR(fname, vname) amrex::TinyProfiler tiny_profiler_##vname((fname))
504#define BL_PROFILE_VAR_NS(fname, vname) amrex::TinyProfiler tiny_profiler_##vname(fname, false)
505#define BL_PROFILE_VAR_START(vname) tiny_profiler_##vname.start()
506#define BL_PROFILE_VAR_STOP(vname) tiny_profiler_##vname.stop()
507#define BL_PROFILE_INIT_PARAMS(ptl,wall,wfabs)
508#define BL_PROFILE_ADD_STEP(snum)
509#define BL_PROFILE_SET_RUN_TIME(rtime)
510#define BL_PROFILE_REGION(rname) \
511 AMREX_WARNING_PUSH_COUNTER \
512 amrex::TinyProfileRegion BL_PROFILE_PASTE(tiny_profile_region_, __COUNTER__)((rname)); \
514#define BL_PROFILE_REGION_START(rname)
515#define BL_PROFILE_REGION_STOP(rname)
518#define BL_PROFILE_REGION_VAR(fname, rvname)
519#define BL_PROFILE_REGION_VAR_START(fname, rvname)
520#define BL_PROFILE_REGION_VAR_STOP(fname, rvname)
521#define BL_PROFILE_TINY_FLUSH() amrex::TinyProfiler::Finalize(true); amrex::TinyProfiler::MemoryFinalize(true)
522#define BL_PROFILE_FLUSH()
523#define BL_TRACE_PROFILE_FLUSH()
524#define BL_TRACE_PROFILE_SETFLUSHSIZE(fsize)
525#define BL_PROFILE_CHANGE_FORT_INT_NAME(fname, intname)
552#define BL_PROFILE_INITIALIZE()
553#define BL_PROFILE_INITPARAMS()
554#define BL_PROFILE_FINALIZE()
556#define BL_TINY_PROFILE_INITIALIZE()
557#define BL_TINY_PROFILE_FINALIZE()
559#define BL_TINY_PROFILE_MEMORYINITIALIZE()
560#define BL_TINY_PROFILE_MEMORYFINALIZE()
563#define BL_PROFILE_T(a, T)
564#define BL_PROFILE_S(fname)
565#define BL_PROFILE_T_S(fname, T)
566#define BL_PROFILE_TIMER(var, a)
567#define BL_PROFILE_START(var)
568#define BL_PROFILE_STOP(var)
569#define BL_PROFILE_THIS_NAME()
571#define BL_PROFILE_VAR(fname, vname)
572#define BL_PROFILE_VAR_NS(fname, vname)
573#define BL_PROFILE_VAR_START(vname)
574#define BL_PROFILE_VAR_STOP(vname)
575#define BL_PROFILE_INIT_PARAMS(ptl,wall,wfabs)
576#define BL_PROFILE_ADD_STEP(snum)
577#define BL_PROFILE_SET_RUN_TIME(rtime)
578#define BL_PROFILE_REGION(rname)
579#define BL_PROFILE_REGION_START(rname)
580#define BL_PROFILE_REGION_STOP(rname)
581#define BL_PROFILE_REGION_VAR(fname, rvname)
582#define BL_PROFILE_REGION_VAR_START(fname, rvname)
583#define BL_PROFILE_REGION_VAR_STOP(fname, rvname)
584#define BL_PROFILE_TINY_FLUSH()
585#define BL_PROFILE_FLUSH()
586#define BL_TRACE_PROFILE_FLUSH()
587#define BL_TRACE_PROFILE_SETFLUSHSIZE(fsize)
588#define BL_PROFILE_CHANGE_FORT_INT_NAME(fname, intname)
596#ifndef BL_COMM_PROFILING
598#define BL_COMM_PROFILE(cft, size, pid, tag)
599#define BL_COMM_PROFILE_BARRIER(message, bc)
600#define BL_COMM_PROFILE_ALLREDUCE(cft, size, bc)
601#define BL_COMM_PROFILE_REDUCE(cft, size, pid)
602#define BL_COMM_PROFILE_WAIT(cft, reqs, status, bc)
603#define BL_COMM_PROFILE_WAITSOME(cft, reqs, completed, status, bc)
604#define BL_COMM_PROFILE_NAMETAG(message)
605#define BL_COMM_PROFILE_FILTER(cft)
606#define BL_COMM_PROFILE_UNFILTER(cft)
607#define BL_COMM_PROFILE_FLUSH()
608#define BL_COMM_PROFILE_SETFLUSHSIZE(fsize)
609#define BL_COMM_PROFILE_TAGRANGE(tagmin, tagmax)
610#define BL_COMM_PROFILE_TAGWRAP()
611#define BL_COMM_PROFILE_INITAMR(flev, mlev, rr, pd)
619#if (defined(BL_PROFILING) || defined(AMREX_TINY_PROFILING))
623 class BLProfileSync {
626 static void Sync()
noexcept;
627 static void Sync(
const std::string& name)
noexcept;
628 static void Sync(
const char* name)
noexcept;
630 static void InitParams();
632 static void StartSyncRegion()
noexcept;
633 static void StartSyncRegion(
const std::string& name)
noexcept;
634 static void StartSyncRegion(
const char* name)
noexcept;
635 static void EndSyncRegion()
noexcept;
638 static int sync_counter;
639 static int use_prof_syncs;
644#define BL_PROFILE_SYNC() amrex::BLProfileSync::Sync()
645#define BL_PROFILE_SYNC_TIMED(fname) amrex::BLProfileSync::Sync(fname)
646#define BL_PROFILE_SYNC_START() amrex::BLProfileSync::StartSyncRegion()
647#define BL_PROFILE_SYNC_START_TIMED(fname) amrex::BLProfileSync::StartSyncRegion(fname)
648#define BL_PROFILE_SYNC_STOP() amrex::BLProfileSync::EndSyncRegion()
652#define BL_PROFILE_SYNC()
653#define BL_PROFILE_SYNC_TIMED(fname)
654#define BL_PROFILE_SYNC_START()
655#define BL_PROFILE_SYNC_START_TIMED(fname)
656#define BL_PROFILE_SYNC_STOP()
667#if defined(AMREX_VTUNE)
669#define BL_TP_PROFILE_REGION_START() __itt_resume(); \
670amrex::Print() << "VTune regional recording has begun.\n";
671#define BL_TP_PROFILE_REGION_STOP() __itt_pause(); \
672amrex::Print() << "VTune regional recording has been stopped.\n";
674#elif defined(AMREX_CRAYPAT)
676#define BL_TP_PROFILE_REGION_START() PAT_record(PAT_STATE_ON); \
677amrex::Print() << "CrayPat regional recording has begun.\n";
678#define BL_TP_PROFILE_REGION_STOP() PAT_record(PAT_STATE_OFF); \
679amrex::Print() << "CrayPat regional recording has been stopped.\n";
681#elif defined(AMREX_FORGE)
683#define BL_TP_PROFILE_REGION_START() allinea_start_sampling(); \
684amrex::Print() << "MAP regional recording has begun.\n";
685#define BL_TP_PROFILE_REGION_STOP() allinea_stop_sampling(); \
686amrex::Print() << "MAP regional recording has begun.\n";
690#define BL_TP_PROFILE_REGION_START()
691#define BL_TP_PROFILE_REGION_STOP()
Runtime initialization/finalization helpers and global diagnostics.
Fixed-size array types for use on GPU and CPU.
Integer-lattice boxes and helpers for defining index-space regions.
Compiler- and backend-specific extension macros (e.g., restrict, SIMD, inline).
Definition AMReX_BLProfiler.H:535
BLProfiler(const std::string &)
Definition AMReX_BLProfiler.H:537
void start()
Definition AMReX_BLProfiler.H:543
static void Initialize()
Definition AMReX_BLProfiler.H:538
static void InitParams(const Real, const bool, const bool)
Definition AMReX_BLProfiler.H:545
static void WriteCommStats()
Definition AMReX_BLProfiler.H:542
static void AddStep(const int)
Definition AMReX_BLProfiler.H:547
static void Finalize()
Definition AMReX_BLProfiler.H:540
void stop()
Definition AMReX_BLProfiler.H:544
static void WriteStats(std::ostream &)
Definition AMReX_BLProfiler.H:541
static void InitParams()
Definition AMReX_BLProfiler.H:539
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:80
int MPI_Request
Definition AMReX_ccse-mpi.H:54
Definition AMReX_Amr.cpp:50
std::ostream & operator<<(std::ostream &os, AmrMesh const &amr_mesh)
Stream helper; forwards to the friend declared inside AmrMesh.
Definition AMReX_AmrMesh.cpp:1372