MUQ  0.4.3
muq::SamplingAlgorithms::RoundRobinStaticLoadBalancer Class Reference

Simple default static load balancing strategy suitable for many cases. More...

#include <ParallelFixedSamplesMIMCMC.h>

Inheritance diagram for muq::SamplingAlgorithms::RoundRobinStaticLoadBalancer:

Detailed Description

Simple default static load balancing strategy suitable for many cases.

This load balancing strategy assigns one collector rank for each model index, one worker per group and proceeds to evenly split groups across indices. It clearly makes no further assumptions on the model, and would best be used together with dynamic load balancing during runtime.

Definition at line 55 of file ParallelFixedSamplesMIMCMC.h.

Public Member Functions

void setup (std::shared_ptr< ParallelizableMIComponentFactory > componentFactory, uint availableRanks) override
 
int numCollectors (std::shared_ptr< MultiIndex > modelIndex) override
 Number of collector processes assigned to a model index. More...
 
WorkerAssignment numWorkers (std::shared_ptr< MultiIndex > modelIndex) override
 Number of worker groups and number of workers per group for a given model index. More...
 

Member Function Documentation

◆ numCollectors()

int RoundRobinStaticLoadBalancer::numCollectors ( std::shared_ptr< MultiIndex >  modelIndex)
overridevirtual

Number of collector processes assigned to a model index.

Implements muq::SamplingAlgorithms::StaticLoadBalancer.

Definition at line 16 of file ParallelFixedSamplesMIMCMC.cpp.

References ranks_remaining.

◆ numWorkers()

StaticLoadBalancer::WorkerAssignment RoundRobinStaticLoadBalancer::numWorkers ( std::shared_ptr< MultiIndex >  modelIndex)
overridevirtual

◆ setup()

void RoundRobinStaticLoadBalancer::setup ( std::shared_ptr< ParallelizableMIComponentFactory componentFactory,
uint  availableRanks 
)
overridevirtual

Member Data Documentation

◆ models_remaining

uint muq::SamplingAlgorithms::RoundRobinStaticLoadBalancer::models_remaining
private

Definition at line 65 of file ParallelFixedSamplesMIMCMC.h.

Referenced by numWorkers(), and setup().

◆ ranks_remaining

uint muq::SamplingAlgorithms::RoundRobinStaticLoadBalancer::ranks_remaining
private

Definition at line 64 of file ParallelFixedSamplesMIMCMC.h.

Referenced by numCollectors(), numWorkers(), and setup().


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