Wrapper for MIComponentFactory supporting parallel model setup. More...
#include <ParallelMIComponentFactory.h>
Wrapper for MIComponentFactory supporting parallel model setup.
This MIComponentFactory provides parallelized model setup initiated by rank zero of the given communicator and makes those models available to be controlled by the root rank. This allows rank zero to set up SaplingProblem's through this factory exactly as if it was sequential; this class ensures that the other worker ranks perform the same SamplingProblem construction at the same time. In particular, parallel models are guaranteed to be set up in sync, so most external model codes should just work once the appropriate communicator is passed to them. Further, once SamplingProblem's are set up, worker processes listen for LogDensity requests from the respective ParallelAbstractSamplingProblem.
Definition at line 30 of file ParallelMIComponentFactory.h.
Public Member Functions | |
ParallelMIComponentFactory (std::shared_ptr< parcer::Communicator > comm, std::shared_ptr< parcer::Communicator > global_comm, std::shared_ptr< MIComponentFactory > componentFactory) | |
virtual bool | IsInverseProblem () override |
void | finalize () |
Stops worker processes command loop, freeing them for other tasks. More... | |
virtual std::shared_ptr< MCMCProposal > | Proposal (std::shared_ptr< MultiIndex > const &index, std::shared_ptr< AbstractSamplingProblem > const &samplingProblem) override |
virtual std::shared_ptr< MultiIndex > | FinestIndex () override |
virtual std::shared_ptr< MCMCProposal > | CoarseProposal (std::shared_ptr< MultiIndex > const &fineIndex, std::shared_ptr< MultiIndex > const &coarseIndex, std::shared_ptr< AbstractSamplingProblem > const &coarseProblem, std::shared_ptr< SingleChainMCMC > const &coarseChain) override |
virtual std::shared_ptr< AbstractSamplingProblem > | SamplingProblem (std::shared_ptr< MultiIndex > const &index) override |
virtual std::shared_ptr< MIInterpolation > | Interpolation (std::shared_ptr< MultiIndex > const &index) override |
virtual Eigen::VectorXd | StartingPoint (std::shared_ptr< MultiIndex > const &index) override |
Public Member Functions inherited from muq::SamplingAlgorithms::MIComponentFactory | |
virtual | ~MIComponentFactory ()=default |
|
inline |
Definition at line 34 of file ParallelMIComponentFactory.h.
References comm, componentFactory, muq::SamplingAlgorithms::FINALIZE, muq::SamplingAlgorithms::INIT_PROBLEM, muq::SamplingAlgorithms::LOGDENSITY, muq::SamplingAlgorithms::QOI, samplingProblems, muq::SamplingAlgorithms::TEST, and muq::SamplingAlgorithms::WorkgroupTag.
|
inlineoverridevirtual |
Implements muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 105 of file ParallelMIComponentFactory.h.
References componentFactory.
|
inline |
Stops worker processes command loop, freeing them for other tasks.
Definition at line 86 of file ParallelMIComponentFactory.h.
References comm, muq::SamplingAlgorithms::FINALIZE, samplingProblems, and muq::SamplingAlgorithms::WorkgroupTag.
|
inlineoverridevirtual |
Implements muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 101 of file ParallelMIComponentFactory.h.
References componentFactory.
|
inlineoverridevirtual |
Implements muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 126 of file ParallelMIComponentFactory.h.
References componentFactory.
|
inlineoverridevirtual |
Reimplemented from muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 78 of file ParallelMIComponentFactory.h.
References componentFactory.
|
inlineoverridevirtual |
Implements muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 97 of file ParallelMIComponentFactory.h.
References componentFactory.
|
inlineoverridevirtual |
Implements muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 112 of file ParallelMIComponentFactory.h.
References comm, componentFactory, idcnt, muq::SamplingAlgorithms::INIT_PROBLEM, samplingProblems, and muq::SamplingAlgorithms::WorkgroupTag.
|
inlineoverridevirtual |
Implements muq::SamplingAlgorithms::MIComponentFactory.
Definition at line 130 of file ParallelMIComponentFactory.h.
References componentFactory.
|
private |
Definition at line 136 of file ParallelMIComponentFactory.h.
Referenced by finalize(), ParallelMIComponentFactory(), and SamplingProblem().
|
private |
Definition at line 138 of file ParallelMIComponentFactory.h.
Referenced by CoarseProposal(), FinestIndex(), Interpolation(), IsInverseProblem(), ParallelMIComponentFactory(), Proposal(), SamplingProblem(), and StartingPoint().
|
private |
Definition at line 137 of file ParallelMIComponentFactory.h.
|
private |
Definition at line 135 of file ParallelMIComponentFactory.h.
Referenced by SamplingProblem().
|
private |
Definition at line 140 of file ParallelMIComponentFactory.h.
Referenced by finalize(), ParallelMIComponentFactory(), and SamplingProblem().