Peano
Loading...
Searching...
No Matches
toolbox::loadbalancing::Statistics Class Reference

Statistics helper routine for load balancing. More...

#include <Statistics.h>

Collaboration diagram for toolbox::loadbalancing::Statistics:

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.
 

Private Attributes

int _localNumberOfInnerUnrefinedCells
 Required for local stats, but also replicated in cell count metrics.
 
int _globalNumberOfInnerUnrefinedCells
 Required for local stats, but also replicated in cell count metrics.
 
int _globalNumberOfTrees
 
int _globalNumberOfRanksWithEnabledLoadBalancing
 
bool _localLoadBalancingEnabled
 
int _localNumberOfSplits
 This is my local accumulator where I keep track of how often I did split in this iteration.
 
int _globalNumberOfSplits
 Lags behind global number by one iteration in an MPI world as data will arrive with one iteration delay.
 
int _numberOfStateUpdatesWithoutAnySplit
 
int _maximumTreesPerRank
 
bool _viewConsistent
 
MPI_Request * _globalSumRequest
 Required for local stats, but also replicated in cell count metrics.
 
MPI_Request * _globalNumberOfSplitsRequest
 
MPI_Request * _globalNumberOfTreesRequest
 
MPI_Request * _globalNumberOfRanksWithEnabledLoadBalancingRequest
 
MPI_Request * _globalMaximumTreesPerRankRequest
 
int _globalNumberOfInnerUnrefinedCellsBufferIn
 
int _globalNumberOfInnerUnrefinedCellsBufferOut
 
int _numberOfSplitsIn
 
int _numberOfSplitsOut
 
int _numberOfTreesIn
 
int _numberOfTreesOut
 
int _numberOfRanksWithEnabledLoadBalancingIn
 
int _numberOfRanksWithEnabledLoadBalancingOut
 
int _numberOfMaximumTreesOut
 
int _maximumTreesIn
 

Static Private Attributes

static tarch::logging::Log _log
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Statistics()

toolbox::loadbalancing::Statistics::Statistics ( )

Member Function Documentation

◆ getGlobalNumberOfInnerUnrefinedCells()

int toolbox::loadbalancing::Statistics::getGlobalNumberOfInnerUnrefinedCells ( ) const

Definition at line 193 of file Statistics.cpp.

◆ getGlobalNumberOfRanksWithEnabledLoadBalancing()

int toolbox::loadbalancing::Statistics::getGlobalNumberOfRanksWithEnabledLoadBalancing ( ) const

Definition at line 198 of file Statistics.cpp.

◆ getGlobalNumberOfTrees()

int toolbox::loadbalancing::Statistics::getGlobalNumberOfTrees ( ) const

Definition at line 203 of file Statistics.cpp.

◆ getLocalNumberOfInnerUnrefinedCells()

int toolbox::loadbalancing::Statistics::getLocalNumberOfInnerUnrefinedCells ( ) const

Definition at line 188 of file Statistics.cpp.

◆ getMaximumTreesPerRank()

int toolbox::loadbalancing::Statistics::getMaximumTreesPerRank ( ) const

Definition at line 208 of file Statistics.cpp.

◆ getNumberOfStateUpdatesWithoutAnySplit()

int toolbox::loadbalancing::Statistics::getNumberOfStateUpdatesWithoutAnySplit ( ) const

Definition at line 213 of file Statistics.cpp.

◆ hasConsistentViewOfWorld()

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.

◆ incLocalNumberOfSplits()

void toolbox::loadbalancing::Statistics::incLocalNumberOfSplits ( int delta = 1)

Definition at line 182 of file Statistics.cpp.

References assertion.

◆ notifyOfStateChange()

◆ toString()

std::string toolbox::loadbalancing::Statistics::toString ( ) const

Definition at line 34 of file Statistics.cpp.

◆ updateGlobalView()

◆ waitForGlobalDataExchange()

void toolbox::loadbalancing::Statistics::waitForGlobalDataExchange ( )

Typically called by.

  • finishSimulation() and
  • finishStep()

but we also call it from updateGlobalView() before we issue new collective MPI calls.

Definition at line 53 of file Statistics.cpp.

Field Documentation

◆ _globalMaximumTreesPerRankRequest

MPI_Request* toolbox::loadbalancing::Statistics::_globalMaximumTreesPerRankRequest
private

Definition at line 116 of file Statistics.h.

Referenced by Statistics().

◆ _globalNumberOfInnerUnrefinedCells

int toolbox::loadbalancing::Statistics::_globalNumberOfInnerUnrefinedCells
private

Required for local stats, but also replicated in cell count metrics.

Definition at line 81 of file Statistics.h.

