--- trunk/gadget/simann.cc 2015/07/30 12:36:46 14 +++ trunk/gadget/simann.cc 2015/10/13 11:29:01 16 @@ -178,12 +178,12 @@ #include "ecosystem.h" #include "global.h" #include "seq_optimize_template.h" -#ifdef GADGET_OPENMP +#ifdef SPECULATIVE #include #endif extern Ecosystem* EcoSystem; -#ifndef NO_OPENMP +#ifdef _OPENMP extern Ecosystem** EcoSystems; #endif @@ -436,7 +436,7 @@ //} -#ifdef GADGET_OPENMP +#ifdef SPECULATIVE void OptInfoSimann::OptimiseLikelihoodOMP() { //set initial values @@ -805,7 +805,7 @@ /// Represents the function that computes how good the parameters are double evaluate_f(const DoubleVector& params) { double trialf; -#ifndef NO_OPENMP +#ifdef _OPENMP int id = omp_get_thread_num (); trialf = EcoSystems[id]->SimulateAndUpdate(params); #else @@ -1035,7 +1035,7 @@ EcoSystem->resetVariables(); //JMB need to reset variables in case they have been scaled if (scale) { EcoSystem->scaleVariables(); -#ifndef NO_OPENMP +#ifdef _OPENMP int numThr = omp_get_max_threads ( ); for(i = 0; i < numThr; i++) // scale the variables for the ecosystem of every thread EcoSystems[i]->scaleVariables(); @@ -1087,7 +1087,7 @@ ReproducibleSearch pa(s, x, simanniter); -#ifndef NO_OPENMP +#ifdef _OPENMP // OpenMP parallelization int numThr = omp_get_max_threads ( ); pa.paral_opt_omp(funcval,numThr,numThr);