--- trunk/gadget/simann.cc 2015/09/01 19:14:33 15 +++ trunk/gadget/simann.cc 2015/10/13 11:29:01 16 @@ -183,7 +183,7 @@ #endif extern Ecosystem* EcoSystem; -#ifndef NO_OPENMP +#ifdef _OPENMP extern Ecosystem** EcoSystems; #endif @@ -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);