ExaHyPE 2-specific load balancing configuration.
More...
#include <LoadBalancingConfiguration.h>
ExaHyPE 2-specific load balancing configuration.
Definition at line 19 of file LoadBalancingConfiguration.h.
◆ LoadBalancingConfiguration()
Configure load balancing.
- Parameters
-
| minSizeOfTree | If a partition (tree) is smaller than the given number of cells, we do not split it up further. If you set this argument to 0, you effectively set no threshold - Peano will try to split any tree if it thinks it would improve the load balancing. |
This value is not taken into account for the initial distribution. Here, you have to use maxNumberOfTreesThroughoutInitialDistribution to constrain over-ambitious domain splitting.
- Parameters
-
| maxNumberOfTreesThroughoutInitialDistribution | Set the maximum number of trees (per rank) that we use when we split up the domain no a rank for the first time. By default, I try to give each thread per rank exactly one subpartition to work on. You might want to reduce this value. |
| maxNumberOfTrees | This value is used after the initial decomposition. If you pick it higher than maxNumberOfTreesThroughoutInitialDistribution, then you give the load balancing the opportunity to split up the domain further even if all threads have already one subpartition. I recommend to to pick it higher than maxNumberOfTreesThroughoutInitialDistribution, as the load balancer kicks in throughout the grid construction. By the time is uses maxNumberOfTreesThroughoutInitialDistribution threads, local adaptivity might not yet be established, i.e. subsequent grid refinements will yield imbalances that only further splits can compensate. |
◆ ~LoadBalancingConfiguration()
| virtual exahype2::LoadBalancingConfiguration::~LoadBalancingConfiguration |
( |
| ) |
|
|
virtualdefault |
◆ getMaxLocalTreesPerRank()
Constraint on the number of trees per rank.
The number is always constrained by peano4::parallel::Node::MaxSpacetreesPerRank, but you can cut it down further.
You can use an arbitary large value if you don't care bout a maximum number of subpartitions per rank. I however do recommend that you return peano4::parallel::Node::MaxSpacetreesPerRank.
Implements toolbox::loadbalancing::Configuration.
◆ getMinTreeSize()
◆ getMode()
◆ getWorstCaseBalancingRatio()
◆ makeSplitDependOnMemory()
Use the operating system's memory queries to get the memory out and to veto too many local splits.
Each split creates some overhead, so it can happen that we run out of memory.
Implements toolbox::loadbalancing::Configuration.
◆ toString()
| virtual std::string exahype2::LoadBalancingConfiguration::toString |
( |
| ) |
const |
|
overridevirtual |
◆ translateSetMaxNumberOfTreesIntoRealNumberOfTrees()
| int exahype2::LoadBalancingConfiguration::translateSetMaxNumberOfTreesIntoRealNumberOfTrees |
( |
int | value | ) |
const |
|
private |
Return how many trees to use if value is picked by user.
If the users sets a real number >0 for the upper number of trees, then we pick this value. However, if the users picks a magic constant, then we have to read out the real system configuration and translate it into a real number, i.e. if the user has picked UseNumberOfThreads for example, then we have to ask the core how many threads we really have and return that value.
◆ _assumePeriodicBoundaryConditions
| const bool exahype2::LoadBalancingConfiguration::_assumePeriodicBoundaryConditions |
|
private |
◆ _loadBalancingQuality
| const double exahype2::LoadBalancingConfiguration::_loadBalancingQuality |
|
private |
◆ _log
◆ _maxNumberOfTrees
| const int exahype2::LoadBalancingConfiguration::_maxNumberOfTrees |
|
private |
◆ _maxNumberOfTreesThroughoutInitialDistribution
| const int exahype2::LoadBalancingConfiguration::_maxNumberOfTreesThroughoutInitialDistribution |
|
private |
◆ _minSizeOfTree
| const int exahype2::LoadBalancingConfiguration::_minSizeOfTree |
|
private |
◆ _mode
◆ UseNumberOfThreads
| constexpr int exahype2::LoadBalancingConfiguration::UseNumberOfThreads = -1 |
|
staticconstexpr |
◆ UseTwiceTheNumberOfThreads
| constexpr int exahype2::LoadBalancingConfiguration::UseTwiceTheNumberOfThreads = -2 |
|
staticconstexpr |
The documentation for this class was generated from the following file: