16 #include <boost/property_tree/ptree.hpp>
18 namespace pt = boost::property_tree;
23 #include "ParallelProblem.h"
25 int main(
int argc,
char **argv){
27 MPI_Init(&argc, &argv);
31 pt.put(
"NumSamples_0", 1e4);
32 pt.put(
"NumSamples_1", 5e3);
33 pt.put(
"NumSamples_2", 1e3);
34 pt.put(
"NumSamples_3", 5e2);
35 pt.put(
"MLMCMC.Subsampling", 1);
36 pt.put(
"MCMC.BurnIn", 10);
37 pt.put(
"verbosity", 1);
71 auto comm = std::make_shared<parcer::Communicator>();
73 auto componentFactory = std::make_shared<MyMIComponentFactory>(pt);
76 if (comm->GetRank() == 0) {
78 Eigen::VectorXd meanQOI = parallelMIMCMC.
MeanQOI();
79 std::cout <<
"mean QOI: " << meanQOI.transpose() << std::endl;
int main(int argc, char **argv)
virtual std::shared_ptr< SampleCollection > Run(std::vector< Eigen::VectorXd > const &x0=std::vector< Eigen::VectorXd >())
A parallel MIMCMC method.
void Finalize()
Cleanup parallel method, wait for all ranks to finish.
void WriteToFile(std::string filename)
Eigen::VectorXd MeanQOI()
Get mean quantity of interest estimate computed via telescoping sum.