Peano
Loading...
Searching...
No Matches
toolbox::loadbalancing::Configuration Class Referenceabstract

Abstract interface to tweak the behaviour of the recursive subdivision. More...

#include <Configuration.h>

Inheritance diagram for toolbox::loadbalancing::Configuration:

Public Member Functions

virtual ~Configuration ()=default
 
virtual bool makeSplitDependOnMemory (State state)=0
 Use the operating system's memory queries to get the memory out and to veto too many local splits.
 
virtual int getMaxLocalTreesPerRank (State state)=0
 Constraint on the number of trees per rank.
 
virtual double getWorstCaseBalancingRatio (State state)=0
 Control when to balance between ranks.
 
virtual peano4::SplitInstruction::Mode getMode (State state)=0
 
virtual int getMinTreeSize (State state)=0
 Minimum tree size.
 
virtual std::string toString () const
 

Detailed Description

Abstract interface to tweak the behaviour of the recursive subdivision.

The idea is that the recursive subdivision internally makes decisions what it would do. These decisions then are tweaked/tailored via the configuration.

My default implementations all are stateless, but you can always add a state to the configuration and thus make it alter its answers depending on where you are in your code.

Definition at line 28 of file Configuration.h.

Constructor & Destructor Documentation

◆ ~Configuration()

virtual toolbox::loadbalancing::Configuration::~Configuration ( )
virtualdefault

Member Function Documentation

◆ getMaxLocalTreesPerRank()

virtual int toolbox::loadbalancing::Configuration::getMaxLocalTreesPerRank ( State state)
pure virtual

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.

Implemented in toolbox::loadbalancing::DefaultConfiguration, and exahype2::LoadBalancingConfiguration.

◆ getMinTreeSize()

virtual int toolbox::loadbalancing::Configuration::getMinTreeSize ( State state)
pure virtual

◆ getMode()

virtual peano4::SplitInstruction::Mode toolbox::loadbalancing::Configuration::getMode ( State state)
pure virtual

◆ getWorstCaseBalancingRatio()

virtual double toolbox::loadbalancing::Configuration::getWorstCaseBalancingRatio ( State state)
pure virtual

Control when to balance between ranks.

Implemented in toolbox::loadbalancing::DefaultConfiguration, and exahype2::LoadBalancingConfiguration.

◆ makeSplitDependOnMemory()

virtual bool toolbox::loadbalancing::Configuration::makeSplitDependOnMemory ( State state)
pure virtual

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.

Implemented in toolbox::loadbalancing::DefaultConfiguration, and exahype2::LoadBalancingConfiguration.

◆ toString()

std::string toolbox::loadbalancing::Configuration::toString ( ) const
virtual

Reimplemented in exahype2::LoadBalancingConfiguration.

Definition at line 5 of file Configuration.cpp.


The documentation for this class was generated from the following files: