![]() |
Peano
|
Cost metrics based solely on cell counts. More...
#include <CustomCellWeight.h>
Public Member Functions | |
CustomCellWeight () | |
virtual | ~CustomCellWeight ()=default |
virtual std::string | toString () const override |
Feel free to invoke the variant below if you want. | |
virtual void | updateGlobalView () override |
Update global view. | |
virtual double | getCostOfLocalTree (int spacetreeNumber) const override |
Implementation of abstract superclass routine. | |
![]() | |
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 |
Static Public Member Functions | |
static void | logCellWeight (int spacetreeNumber, double weight) |
Report weight of one cell. | |
Static Private Attributes | |
static tarch::multicore::BooleanSemaphore | _semaphore |
static tarch::logging::Log | _log |
static std::map< int, double > | _previousCellWeights |
Mapping of trees onto cell weights. | |
static std::map< int, double > | _currentCellWeights |
Mapping of trees onto cell weights. | |
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 29 of file CustomCellWeight.h.
toolbox::loadbalancing::metrics::CustomCellWeight::CustomCellWeight | ( | ) |
Definition at line 16 of file CustomCellWeight.cpp.
|
virtualdefault |
|
overridevirtual |
Implementation of abstract superclass routine.
Deliver the requested entry from _previousCellWeights. If no such entry exists, we return 0.0. As this is a read-only access, we don't need a semaphore.
Implements toolbox::loadbalancing::CostMetrics.
Definition at line 40 of file CustomCellWeight.cpp.
|
static |
Report weight of one cell.
This routine is thread-safe, as it will be invoked by multiple tree traversals at the same time. It accumulates data within _currentCellWeights.
Definition at line 50 of file CustomCellWeight.cpp.
References tarch::multicore::Lock::free().
|
overridevirtual |
Feel free to invoke the variant below if you want.
Or add additional info.
Implements toolbox::loadbalancing::CostMetrics.
Definition at line 20 of file CustomCellWeight.cpp.
References toolbox::loadbalancing::CostMetrics::toString().
|
overridevirtual |
Update global view.
This routine runs through four steps:
Reimplemented from toolbox::loadbalancing::CostMetrics.
Definition at line 25 of file CustomCellWeight.cpp.
References toolbox::loadbalancing::CostMetrics::updateGlobalView().
|
staticprivate |
Mapping of trees onto cell weights.
This is a working data structure, i.e. one we use to accumulate data into. The current data hence might still be incomplete when you read it. As we accumulate data from the local rank only, we do not hold global information, i.e. information from other ranks.
Definition at line 85 of file CustomCellWeight.h.
|
staticprivate |
Definition at line 70 of file CustomCellWeight.h.
|
staticprivate |
Mapping of trees onto cell weights.
These are the one from a previous tree traversal and hence complete data which we can use to read.
Definition at line 76 of file CustomCellWeight.h.
|
staticprivate |
Definition at line 69 of file CustomCellWeight.h.