MUQ  0.4.3
muq::SamplingAlgorithms::PhonebookServer Class Reference

Phonebook implementation facilitating communication between different roles in a parallel MIMCMC type method. Also is responsible for dynamic scheduling. More...

#include <Phonebook.h>

Detailed Description

Phonebook implementation facilitating communication between different roles in a parallel MIMCMC type method. Also is responsible for dynamic scheduling.

The phonebook process tracks which worker processes are assigned to which models. When samples are computed, the phonebook is informed by the respective worker group controller. When samples are requested by other controllers (in order to be used as proposals for finer chains) or by collectors, the phonebook sends to them the rank of a controller process that has such a sample available.

Since the phonebook can also track which model indices/levels are busy and which are not, it can also take care of initiating the dynamic rescheduling of worker processes as needed.

Definition at line 38 of file Phonebook.h.

Classes

struct  SampleRequest
 
class  WorkerList
 

Public Member Functions

 PhonebookServer (std::shared_ptr< parcer::Communicator > comm, bool scheduling_active=true, std::shared_ptr< muq::Utilities::OTF2TracerBase > tracer=std::make_shared< muq::Utilities::OTF2TracerDummy >())
 
void Run ()
 

Constructor & Destructor Documentation

◆ PhonebookServer()

muq::SamplingAlgorithms::PhonebookServer::PhonebookServer ( std::shared_ptr< parcer::Communicator >  comm,
bool  scheduling_active = true,
std::shared_ptr< muq::Utilities::OTF2TracerBase tracer = std::make_shared<muq::Utilities::OTF2TracerDummy>() 
)
inline

Definition at line 41 of file Phonebook.h.

Member Function Documentation

◆ getLoadFactor()

double muq::SamplingAlgorithms::PhonebookServer::getLoadFactor ( std::shared_ptr< MultiIndex >  index,
WorkerList worker_list 
)
inlineprivate

◆ getNumQueuedTasksForIndex()

double muq::SamplingAlgorithms::PhonebookServer::getNumQueuedTasksForIndex ( std::shared_ptr< MultiIndex >  index,
WorkerList worker_list 
)
inlineprivate

Definition at line 343 of file Phonebook.h.

References requests.

Referenced by getLoadFactor(), and Run().

◆ getNumTasksQueuedTasksFromIndex()

int muq::SamplingAlgorithms::PhonebookServer::getNumTasksQueuedTasksFromIndex ( std::shared_ptr< MultiIndex >  index)
inlineprivate

Definition at line 352 of file Phonebook.h.

References requests.

Referenced by getLoadFactor().

◆ Run()

◆ UnRegister()

void muq::SamplingAlgorithms::PhonebookServer::UnRegister ( std::shared_ptr< MultiIndex >  modelIndex,
int  rank 
)
inlineprivate

Definition at line 241 of file Phonebook.h.

References phonebook.

Referenced by Run().

Member Data Documentation

◆ comm

std::shared_ptr<parcer::Communicator> muq::SamplingAlgorithms::PhonebookServer::comm
private

Definition at line 381 of file Phonebook.h.

Referenced by Run().

◆ phonebook

std::map<std::shared_ptr<MultiIndex>, WorkerList, MultiPtrComp> muq::SamplingAlgorithms::PhonebookServer::phonebook
private

Definition at line 380 of file Phonebook.h.

Referenced by Run(), and UnRegister().

◆ requests

std::deque< SampleRequest > muq::SamplingAlgorithms::PhonebookServer::requests
private

Definition at line 377 of file Phonebook.h.

Referenced by getNumQueuedTasksForIndex(), getNumTasksQueuedTasksFromIndex(), and Run().

◆ rescheduling_in_progress

bool muq::SamplingAlgorithms::PhonebookServer::rescheduling_in_progress = false
private

Definition at line 384 of file Phonebook.h.

Referenced by Run().

◆ scheduling_active

bool muq::SamplingAlgorithms::PhonebookServer::scheduling_active
private

Definition at line 382 of file Phonebook.h.

Referenced by Run().

◆ tracer

std::shared_ptr<muq::Utilities::OTF2TracerBase> muq::SamplingAlgorithms::PhonebookServer::tracer
private

Definition at line 383 of file Phonebook.h.

Referenced by Run().


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