High-level communication wrapper for controlling SampleCollectors. More...
#include <ParallelMIMCMCWorker.h>
High-level communication wrapper for controlling SampleCollectors.
This takes care about assigning workers to a set of collectors for a specific model index/level, sending commands to them and finally unassigning them again.
Definition at line 34 of file ParallelMIMCMCWorker.h.
Public Member Functions | |
CollectorClient (std::shared_ptr< parcer::Communicator > comm, std::vector< int > subgroup, std::shared_ptr< MultiIndex > modelindex) | |
std::shared_ptr< MultiIndex > | GetModelIndex () const |
void | CollectSamples (int numSamples) |
void | ComputeMeans () |
void | WriteToFile (std::string filename) |
bool | Receive (ControlFlag command, const MPI_Status &status) |
Eigen::VectorXd | GetQOIMean () |
void | Unassign () |
bool | IsSampling () |
bool | IsComputingMeans () |
CollectorClient::CollectorClient | ( | std::shared_ptr< parcer::Communicator > | comm, |
std::vector< int > | subgroup, | ||
std::shared_ptr< MultiIndex > | modelindex | ||
) |
Definition at line 19 of file ParallelMIMCMCWorker.cpp.
References muq::SamplingAlgorithms::ASSIGN_COLLECTOR, boxHighestIndex, boxIndices, boxLowestIndex, comm, muq::SamplingAlgorithms::ControlTag, and subgroup.
void CollectorClient::CollectSamples | ( | int | numSamples | ) |
Definition at line 44 of file ParallelMIMCMCWorker.cpp.
References comm, muq::SamplingAlgorithms::ControlTag, muq::SamplingAlgorithms::SAMPLE_BOX, sampling, and subgroup.
void CollectorClient::ComputeMeans | ( | ) |
Definition at line 60 of file ParallelMIMCMCWorker.cpp.
References comm, computingMeans, muq::SamplingAlgorithms::ControlTag, muq::SamplingAlgorithms::MEANS, and subgroup.
std::shared_ptr< MultiIndex > CollectorClient::GetModelIndex | ( | ) | const |
Definition at line 38 of file ParallelMIMCMCWorker.cpp.
References boxHighestIndex.
Eigen::VectorXd CollectorClient::GetQOIMean | ( | ) |
Definition at line 119 of file ParallelMIMCMCWorker.cpp.
References boxQOIMean.
bool CollectorClient::IsComputingMeans | ( | ) |
Definition at line 133 of file ParallelMIMCMCWorker.cpp.
References computingMeans.
bool CollectorClient::IsSampling | ( | ) |
Definition at line 129 of file ParallelMIMCMCWorker.cpp.
References sampling.
bool CollectorClient::Receive | ( | ControlFlag | command, |
const MPI_Status & | status | ||
) |
Definition at line 77 of file ParallelMIMCMCWorker.cpp.
References boxHighestIndex, boxIndices, boxLowestIndex, boxQOIMean, comm, computingMeans, muq::SamplingAlgorithms::ControlTag, muq::SamplingAlgorithms::MEANS_DONE, muq::SamplingAlgorithms::SAMPLE_BOX_DONE, sampling, and subgroup.
void CollectorClient::Unassign | ( | ) |
Definition at line 123 of file ParallelMIMCMCWorker.cpp.
References comm, muq::SamplingAlgorithms::ControlTag, subgroup, and muq::SamplingAlgorithms::UNASSIGN.
void CollectorClient::WriteToFile | ( | std::string | filename | ) |
Definition at line 68 of file ParallelMIMCMCWorker.cpp.
References comm, muq::SamplingAlgorithms::ControlTag, subgroup, and muq::SamplingAlgorithms::WRITE_TO_FILE.
|
private |
Definition at line 68 of file ParallelMIMCMCWorker.h.
Referenced by CollectorClient(), GetModelIndex(), and Receive().
|
private |
Definition at line 65 of file ParallelMIMCMCWorker.h.
Referenced by CollectorClient(), and Receive().
|
private |
Definition at line 69 of file ParallelMIMCMCWorker.h.
Referenced by CollectorClient(), and Receive().
|
private |
Definition at line 66 of file ParallelMIMCMCWorker.h.
Referenced by GetQOIMean(), and Receive().
|
private |
Definition at line 60 of file ParallelMIMCMCWorker.h.
Referenced by CollectorClient(), CollectSamples(), ComputeMeans(), Receive(), Unassign(), and WriteToFile().
|
private |
Definition at line 64 of file ParallelMIMCMCWorker.h.
Referenced by ComputeMeans(), IsComputingMeans(), and Receive().
|
private |
Definition at line 71 of file ParallelMIMCMCWorker.h.
|
private |
Definition at line 63 of file ParallelMIMCMCWorker.h.
Referenced by CollectSamples(), IsSampling(), and Receive().
|
private |
Definition at line 61 of file ParallelMIMCMCWorker.h.
Referenced by CollectorClient(), CollectSamples(), ComputeMeans(), Receive(), Unassign(), and WriteToFile().