7 |
|
|
8 |
extern Ecosystem* EcoSystem; |
extern Ecosystem* EcoSystem; |
9 |
|
|
10 |
#ifndef NO_OPENMP |
#ifdef _OPENMP |
11 |
extern Ecosystem** EcoSystems; |
extern Ecosystem** EcoSystems; |
12 |
#endif |
#endif |
13 |
|
|
290 |
|
|
291 |
//JMB - print the number of function evaluations at the start of the line |
//JMB - print the number of function evaluations at the start of the line |
292 |
int iters = EcoSystem->getFuncEval(); |
int iters = EcoSystem->getFuncEval(); |
293 |
#ifndef NO_OPENMP |
#ifdef _OPENMP |
294 |
|
if(EcoSystems != NULL) { |
295 |
int numThr = omp_get_max_threads ( ); |
int numThr = omp_get_max_threads ( ); |
296 |
for (int i = 0; i < numThr; i++) |
for (int i = 0; i < numThr; i++) |
297 |
iters += EcoSystems[i]->getFuncEval(); |
iters += EcoSystems[i]->getFuncEval(); |
298 |
|
} |
299 |
#endif |
#endif |
300 |
outfile << iters << TAB; |
outfile << iters << TAB; |
301 |
|
|
425 |
|
|
426 |
if (interrupt) { |
if (interrupt) { |
427 |
int iters = EcoSystem->getFuncEval(); |
int iters = EcoSystem->getFuncEval(); |
428 |
#ifndef NO_OPENMP |
#ifdef _OPENMP |
429 |
int numThr = omp_get_max_threads ( ); |
int numThr = omp_get_max_threads ( ); |
430 |
for (i = 0; i < numThr; i++) |
for (i = 0; i < numThr; i++) |
431 |
iters += EcoSystems[i]->getFuncEval(); |
iters += EcoSystems[i]->getFuncEval(); |
433 |
paramfile << "; Gadget was interrupted after a total of " << iters |
paramfile << "; Gadget was interrupted after a total of " << iters |
434 |
<< " function evaluations\n; the best likelihood value found so far is " |
<< " function evaluations\n; the best likelihood value found so far is " |
435 |
<< setprecision(p) << bestlikelihood << endl; |
<< setprecision(p) << bestlikelihood << endl; |
|
|
|
436 |
} else if (EcoSystem->getFuncEval() == 0) { |
} else if (EcoSystem->getFuncEval() == 0) { |
437 |
paramfile << "; a simulation run was performed giving a likelihood value of " |
paramfile << "; a simulation run was performed giving a likelihood value of " |
438 |
<< setprecision(p) << EcoSystem->getLikelihood() << endl; |
<< setprecision(p) << EcoSystem->getLikelihood() << endl; |