diff --git a/cmt/requirements-lite.generic b/cmt/requirements-lite.generic index 776ec2cce42818fb485679bd0be03dc91c76e8b3..54451f37ab00557f27e825da65f4b21c5938ba3e 100644 --- a/cmt/requirements-lite.generic +++ b/cmt/requirements-lite.generic @@ -4,7 +4,7 @@ use class * #compiler options #default is gcc here are the C++ compiler options -macro cppflags " -O2 -pipe -fPIC -Wall -Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas" +macro cppflags " -O2 -pipe -fPIC -Wall -Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas -g" #do we need optimzations here? #macro_append cppflags "-ffast-math -m64 " diff --git a/src/camel/Chi2Combiner.cc b/src/camel/Chi2Combiner.cc index 003b69d3387aaed97c33188761e3c7308fafb03f..bf7a4d78608faf1f4aa056f6bd4ae7215af0966a 100644 --- a/src/camel/Chi2Combiner.cc +++ b/src/camel/Chi2Combiner.cc @@ -41,7 +41,7 @@ Chi2Combiner::~Chi2Combiner() for (size_t i=0;itotal(); //cout << __FILE__ << " :deleting Engine " << endl; - delete engine; + if (engine) delete engine; cout <<"TIMER TOTAL TIME=" << tot << " s\t=" << tot/60. << " min\t=" << tot/3600 << "h" << endl; delete timer; @@ -88,18 +88,20 @@ Chi2Combiner::chi2_eff(const std::vector& par) const { #pragma omp critical { - self->OK=engine->updateParValues(par); - } - if (!OK) { - //A TUNER!!!!!!!!!!!!!1 - chi2=chi2_prev*10.; - self->iter++; - if(verbose) - { - os << "0\t" << chi2 << "\t" << timer->partial(); - cout << os.str() << endl; - } - return chi2; + if (engine){ + self->OK=engine->updateParValues(par); + if (!OK) { + //A TUNER!!!!!!!!!!!!!1 + chi2=chi2_prev*10.; + self->iter++; + } + if(verbose) + { + os << "0\t" << chi2 << "\t" << timer->partial(); + cout << os.str() << endl; + } + return chi2; + } } //loop update chi2 observables