Gitlab is now running v13.9.0 - More info -> here <-

Commit 61d0b356 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane

correction cas engine=0

parent b51375cf
......@@ -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 -g"
macro cppflags " -O3 -pipe -fPIC -Wall -Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas -g"
#do we need optimzations here?
#macro_append cppflags "-ffast-math -m64 "
......
......@@ -51,3 +51,5 @@ precisionFile=class_pre/hpjul2.pre
#CMB
HiLLiPOP=HiLLiPOP/DX11dHM_superExt_CO_TT.lik
verbose=true
......@@ -86,36 +86,25 @@ Chi2Combiner::chi2_eff(const std::vector<double>& par) const {
copy(par.begin(),par.end(),ostream_iterator<double>(os,"\t"));
}
self->OK=true;
if (engine){
#pragma omp critical
{
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;
}
self->OK=engine->updateParValues(par);
}
//loop update chi2 observables
#pragma omp parallel
{
int i;
#pragma omp for schedule(static)
for (i=0;i<obs.size();i++) chi2+=(*(obs[i]))(par);
//update chi2 observables
if (OK){
#pragma omp parallel for schedule(static)
for (size_t i=0;i<obs.size();i++) chi2+=(*(obs[i]))(par);
}
else {
chi2=chi2_prev*10.;
}
if(verbose){
os << fixed << setprecision(3) ;
os << "1\t" << chi2 << "\t" << timer->partial();
os << (int)OK << "\t" << chi2 << "\t" << timer->partial();
cout << os.str() << endl;
}
self->iter++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment