--- trunk/gadget/interruptinterface.cc 2014/02/10 17:09:07 1 +++ trunk/gadget/interruptinterface.cc 2015/07/23 19:00:38 11 @@ -5,9 +5,22 @@ extern Ecosystem* EcoSystem; +#ifndef NO_OPENMP +extern Ecosystem** EcoSystems; +//extern StochasticData* data; +#endif + void InterruptInterface::printMenu() { if (EcoSystem->getFuncEval() != 0) - cout << "\nInterrupted after " << EcoSystem->getFuncEval() << " iterations ..."; + { + int iters = EcoSystem->getFuncEval(); + #ifndef NO_OPENMP + int numThr = omp_get_max_threads ( ); + for (int i = 0; i < numThr; i++) + iters += EcoSystems[i]->getFuncEval(); + #endif + cout << "\nInterrupted after a total of " << iters << " iterations ..."; + } cout << "\nInterrupted at year " << EcoSystem->getCurrentYear() << ", step " << EcoSystem->getCurrentStep() << " (" << EcoSystem->getCurrentTime() << " of " << EcoSystem->numTotalSteps() << " timesteps)\n"