MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / FillAllCallTimes

Method FillAllCallTimes

Src/Extern/ProfParser/AMReX_RegionsProfStats.cpp:593–632  ·  view source on GitHub ↗

----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

591
592// ----------------------------------------------------------------------
593void RegionsProfStats::FillAllCallTimes(Vector<Vector<Real> > &allCallTimes,
594 const std::string whichFuncName,
595 int whichFuncNumber, const Box &procBox)
596{
597 BL_PROFILE("RegionsProfStats::FillAllCallTimes");
598
599 int smallY(procBox.smallEnd(YDIR)), bigY(procBox.bigEnd(YDIR));
600 int proc;
601
602 for(int idb(0); idb < dataBlocks.size(); ++idb) {
603 DataBlock &dBlock = dataBlocks[idb];
604 proc = dBlock.proc;
605
606 if(proc >= smallY && proc <= bigY) { // ---- within from proc range
607 if (persistentStreams){
608 ReadBlockNoOpen(dBlock, false, true); // ---- only read trace data
609 }
610 else{
611 ReadBlock(dBlock, false, true); // ------ only read trace data
612 }
613 for(int i(0); i < dBlock.vCallStats.size(); ++i) {
614 BLProfiler::CallStats &cs = dBlock.vCallStats[i];
615 if(cs.csFNameNumber < 0) { // ---- the unused cs
616 continue;
617 }
618 if(InTimeRange(dBlock.proc, cs.callTime)) {
619 int remappedIndex(fnameRemap[dBlock.proc][cs.csFNameNumber]);
620 if(remappedIndex == whichFuncNumber) {
621 if(numbersToFName[remappedIndex] != whichFuncName) {
622 SHOWVAL(numbersToFName[remappedIndex]);
623 amrex::Abort("**** Error 0: fab whichFuncName");
624 }
625 allCallTimes[dBlock.proc].push_back(cs.stackTime);
626 }
627 }
628 }
629 ClearBlock(dBlock);
630 }
631 }
632}
633
634
635// ----------------------------------------------------------------------

Callers 1

RunACTPFMethod · 0.80

Calls 3

AbortFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected