Commit 5f9993db authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

put PICO as optional

parent 46d983dd
......@@ -6,8 +6,8 @@ use class v2.4.3
#macro cpp "icpc"
#macro cppflags " -O2 -ip -ansi_alias -align -Wbrief "
#default is gcc here are the C++ compiler options
macro cppflags " -O2 -pipe -ansi -Woverloaded-virtual -Wpedantic -Wunused -Wmaybe-uninitialized -Wno-deprecated -Wno-div-by-zero -Wno-variadic-macros"
#macro cppflags " -O2 -pipe -ansi"
macro cflags " -O2 -fopenmp "
......@@ -26,18 +26,18 @@ include_dirs "../src/camel/JLA/jla_likelihood_v3/src"
include_dirs "$(CLIKDIR)/include"
macro_append CAMEL_linkopts " -L$(CLIKDIR) -lcfitsio"
#JLA :needs cblas/lapack
#JLA :requires cblas/lapack
macro_append cppflags ' -DJLA '
#macro_append CAMEL_linkopts " -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -ljla "
include_dirs "/usr/include/atlas"
macro_append CAMEL_linkopts " -L/usr/lib64/atlas -lcblas -llapack -ljla "
application test_jla -group=test -s=../src/camel test/test_jla.cc
#PLANCK
macro_append cppflags " -DCLIK $(CLIKCFLAGS)"
macro_append cflags " -DCLIK $(CLIKCFLAGS)"
macro_append CAMEL_linkopts " $(CLIKLIBS) "
macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lcfitsio -lclik "
macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lclik "
#include_dirs "$(CLIKDIR)/include"
#include_dirs "$(CLIKDIR)/src"
......@@ -47,14 +47,17 @@ macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lcfitsio -lclik "
#path_append LD_LIBRARY_PATH "$(CLIKDIR)/lib"
# PICO #still hardcoded
# PICO
macro_append cppflags " -DPICO "
include_dirs "/usr/include/python2.7"
include_dirs "/usr/lib64/python2.7/site-packages/numpy/core/include"
include_dirs "$(PICO_CODE)/pypico"
macro_append CAMEL_linkopts " -L$(PICO_CODE)/build/temp.linux-x86_64-2.7 -lpico -L/usr/lib64/python2.7/config -lpython2.7 "
macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" '
application testPico -group=test -s=../src/camel/pico/exec testPico.cc
###########################################################################################
#CAMEL LIBRARIES
library Minuit -no_share ../src/Minuit2-5.28.00/src/*.cxx
library Util -no_share -x=ddl.cc ../src/cxxsupport/*.cc
......@@ -89,8 +92,6 @@ application testBAO -group=test -s=../src/camel/test testBAO.cc
application testHiLLiPOP -group=test -s=../src/camel/test testHiLLiPOP.cc
application dump_clik -group=test -s=../src/camel test/test_clik.cc
application dump_lensing -group=test -s=../src/camel test/test_lensing.cc
application test_jla -group=test -s=../src/camel test/test_jla.cc
application testPico -group=test -s=../src/camel/pico/exec testPico.cc
#lIST OF ALL DEPENDENCIES
macro_append Minimize_dependencies " MinuitFit "
......
......@@ -19,7 +19,10 @@
//Engine
#include"Class/ClassEngine.hh"
#include"Class/MnClassEngine.hh"
#ifdef PICO
#include"pico/MnPicoEngine.hh"
#endif
//LIKELIHOODS
#include "CMB/Chi2CMB.hh"
......@@ -165,8 +168,12 @@ Chi2Factory::gimeChi2(Parser& parser){
Engine *e;
if (engine=="pico") {
#ifndef PICO
throw Message_error("pico Engine required but no support compiled: define PICO in requiremnts");
#else
cout << "USING pico ENGINE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << endl;
e=new MnPicoEngine(parser.vars(),lmax,PICODATA,false);
#endif
}
else{
//extra class params
......
......@@ -74,7 +74,7 @@ private:
inline std::ostream& operator<<(std::ostream& o,Timer& t){
o << " [time: partial="<< t.partial() << " s /total="<< t.total() << " s]";
return o;
};
}
#endif
#include "Parser.hh"
#include "Class/MnClassEngine.hh"
#ifdef PICO
#include "pico/MnPicoEngine.hh"
#endif
#include"arr.h"
#include"fitshandle.h"
#include <iostream>
......@@ -25,8 +26,11 @@ int main(int argc,char** argv){
Engine *e;
if (engine=="pico") {
#ifndef PICO
throw Message_error("pico support not compiled: see reqiurement");
#else
e=new MnPicoEngine(parser.vars(),lmax,PICODATA,true);
#endif
}
else{
//CLASS
......
#ifdef PICO
//--------------------------------------------------------------------------
//
// Description:
......@@ -190,3 +191,4 @@ MnPicoEngine::get_tau_reio() const{
return PyFloat_AS_DOUBLE(PyDict_GetItemString(dict,picoNames[3]));
}
#endif
......@@ -13,6 +13,8 @@
//
//------------------------------------------------------------------------
#ifdef PICO
#ifndef MnPicoEngine_hh
#define MnPicoEngine_hh
......@@ -78,3 +80,4 @@ private:
#endif
#endif
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