Peano
Loading...
Searching...
No Matches
Statistics.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include "tarch/mpi/mpi.h"
7#include "tarch/logging/Log.h"
8#include "tarch/mpi/Rank.h"
9
10
11#include "State.h"
12
13
14namespace toolbox {
15 namespace loadbalancing {
16 class Statistics;
17 }
18}
19
20
21
31 public:
35 Statistics();
36
37 std::string toString() const;
38
49
50 void updateGlobalView();
51
55 int getGlobalNumberOfTrees() const;
57 int getMaximumTreesPerRank() const;
58
59 void incLocalNumberOfSplits( int delta=1 );
60
62
68 bool hasConsistentViewOfWorld() const;
69
70 private:
72
77
82
84
86
88
95
101
103
105
107
108 #ifdef Parallel
112 MPI_Request* _globalSumRequest;
117 #endif
118
129
130};
131
132
AutomatonState state
Log Device.
Definition Log.h:516
Statistics helper routine for load balancing.
Definition Statistics.h:30
int _localNumberOfSplits
This is my local accumulator where I keep track of how often I did split in this iteration.
Definition Statistics.h:94
int _globalNumberOfInnerUnrefinedCells
Required for local stats, but also replicated in cell count metrics.
Definition Statistics.h:81
int getGlobalNumberOfRanksWithEnabledLoadBalancing() const
bool hasConsistentViewOfWorld() const
If the stats spot some inconsistencies (local number of cells is bigger than global number,...
MPI_Request * _globalNumberOfRanksWithEnabledLoadBalancingRequest
Definition Statistics.h:115
int _globalNumberOfSplits
Lags behind global number by one iteration in an MPI world as data will arrive with one iteration del...
Definition Statistics.h:100
MPI_Request * _globalSumRequest
Required for local stats, but also replicated in cell count metrics.
Definition Statistics.h:112
static tarch::logging::Log _log
Definition Statistics.h:71
int _localNumberOfInnerUnrefinedCells
Required for local stats, but also replicated in cell count metrics.
Definition Statistics.h:76
void incLocalNumberOfSplits(int delta=1)
void waitForGlobalDataExchange()
Typically called by.
MPI_Request * _globalMaximumTreesPerRankRequest
Definition Statistics.h:116
void notifyOfStateChange(State state)
Statistics()
Set all the MPI requests to nullptr.
State
State descriptor of load balancing.
Definition State.h:22