Peano
Loading...
Searching...
No Matches
toolbox::loadbalancing::DefaultConfiguration Class Reference

#include <Configuration.h>

Inheritance diagram for toolbox::loadbalancing::DefaultConfiguration:
Collaboration diagram for toolbox::loadbalancing::DefaultConfiguration:

Public Member Functions

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

Private Attributes

const int _maxTreesPerRank
 

Detailed Description

Definition at line 66 of file Configuration.h.

Constructor & Destructor Documentation

◆ DefaultConfiguration()

toolbox::loadbalancing::DefaultConfiguration::DefaultConfiguration ( int maxTreesPerRank = 0)

Create default configuration.

If you don't specify how many trees you allow per rank, then the code will try to maximise the utilisation.

Member Function Documentation

◆ getMaxLocalTreesPerRank()

virtual int toolbox::loadbalancing::DefaultConfiguration::getMaxLocalTreesPerRank ( State state)
overridevirtual

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()

virtual int toolbox::loadbalancing::DefaultConfiguration::getMinTreeSize ( State state)
overridevirtual

Minimum tree size.

Implements toolbox::loadbalancing::Configuration.

◆ getMode()

virtual peano4::SplitInstruction::Mode toolbox::loadbalancing::DefaultConfiguration::getMode ( State state)
overridevirtual

◆ getWorstCaseBalancingRatio()

virtual double toolbox::loadbalancing::DefaultConfiguration::getWorstCaseBalancingRatio ( State state)
overridevirtual

Control when to balance between ranks.

Implements toolbox::loadbalancing::Configuration.

◆ makeSplitDependOnMemory()

virtual bool toolbox::loadbalancing::DefaultConfiguration::makeSplitDependOnMemory ( State state)
overridevirtual

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.

Field Documentation

◆ _maxTreesPerRank

const int toolbox::loadbalancing::DefaultConfiguration::_maxTreesPerRank
private

Definition at line 68 of file Configuration.h.


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