72 logInfo(
"updateLoadBalancing()",
"load balancing's state=" <<
toString());
77 int heaviestSpacetree = getIdOfHeaviestLocalSpacetree(_configuration->getWorstCaseBalancingRatio(
_state));
82 heaviestSpacetree!=NoHeaviestTreeAvailable
84 not _blacklist.isBlacklisted(heaviestSpacetree)
86 numberOfLocalUnrefinedCellsOfHeaviestSpacetree > _configuration->getMinTreeSize(
_state)
90 int cellsPerCore = std::max(
91 {1, numberOfLocalUnrefinedCellsOfHeaviestSpacetree / 2, _configuration->getMinTreeSize(
_state)}
95 "updateLoadBalancing()",
96 "Not all ranks are used. Lightest global rank is rank " << _costMetrics->getLightestRank(
97 ) <<
", so assign this rank " << cellsPerCore <<
" cell(s)"
99 triggerSplit(heaviestSpacetree, cellsPerCore, _costMetrics->getLightestRank());
100 }
else if (heaviestSpacetree != NoHeaviestTreeAvailable) {
102 "updateLoadBalancing()",
103 "can't split heaviest tree " << heaviestSpacetree <<
" even though this tree is too heavy"
108 int heaviestSpacetree = getIdOfHeaviestLocalSpacetree();
113 heaviestSpacetree!=NoHeaviestTreeAvailable
115 not _blacklist.isBlacklisted(heaviestSpacetree)
117 numberOfLocalUnrefinedCellsOfHeaviestSpacetree > _configuration->getMinTreeSize(
_state)
120 "updateLoadBalancing()",
121 "biggest local tree "
122 << heaviestSpacetree <<
" is too heavy as it hosts " << numberOfLocalUnrefinedCellsOfHeaviestSpacetree
125 int cellsPerCore = std::max(
126 {1, numberOfLocalUnrefinedCellsOfHeaviestSpacetree / 2, _configuration->getMinTreeSize(
_state)}
130 "updateLoadBalancing()",
131 "lightest global rank is rank "
132 << _costMetrics->getLightestRank() <<
", so assign this rank " << cellsPerCore <<
" cell(s)"
134 triggerSplit(heaviestSpacetree, cellsPerCore, _costMetrics->getLightestRank());
135 }
else if (heaviestSpacetree != NoHeaviestTreeAvailable) {
137 "updateLoadBalancing()",
138 "can't split heaviest tree "
140 <<
" and fork off to remote rank as this tree is on the blacklist or split does not fit into local memory anymore"
145 int heaviestSpacetree = getIdOfHeaviestLocalSpacetree();
150 heaviestSpacetree!=NoHeaviestTreeAvailable
152 not _blacklist.isBlacklisted(heaviestSpacetree)
154 numberOfLocalUnrefinedCellsOfHeaviestSpacetree > _configuration->getMinTreeSize(
_state)
156 int cellsPerCore = std::max(
157 {1, numberOfLocalUnrefinedCellsOfHeaviestSpacetree / 2, _configuration->getMinTreeSize(
_state)}
160 "updateLoadBalancing()",
"split tree on local rank and assign it " << cellsPerCore <<
" cell(s)" <<
toString()
163 }
else if (heaviestSpacetree != NoHeaviestTreeAvailable) {
165 "updateLoadBalancing()",
166 "can't split heaviest tree "
168 <<
" on local rank as this tree is on the blacklist or split does not fit into local memory anymore"