Commit 3f203357 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

moving ctr.update, printing additional infos, preparing parallel monte carlo

parent 8fb866d8
......@@ -3,12 +3,15 @@
void MonteCarlo::Method() {
mout.StartBlock("MC Method");
vout(1) << "l=" << level.fine << " dM=" << ctr.dM
<< " fine=" << onlyFine << " commSplit=" << commSplit << endl;
vout(1) << "l=" << level.fine << " fine=" << onlyFine << endl;
vout(1) << "M=" << ctr.M << " dM=" << ctr.dM << " dMComm=" << ctr.dMComm << endl;
method();
ctr.Update();
avgs.Update(sums, ctr.M);
vars.Update(avgs);
kurtosis.Update(avgs, vars);
vout(1) << "M=" << ctr.M << " dM=" << ctr.dM << " dMComm=" << ctr.dMComm << endl;
vout(1) << "|E[Q]|=" << avgs.Q << " V[Q]=" << vars.Q << endl;
vout(1) << "|E[Y]|=" << avgs.Y << " V[Y]=" << vars.Y << endl;
mout.EndBlock(verbose == 0);
}
......@@ -16,13 +19,13 @@ void MonteCarlo::Method() {
void MonteCarlo::method() {
SampleSolution coarseSolution(solMGraphs, coarseId);
SampleSolution fineSolution(solMGraphs, fineId);
std::cout << ctr.dMComm << endl;
for (int m = ctr.M; m < ctr.M + ctr.dMComm * PPM->Size(commSplit); m++) {
// int m = ctr.M + ctr.dMComm * PPM->Proc(0);
// for (; m < ctr.M + ctr.dMComm * PPM->Proc(0) + ctr.dMComm; m++) {
for (int m = ctr.M; m < ctr.M + ctr.dMComm; m++) {
computeSampleSolution(m, fineId, fineSolution);
if (onlyFine) coarseSolution.Init();
else computeSampleSolution(m, coarseId, coarseSolution);
sums.Update(fineSolution, coarseSolution);
ctr.Update();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment