![]() |
Peano
|
Cost metrics based solely on cell counts. More...
#include <CellCount.h>
Public Member Functions | |
CellCount () | |
virtual | ~CellCount ()=default |
virtual std::string | toString () const override |
Feel free to invoke the variant below if you want. | |
virtual void | updateGlobalView () override |
Please overwrite in subclass and set the value of _localRankWeight. | |
virtual double | getCostOfLocalTree (int spacetreeNumber) const override |
Query cost of one tree. | |
![]() | |
CostMetrics () | |
virtual | ~CostMetrics ()=default |
std::string | toString (const std::string &metricName) const |
virtual void | waitForGlobalDataExchange () |
Typically called by. | |
virtual double | getCostOfLocalRank () const |
Wrapper around getCostOfLocalTree(). | |
virtual double | getGlobalCost () const |
virtual int | getLightestRank () const |
virtual double | getMinimumOfMaximumRankWeights () const |
Additional Inherited Members | |
![]() | |
double | _localRankWeight |
Weight of local rank. | |
double | _globalWeight |
ReductionBuffer | _lightestRank |
double | _minimumOfMaximumOfRankWeights |
MPI_Request * | _globalWeightRequest |
Replicate compared to stats. | |
MPI_Request * | _lightestRankRequest |
MPI_Request * | _minimumOfMaximumOfRankWeightsRequest |
double | _globalWeightIn |
double | _globalWeightOut |
ReductionBuffer | _lightestRankIn |
ReductionBuffer | _lightestRankOut |
double | _minimumOfMaximumOfRankWeightsIn |
double | _minimumOfMaximumOfRankWeightsOut |
Cost metrics based solely on cell counts.
This is a very simple implementations which basically is based upon the mesh statistics that we have anyway. So the metrics do not require further user input.
Definition at line 23 of file CellCount.h.
toolbox::loadbalancing::metrics::CellCount::CellCount | ( | ) |
Definition at line 7 of file CellCount.cpp.
|
virtualdefault |
|
overridevirtual |
Query cost of one tree.
This routine is only called by the rank which owns the tree spacetreeNumber. That is, you don't need global knowledge of the tree weight distribution.
The routine is used in multiple places, but the most important one is toolbox::loadbalancing::AbstractLoadBalancing::getIdOfHeaviestLocalSpacetree(), which analyses the whole tree cost distribution on a rank.
Implements toolbox::loadbalancing::CostMetrics.
Definition at line 22 of file CellCount.cpp.
References peano4::parallel::SpacetreeSet::getGridStatistics(), peano4::parallel::SpacetreeSet::getInstance(), and peano4::grid::GridStatistics::getNumberOfLocalUnrefinedCells().
|
overridevirtual |
Feel free to invoke the variant below if you want.
Or add additional info.
Implements toolbox::loadbalancing::CostMetrics.
Definition at line 12 of file CellCount.cpp.
References toolbox::loadbalancing::CostMetrics::toString().
|
overridevirtual |
Please overwrite in subclass and set the value of _localRankWeight.
Afterwards, call this superclass routine
Reimplemented from toolbox::loadbalancing::CostMetrics.
Definition at line 17 of file CellCount.cpp.
References peano4::parallel::SpacetreeSet::getGridStatistics(), peano4::parallel::SpacetreeSet::getInstance(), peano4::grid::GridStatistics::getNumberOfLocalUnrefinedCells(), and toolbox::loadbalancing::CostMetrics::updateGlobalView().