![]() |
Peano
|
Blacklisting. More...
#include <Blacklist.h>
Data Structures | |
struct | BlacklistData |
Public Member Functions | |
Blacklist () | |
void | update () |
Update blacklist at end of traversal. | |
void | triggeredSplit (int newParent) |
Inform blacklist that the load balancing has just triggered a split. | |
std::string | toString () const |
bool | isBlacklisted (int treeNumber) const |
Private Attributes | |
std::map< int, BlacklistData > | _blacklist |
Map of trees numbers onto blacklist entries. | |
Static Private Attributes | |
static tarch::logging::Log | _log |
Blacklisting.
The recursive subdivision works with one tree at a time: It always identifies the one tree with the biggest load and subdivides this one further. A tree however requires two traversals to split. If a tree is identified as split candidate, the code hence will tell it to split, but will try to split exactly the same tree again in the subsequent iteration.
The tree's stats (how many cells does it own) at this point are skewed, as the tree has not yet successfully given away cells. Indeed, a tree needs at least three iterations to 'recover'. The first one initialises the split. The second traversal conducts the split and eventually moves around data, but the ownership in this traversal still is with the master. Therefore, the master still has all the local cells. After the third split, the master has actually given away its cells.
Therefore, we work with a blacklist map: Whenever we have identified a tree that is to be split, we memorise it and give it an internal weight of 3. Memorise means it is stored in a map. As long as a rank is on the blacklist map, it may not be selected as potential split tree. After each iteration, we reduce the weight of the blacklisted trees by one. If a weight becomes zero, we eventually remove it from the blacklist.
Definition at line 45 of file Blacklist.h.
toolbox::loadbalancing::Blacklist::Blacklist | ( | ) |
Definition at line 18 of file Blacklist.cpp.
Definition at line 51 of file Blacklist.cpp.
References _blacklist.
std::string toolbox::loadbalancing::Blacklist::toString | ( | ) | const |
Definition at line 22 of file Blacklist.cpp.
References _blacklist.
Inform blacklist that the load balancing has just triggered a split.
newParent is the number of the tree which has triggered this split.
Definition at line 84 of file Blacklist.cpp.
References _blacklist, and logDebug.
void toolbox::loadbalancing::Blacklist::update | ( | ) |
Update blacklist at end of traversal.
Definition at line 57 of file Blacklist.cpp.
References _blacklist, peano4::parallel::SpacetreeSet::getGridStatistics(), peano4::parallel::SpacetreeSet::getInstance(), peano4::grid::GridStatistics::getNumberOfLocalUnrefinedCells(), peano4::grid::GridStatistics::getRemovedEmptySubtree(), and logInfo.
|
private |
Map of trees numbers onto blacklist entries.
Being in that map does not necessarily mean a tree is blacklisted. For this, we have to study its lifetime counter.
Definition at line 111 of file Blacklist.h.
Referenced by isBlacklisted(), toString(), triggeredSplit(), and update().
|
staticprivate |
Definition at line 102 of file Blacklist.h.