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

Method ReportSyncPointDataSetup

Src/Extern/ProfParser/AMReX_CommProfStats.cpp:765–786  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

763
764// ----------------------------------------------------------------------
765void CommProfStats::ReportSyncPointDataSetup(long &nBMax, long &nRMax)
766{
767 Vector<long> nBarriers(dataNProcs, 0L);
768 Vector<long> nReductions(dataNProcs, 0L);
769 for(int idb(0); idb < dataBlocks.size(); ++idb) {
770 DataBlock &dBlock = dataBlocks[idb];
771 int proc(dBlock.proc);
772
773 for(int idbb(0); idbb < dBlock.barriers.size(); ++idbb) {
774 BarrierEntry &be = dBlock.barriers[idbb];
775 nBarriers[proc] = std::max(nBarriers[proc], be.number);
776 }
777 for(int idbb(0); idbb < dBlock.reductions.size(); ++idbb) {
778 ReductionEntry &re = dBlock.reductions[idbb];
779 nReductions[proc] = std::max(nReductions[proc], re.number);
780 }
781 }
782 //nBMin = *std::min_element(nBarriers.begin(), nBarriers.end());
783 nBMax = *std::ranges::max_element(nBarriers);
784 //nRMin = *std::min_element(nReductions.begin(), nReductions.end());
785 nRMax = *std::ranges::max_element(nReductions);
786}
787
788
789// ----------------------------------------------------------------------

Callers 1

RunSyncPointDataMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected