High-level communication wrapper for controlling worker processes. More...
#include <ParallelMIMCMCWorker.h>
High-level communication wrapper for controlling worker processes.
This takes care about assigning workers to a worker group for a specific model index/level, sending commands to them and finally unassigning them again.
Definition at line 80 of file ParallelMIMCMCWorker.h.
Public Member Functions | |
WorkerClient (std::shared_ptr< parcer::Communicator > comm, std::shared_ptr< PhonebookClient > phonebookClient, int RootRank) | |
void | assignGroup (std::vector< int > subgroup, std::shared_ptr< MultiIndex > modelindex) |
std::vector< int > | UnassignGroup (std::shared_ptr< MultiIndex > modelIndex, int groupRootRank) |
void | UnassignAll () |
void | Finalize () |
WorkerClient::WorkerClient | ( | std::shared_ptr< parcer::Communicator > | comm, |
std::shared_ptr< PhonebookClient > | phonebookClient, | ||
int | RootRank | ||
) |
Definition at line 139 of file ParallelMIMCMCWorker.cpp.
void WorkerClient::assignGroup | ( | std::vector< int > | subgroup, |
std::shared_ptr< MultiIndex > | modelindex | ||
) |
Definition at line 146 of file ParallelMIMCMCWorker.cpp.
References muq::SamplingAlgorithms::ASSIGN, comm, muq::SamplingAlgorithms::ControlTag, and phonebookClient.
Referenced by muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC::RunSamples(), and muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC::StaticLoadBalancingMIMCMC().
void WorkerClient::Finalize | ( | ) |
Definition at line 179 of file ParallelMIMCMCWorker.cpp.
References comm, muq::SamplingAlgorithms::ControlTag, and muq::SamplingAlgorithms::QUIT.
Referenced by muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC::Finalize().
void WorkerClient::UnassignAll | ( | ) |
Definition at line 166 of file ParallelMIMCMCWorker.cpp.
References phonebookClient, and UnassignGroup().
Referenced by muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC::Finalize().
std::vector< int > WorkerClient::UnassignGroup | ( | std::shared_ptr< MultiIndex > | modelIndex, |
int | groupRootRank | ||
) |
Definition at line 156 of file ParallelMIMCMCWorker.cpp.
References comm, muq::SamplingAlgorithms::ControlTag, phonebookClient, and muq::SamplingAlgorithms::UNASSIGN.
Referenced by muq::SamplingAlgorithms::StaticLoadBalancingMIMCMC::RunSamples(), and UnassignAll().
|
private |
Definition at line 95 of file ParallelMIMCMCWorker.h.
Referenced by assignGroup(), Finalize(), and UnassignGroup().
|
private |
Definition at line 96 of file ParallelMIMCMCWorker.h.
Referenced by assignGroup(), UnassignAll(), and UnassignGroup().