7 |
|
|
8 |
extern Ecosystem* EcoSystem; |
extern Ecosystem* EcoSystem; |
9 |
|
|
10 |
|
#ifndef NO_OPENMP |
11 |
|
extern Ecosystem** EcoSystems; |
12 |
|
#endif |
13 |
|
|
14 |
Keeper::Keeper() { |
Keeper::Keeper() { |
15 |
stack = new StrStack(); |
stack = new StrStack(); |
16 |
boundsgiven = 0; |
boundsgiven = 0; |
289 |
handle.logMessage(LOGFAIL, "Error in keeper - cannot write to output file"); |
handle.logMessage(LOGFAIL, "Error in keeper - cannot write to output file"); |
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 |
outfile << EcoSystem->getFuncEval() << TAB; |
int iters = EcoSystem->getFuncEval(); |
293 |
|
#ifndef NO_OPENMP |
294 |
|
int numThr = omp_get_max_threads ( ); |
295 |
|
for (int i = 0; i < numThr; i++) |
296 |
|
iters += EcoSystems[i]->getFuncEval(); |
297 |
|
#endif |
298 |
|
outfile << iters << TAB; |
299 |
|
|
300 |
int i, p, w; |
int i, p, w; |
301 |
p = prec; |
p = prec; |
422 |
RUNID.Print(paramfile); |
RUNID.Print(paramfile); |
423 |
|
|
424 |
if (interrupt) { |
if (interrupt) { |
425 |
paramfile << "; Gadget was interrupted after " << EcoSystem->getFuncEval() |
int iters = EcoSystem->getFuncEval(); |
426 |
|
#ifndef NO_OPENMP |
427 |
|
int numThr = omp_get_max_threads ( ); |
428 |
|
for (i = 0; i < numThr; i++) |
429 |
|
iters += EcoSystems[i]->getFuncEval(); |
430 |
|
#endif |
431 |
|
paramfile << "; Gadget was interrupted after a total of " << iters |
432 |
<< " function evaluations\n; the best likelihood value found so far is " |
<< " function evaluations\n; the best likelihood value found so far is " |
433 |
<< setprecision(p) << bestlikelihood << endl; |
<< setprecision(p) << bestlikelihood << endl; |
434 |
|
|