◆ _globalNumberOfInnerUnrefinedCellsBufferIn

int toolbox::loadbalancing::Statistics::_globalNumberOfInnerUnrefinedCellsBufferIn
private

Definition at line 119 of file Statistics.h.

◆ _globalNumberOfInnerUnrefinedCellsBufferOut

int toolbox::loadbalancing::Statistics::_globalNumberOfInnerUnrefinedCellsBufferOut
private

Definition at line 120 of file Statistics.h.

◆ _globalNumberOfRanksWithEnabledLoadBalancing

int toolbox::loadbalancing::Statistics::_globalNumberOfRanksWithEnabledLoadBalancing
private

Definition at line 85 of file Statistics.h.

◆ _globalNumberOfRanksWithEnabledLoadBalancingRequest

MPI_Request* toolbox::loadbalancing::Statistics::_globalNumberOfRanksWithEnabledLoadBalancingRequest
private

Definition at line 115 of file Statistics.h.

Referenced by Statistics().

◆ _globalNumberOfSplits

int toolbox::loadbalancing::Statistics::_globalNumberOfSplits
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.

◆ _globalNumberOfSplitsRequest

MPI_Request* toolbox::loadbalancing::Statistics::_globalNumberOfSplitsRequest
private

Definition at line 113 of file Statistics.h.

Referenced by Statistics().

◆ _globalNumberOfTrees

int toolbox::loadbalancing::Statistics::_globalNumberOfTrees
private

Definition at line 83 of file Statistics.h.

◆ _globalNumberOfTreesRequest

MPI_Request* toolbox::loadbalancing::Statistics::_globalNumberOfTreesRequest
private

Definition at line 114 of file Statistics.h.

Referenced by Statistics().

◆ _globalSumRequest

MPI_Request* toolbox::loadbalancing::Statistics::_globalSumRequest
private

Required for local stats, but also replicated in cell count metrics.

Definition at line 112 of file Statistics.h.

Referenced by Statistics().

◆ _localLoadBalancingEnabled

bool toolbox::loadbalancing::Statistics::_localLoadBalancingEnabled
private

Definition at line 87 of file Statistics.h.

◆ _localNumberOfInnerUnrefinedCells

int toolbox::loadbalancing::Statistics::_localNumberOfInnerUnrefinedCells
private

Required for local stats, but also replicated in cell count metrics.

Definition at line 76 of file Statistics.h.

◆ _localNumberOfSplits

int toolbox::loadbalancing::Statistics::_localNumberOfSplits
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.

◆ _log

tarch::logging::Log toolbox::loadbalancing::Statistics::_log
staticprivate

Definition at line 71 of file Statistics.h.

◆ _maximumTreesIn

int toolbox::loadbalancing::Statistics::_maximumTreesIn
private

Definition at line 128 of file Statistics.h.

◆ _maximumTreesPerRank

int toolbox::loadbalancing::Statistics::_maximumTreesPerRank
private

Definition at line 104 of file Statistics.h.

◆ _numberOfMaximumTreesOut

int toolbox::loadbalancing::Statistics::_numberOfMaximumTreesOut
private

Definition at line 127 of file Statistics.h.

◆ _numberOfRanksWithEnabledLoadBalancingIn

int toolbox::loadbalancing::Statistics::_numberOfRanksWithEnabledLoadBalancingIn
private

Definition at line 125 of file Statistics.h.

◆ _numberOfRanksWithEnabledLoadBalancingOut

int toolbox::loadbalancing::Statistics::_numberOfRanksWithEnabledLoadBalancingOut
private

Definition at line 126 of file Statistics.h.

◆ _numberOfSplitsIn

int toolbox::loadbalancing::Statistics::_numberOfSplitsIn
private

Definition at line 121 of file Statistics.h.

◆ _numberOfSplitsOut

int toolbox::loadbalancing::Statistics::_numberOfSplitsOut
private

Definition at line 122 of file Statistics.h.

◆ _numberOfStateUpdatesWithoutAnySplit

int toolbox::loadbalancing::Statistics::_numberOfStateUpdatesWithoutAnySplit
private

Definition at line 102 of file Statistics.h.

◆ _numberOfTreesIn

int toolbox::loadbalancing::Statistics::_numberOfTreesIn
private

Definition at line 123 of file Statistics.h.

◆ _numberOfTreesOut

int toolbox::loadbalancing::Statistics::_numberOfTreesOut
private

Definition at line 124 of file Statistics.h.

◆ _viewConsistent

bool toolbox::loadbalancing::Statistics::_viewConsistent
private

Definition at line 106 of file Statistics.h.


The documentation for this class was generated from the following files: