Peano
Loading...
Searching...
No Matches
LoadBalancingConfiguration.h
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 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/logging/Log.h"
8
9
10namespace exahype2 {
11 class LoadBalancingConfiguration;
12}
13
14
20 private:
22
24 const int _minSizeOfTree;
29
41
42 public:
43 static constexpr int UseNumberOfThreads = -1;
44 static constexpr int UseTwiceTheNumberOfThreads = -2;
45
77 double loadBalancingQuality=0.9,
78 int minSizeOfTree = 0,
79 bool assumePeriodicBoundaryConditions = false,
80 int maxNumberOfTreesThroughoutInitialDistribution=UseNumberOfThreads,
81 int maxNumberOfTrees=UseTwiceTheNumberOfThreads,
83 );
84
85 virtual ~LoadBalancingConfiguration() = default;
86
88
90
92
98
99 virtual std::string toString() const override;
100
102};
103
104
AutomatonState state
ExaHyPE 2-specific load balancing configuration.
virtual bool makeSplitDependOnMemory(toolbox::loadbalancing::State state) override
Use the operating system's memory queries to get the memory out and to veto too many local splits.
virtual int getMinTreeSize(toolbox::loadbalancing::State state) override
If we do the initial distribution in-between ranks, then there should be no such thing as a min tree ...
virtual ~LoadBalancingConfiguration()=default
const peano4::SplitInstruction::Mode _mode
int translateSetMaxNumberOfTreesIntoRealNumberOfTrees(int value) const
Return how many trees to use if value is picked by user.
virtual std::string toString() const override
virtual int getMaxLocalTreesPerRank(toolbox::loadbalancing::State state) override
Constraint on the number of trees per rank.
virtual peano4::SplitInstruction::Mode getMode(toolbox::loadbalancing::State state) override
virtual double getWorstCaseBalancingRatio(toolbox::loadbalancing::State state) override
Control when to balance between ranks.
LoadBalancingConfiguration(double loadBalancingQuality=0.9, int minSizeOfTree=0, bool assumePeriodicBoundaryConditions=false, int maxNumberOfTreesThroughoutInitialDistribution=UseNumberOfThreads, int maxNumberOfTrees=UseTwiceTheNumberOfThreads, peano4::SplitInstruction::Mode mode=peano4::SplitInstruction::Mode::BottomUp)
Configure load balancing.
Log Device.
Definition Log.h:516
Abstract interface to tweak the behaviour of the recursive subdivision.
For the generic kernels that I use here most of the time.
Definition CellAccess.h:13
State
State descriptor of load balancing.
Definition State.h:22