![]() |
Peano
|
Statistics helper routine for load balancing. More...
#include <Statistics.h>
Public Member Functions | |
Statistics () | |
Set all the MPI requests to nullptr. | |
std::string | toString () const |
void | waitForGlobalDataExchange () |
Typically called by. | |
void | updateGlobalView () |
int | getLocalNumberOfInnerUnrefinedCells () const |
int | getGlobalNumberOfInnerUnrefinedCells () const |
int | getGlobalNumberOfRanksWithEnabledLoadBalancing () const |
int | getGlobalNumberOfTrees () const |
int | getNumberOfStateUpdatesWithoutAnySplit () const |
int | getMaximumTreesPerRank () const |
void | incLocalNumberOfSplits (int delta=1) |
void | notifyOfStateChange (State state) |
bool | hasConsistentViewOfWorld () const |
If the stats spot some inconsistencies (local number of cells is bigger than global number, e.g.) this means that the non-blocking data exchange is lagging behind. | |
Static Private Attributes | |
static tarch::logging::Log | _log |
Statistics helper routine for load balancing.
Please note that we assume a SPMD paradigm, i.e. if one rank uses statistics, the other ranks all have to use such an object, too. The individual objects communicate with each other.
Definition at line 30 of file Statistics.h.
toolbox::loadbalancing::Statistics::Statistics | ( | ) |
Set all the MPI requests to nullptr.
Definition at line 10 of file Statistics.cpp.
References _globalMaximumTreesPerRankRequest, _globalNumberOfRanksWithEnabledLoadBalancingRequest, _globalNumberOfSplitsRequest, _globalNumberOfTreesRequest, and _globalSumRequest.
int toolbox::loadbalancing::Statistics::getGlobalNumberOfInnerUnrefinedCells | ( | ) | const |
Definition at line 193 of file Statistics.cpp.
int toolbox::loadbalancing::Statistics::getGlobalNumberOfRanksWithEnabledLoadBalancing | ( | ) | const |
Definition at line 198 of file Statistics.cpp.
int toolbox::loadbalancing::Statistics::getGlobalNumberOfTrees | ( | ) | const |
Definition at line 203 of file Statistics.cpp.
int toolbox::loadbalancing::Statistics::getLocalNumberOfInnerUnrefinedCells | ( | ) | const |
Definition at line 188 of file Statistics.cpp.
int toolbox::loadbalancing::Statistics::getMaximumTreesPerRank | ( | ) | const |
Definition at line 208 of file Statistics.cpp.
int toolbox::loadbalancing::Statistics::getNumberOfStateUpdatesWithoutAnySplit | ( | ) | const |
Definition at line 213 of file Statistics.cpp.
bool toolbox::loadbalancing::Statistics::hasConsistentViewOfWorld | ( | ) | const |
If the stats spot some inconsistencies (local number of cells is bigger than global number, e.g.) this means that the non-blocking data exchange is lagging behind.
In this case, this routine returns false;
Definition at line 218 of file Statistics.cpp.
Definition at line 182 of file Statistics.cpp.
References assertion.
Definition at line 29 of file Statistics.cpp.
References state, and toolbox::loadbalancing::SwitchedOff.
Referenced by toolbox::loadbalancing::strategies::NoLoadBalancing::NoLoadBalancing(), toolbox::loadbalancing::strategies::RecursiveBipartition::RecursiveBipartition(), toolbox::loadbalancing::strategies::SplitOversizedTree::SplitOversizedTree(), toolbox::loadbalancing::strategies::SpreadOut::SpreadOut(), toolbox::loadbalancing::strategies::SpreadOutHierarchically::SpreadOutHierarchically(), and toolbox::loadbalancing::strategies::SpreadOutOnceGridStagnates::SpreadOutOnceGridStagnates().
std::string toolbox::loadbalancing::Statistics::toString | ( | ) | const |
Definition at line 34 of file Statistics.cpp.
void toolbox::loadbalancing::Statistics::updateGlobalView | ( | ) |
Definition at line 78 of file Statistics.cpp.
References peano4::parallel::SpacetreeSet::getGridStatistics(), peano4::parallel::SpacetreeSet::getInstance(), tarch::mpi::Rank::getInstance(), peano4::parallel::SpacetreeSet::getLocalSpacetrees(), peano4::grid::GridStatistics::getNumberOfLocalUnrefinedCells(), and logInfo.
void toolbox::loadbalancing::Statistics::waitForGlobalDataExchange | ( | ) |
Typically called by.
but we also call it from updateGlobalView() before we issue new collective MPI calls.
Definition at line 53 of file Statistics.cpp.
|
private |
Definition at line 116 of file Statistics.h.
Referenced by Statistics().
|
private |
Required for local stats, but also replicated in cell count metrics.
Definition at line 81 of file Statistics.h.
|
private |
Definition at line 119 of file Statistics.h.
|
private |
Definition at line 120 of file Statistics.h.
|
private |
Definition at line 85 of file Statistics.h.
|
private |
Definition at line 115 of file Statistics.h.
Referenced by Statistics().
|
private |
Lags behind global number by one iteration in an MPI world as data will arrive with one iteration delay.
Definition at line 100 of file Statistics.h.
|
private |
Definition at line 113 of file Statistics.h.
Referenced by Statistics().
|
private |
Definition at line 83 of file Statistics.h.
|
private |
Definition at line 114 of file Statistics.h.
Referenced by Statistics().
|
private |
Required for local stats, but also replicated in cell count metrics.
Definition at line 112 of file Statistics.h.
Referenced by Statistics().
|
private |
Definition at line 87 of file Statistics.h.
|
private |
Required for local stats, but also replicated in cell count metrics.
Definition at line 76 of file Statistics.h.
|
private |
This is my local accumulator where I keep track of how often I did split in this iteration.
At the end of each iteration, I roll this one over into global or send it out.
Definition at line 94 of file Statistics.h.
|
staticprivate |
Definition at line 71 of file Statistics.h.
|
private |
Definition at line 128 of file Statistics.h.
|
private |
Definition at line 104 of file Statistics.h.
|
private |
Definition at line 127 of file Statistics.h.
|
private |
Definition at line 125 of file Statistics.h.
|
private |
Definition at line 126 of file Statistics.h.
|
private |
Definition at line 121 of file Statistics.h.
|
private |
Definition at line 122 of file Statistics.h.
|
private |
Definition at line 102 of file Statistics.h.
|
private |
Definition at line 123 of file Statistics.h.
|
private |
Definition at line 124 of file Statistics.h.
|
private |
Definition at line 106 of file Statistics.h.