Commit c3886afb authored by Matthieu Tristram's avatar Matthieu Tristram
Browse files

Merge branch 'master' of https://gitlab.in2p3.fr/cosmotools/CAMEL

parents 0e9600ab 4e957c83
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
#cmt stuff #cmt stuff
if [ -z "$CMTCLASS" ] ; then if [ -z "$CMTCLASS" ] ; then
echo "CMTCLASS is undefined" echo "CMTCLASS is undefined"
exit 1 return
else else
if [ -z "$CMTPATH" ] ; then
export CMTPATH=${CMTCLASS} export CMTPATH=${CMTCLASS}
else
export CMTPATH=${CMTPATH}:${CMTCLASS}
fi
fi fi
if [ ! -f setup.sh ] ; then if [ ! -f setup.sh ] ; then
...@@ -16,18 +20,18 @@ fi ...@@ -16,18 +20,18 @@ fi
source ./setup.sh source ./setup.sh
if [ -z "$CAMELROOT" ] ; then if [ -z "$CAMELROOT" ] ; then
echo "CAMELROOT undefined ...something went wrong. do you have a requirements file?" echo "CAMELROOT undefined ...something went wrong. do you have a requirements file?"
exit 1 return
fi fi
#creating link #creating link
if [ -z "${CAMEL_DATA}" ] ; then if [ -z "${CAMEL_DATA}" ] ; then
echo "CAMEL_DATA undefined: review your installation (see http://camel.in2p3.fr/wiki/pmwiki.php?n=Main.Install)" echo "CAMEL_DATA undefined: review your installation (see http://camel.in2p3.fr/wiki/pmwiki.php?n=Main.Install)"
exit 1 return
fi fi
if [ ! -d "${CAMEL_DATA}" ] ; then if [ ! -d "${CAMEL_DATA}" ] ; then
echo "empty CAMEL_DATA directory : please fix (see http://camel.in2p3.fr/wiki/pmwiki.php?n=Main.Install)" echo "empty CAMEL_DATA directory : please fix (see http://camel.in2p3.fr/wiki/pmwiki.php?n=Main.Install)"
exit 1 return
fi fi
echo CAMEL_DATA="${CAMEL_DATA}" echo CAMEL_DATA="${CAMEL_DATA}"
...@@ -79,3 +83,4 @@ echo "your CAMELROOT is $CAMELROOT" ...@@ -79,3 +83,4 @@ echo "your CAMELROOT is $CAMELROOT"
# put 1 at the end of next line if you want a closer look at compilaton # put 1 at the end of next line if you want a closer look at compilaton
export VERBOSE= export VERBOSE=
echo "if you want more verbose compilation define VERBOSE environement variable to 1: export VERBOSE=1"
...@@ -3,40 +3,42 @@ package CAMEL ...@@ -3,40 +3,42 @@ package CAMEL
use class HEAD use class HEAD
#compiler options #compiler options
#macro cpp "icpc"
#macro cppflags " -O2 -ip -ansi_alias -align -Wbrief "
#default is gcc here are the C++ compiler options #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 -Woverloaded-virtual -Wpedantic -Wunused -Wmaybe-uninitialized -Wno-deprecated -Wno-div-by-zero "
macro cflags " -O2 -fopenmp "
# although it may be strange we do not compile CAMEL with OMP because CLASS is not thread safe
# no worries: CLASS is compiled with OMP
#macro_append cppflags "-fopenmp "
macro_append cpplinkflags " -fopenmp "
#CAMEL includes #CAMEL includes
include_dirs " ../src" include_dirs " $(CAMELROOT)/src"
include_dirs "../src/camel" include_dirs " $(CAMELROOT)/src/camel"
include_dirs "../src/Minuit2-5.28.00/src" include_dirs " $(CAMELROOT)/src/Minuit2-5.28.00/src"
include_dirs "../src/Minuit2-5.28.00/inc" include_dirs " $(CAMELROOT)/src/Minuit2-5.28.00/inc"
include_dirs "../src/cxxsupport" include_dirs "$(CAMELROOT)/src/cxxsupport"
include_dirs "../src/AbsRand" include_dirs "$(CAMELROOT)/src/AbsRand"
include_dirs "../src/camel/JLA" include_dirs "$(CAMELROOT)/src/camel/JLA"
include_dirs "../src/camel/JLA/jla_likelihood_v3/src" include_dirs "$(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src"
#cfitsio #cfitsio
include_dirs "$(CLIKDIR)/include" #include_dirs "$(CLIKDIR)/include"
macro_append CAMEL_linkopts " -L$(CLIKDIR) -lcfitsio" #macro_append CAMEL_linkopts " -L$(CLIKDIR) -lcfitsio"
macro_append CAMEL_linkopts " -lcfitsio"
#JLA :requires cblas/lapack #JLA :requires cblas/lapack
macro_append cppflags ' -DJLA ' #macro_append cppflags ' -DJLA '
include_dirs "/usr/include/atlas" #include_dirs "/usr/include/atlas"
macro_append CAMEL_linkopts " -L/usr/lib64/atlas -lcblas -llapack -ljla " #macro_append CAMEL_linkopts " -L/usr/lib/atlas-base -lcblas -llapack_atlas -ljla "
application test_jla -group=test -s=../src/camel test/test_jla.cc #application test_jla -group=test -s=$(CAMELROOT)/src/camel test/test_jla.cc
#PLANCK #PLANCK
macro_append cppflags " -DCLIK $(CLIKCFLAGS)" #macro_append cppflags " -DCLIK $(CLIKCFLAGS)"
macro_append cflags " -DCLIK $(CLIKCFLAGS)" #macro_append cflags " -DCLIK $(CLIKCFLAGS)"
macro_append CAMEL_linkopts " $(CLIKLIBS) " #macro_append CAMEL_linkopts " $(CLIKLIBS) "
#include_dirs "$(CLIKDIR)/include" #include_dirs "$(CLIKDIR)/include"
#include_dirs "$(CLIKDIR)/src" #include_dirs "$(CLIKDIR)/src"
...@@ -44,55 +46,59 @@ macro_append CAMEL_linkopts " $(CLIKLIBS) " ...@@ -44,55 +46,59 @@ macro_append CAMEL_linkopts " $(CLIKLIBS) "
#macro_append cflags " -DCLIK " #macro_append cflags " -DCLIK "
#macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lclik " #macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lclik "
#path_append LD_LIBRARY_PATH "$(CLIKDIR)/lib" #path_append LD_LIBRARY_PATH "$(CLIKDIR)/lib"
#application dump_clik -group=test -s=$(CAMELROOT)/src/camel test/test_clik.cc
#application dump_lensing -group=test -s=$(CAMELROOT)/src/camel test/test_lensing.cc
# PICO # PICO
macro_append cppflags " -DPICO $(PICOINC) " #macro_append cppflags " -DPICO $(PICOINC) "
macro_append CAMEL_linkopts " -L$(PICO_CODE) -lpico -lpython2.7 " #macro_append CAMEL_linkopts " -L$(PICO_CODE) -lpico -lpython2.7 "
# the previous line should be sufficient otherwise try the PICOLIBS # the previous line should be sufficient otherwise try the PICOLIBS
# (set in camel_setup.sh) # (set in camel_setup.sh)
#macro_append CAMEL_linkopts " $(PICOLIBS)" #macro_append CAMEL_linkopts " $(PICOLIBS)"
macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" ' #macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" '
application testPico -group=test -s=../src/camel/pico/exec testPico.cc #application testPico -group=test -s=$(CAMELROOT)/src/camel/pico/exec testPico.cc
#CLASS optional FastPk access
macro_append cppflags " -DFASTPK "
###FROM THERE YOU DONT NEED TO TOUCH ###FROM THERE YOU DONT NEED TO TOUCH
########################################################################################### ###########################################################################################
#CAMEL LIBRARIES #CAMEL LIBRARIES
library Minuit -no_share ../src/Minuit2-5.28.00/src/*.cxx library Minuit -no_share $(CAMELROOT)/src/Minuit2-5.28.00/src/*.cxx
library Util -no_share -x=ddl.cc ../src/cxxsupport/*.cc library Util -no_share -x=ddl.cc $(CAMELROOT)/src/cxxsupport/*.cc
library AbsRand -no_share ../src/AbsRand/*.cc library AbsRand -no_share $(CAMELROOT)/src/AbsRand/*.cc
library CLHEP -no_share ../src/CLHEP/src/*.cc library CLHEP -no_share $(CAMELROOT)/src/CLHEP/src/*.cc
library jla -no_share ../src/camel/JLA/jla_likelihood_v3/src/ini.c ../src/camel/JLA/jla_likelihood_v3/src/jla.cc library jla -no_share $(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src/ini.c $(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src/jla.cc
macro camelsrc "*.cc CMB/*.cc BAO/*.cc Lensing/*.cc pico/*.cc JLA/*.cc Class/*.cc Constraints/*.cc" macro camelsrc "*.cc CMB/*.cc BAO/*.cc Lensing/*.cc pico/*.cc JLA/*.cc Class/*.cc Constraints/*.cc"
library MinuitFit -no_share -s=../src/camel $(camelsrc) library MinuitFit -no_share -s=$(CAMELROOT)/src/camel $(camelsrc)
library MCMC -no_share -s=../src/camel/MCMC *.cc library MCMC -no_share -s=$(CAMELROOT)/src/camel/MCMC *.cc
macro CAMEL_linkopts "-L$(CAMEL_root)/${CMTCONFIG} -lMinuitFit -lMinuit -lMCMC -lCLHEP -lAbsRand -lUtil " macro CAMEL_linkopts "-L$(CAMELROOT)/${CMTCONFIG} -lMinuitFit -lMinuit -lMCMC -lCLHEP -lAbsRand -lUtil "
macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" ' macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" '
#CAMEL applications #CAMEL applications
# pour relinker si changement: toutes les application du package # pour relinker si changement: toutes les application du package
macro CAMEL_stamps " $(PACKAGE_ROOT)/$(CMTCONFIG)/MinuitFit.stamp $(PACKAGE_ROOT)/$(CMTCONFIG)/MCMC.stamp " macro CAMEL_stamps " $(CAMELROOT)/$(CMTCONFIG)/MinuitFit.stamp $(CAMELROOT)/$(CMTCONFIG)/MCMC.stamp "
macro application_suffix "" macro application_suffix ""
#groupe exec #groupe exec
application writeChi2 -group=exec -s=../src/camel exec/writeChi2.cc application writeChi2 -group=exec -s=$(CAMELROOT)/src/camel exec/writeChi2.cc
application writeSpectra -group=exec -s=../src/camel exec/writeSpectra.cc application writeSpectra -group=exec -s=$(CAMELROOT)/src/camel exec/writeSpectra.cc
application writeSpectraPk -group=exec -s=../src/camel exec/writeSpectraPk.cc application writeSpectraPk -group=exec -s=$(CAMELROOT)/src/camel exec/writeSpectraPk.cc
application Minimize -group=exec -s=../src/camel exec/Minimize.cc application Minimize -group=exec -s=$(CAMELROOT)/src/camel exec/Minimize.cc
application Profile -group=exec -s=../src/camel exec/Profile.cc application Profile -group=exec -s=$(CAMELROOT)/src/camel exec/Profile.cc
application ScanParam -group=exec -s=../src/camel exec/ScanParam.cc application ScanParam -group=exec -s=$(CAMELROOT)/src/camel exec/ScanParam.cc
application mcmc -group=exec -s=../src/camel/MCMC exec/mainMCMC.cc application mcmc -group=exec -s=$(CAMELROOT)/src/camel/MCMC exec/mainMCMC.cc
#tests #tests
application testKlass -group=test -s=../src/camel test/testKlass.cc application testKlass -group=test -s=$(CAMELROOT)/src/camel test/testKlass.cc
application testCLHEP -group=test -s=../src/camel/test testCLHEP.cc application testCLHEP -group=test -s=$(CAMELROOT)/src/camel/test testCLHEP.cc
application testBAO -group=test -s=../src/camel/test testBAO.cc application testBAO -group=test -s=$(CAMELROOT)/src/camel/test testBAO.cc
application testHiLLiPOP -group=test -s=../src/camel/test testHiLLiPOP.cc application testHiLLiPOP -group=test -s=$(CAMELROOT)/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
#lIST OF ALL DEPENDENCIES #lIST OF ALL DEPENDENCIES
macro_append Minimize_dependencies " MinuitFit " macro_append Minimize_dependencies " MinuitFit "
...@@ -111,5 +117,4 @@ macro_append testCLHEP_dependencies " CLHEP " ...@@ -111,5 +117,4 @@ macro_append testCLHEP_dependencies " CLHEP "
macro_append testBAO_dependencies " MinuitFit " macro_append testBAO_dependencies " MinuitFit "
macro_append testHiLLiPOP_dependencies " MinuitFit " macro_append testHiLLiPOP_dependencies " MinuitFit "
macro_append test_jla_dependencies " MinuitFit " macro_append test_jla_dependencies " MinuitFit "
macro_append testPico_dependencies " MinuitFit "
...@@ -7,20 +7,20 @@ macro cpp "icpc" ...@@ -7,20 +7,20 @@ macro cpp "icpc"
macro cppflags " -O2 -ip -ansi_alias -align -Wbrief -Wdeprecated -Wuninitialized -align -Wbrief -Wunused-function -Wpointer-arith -Wreturn-type" macro cppflags " -O2 -ip -ansi_alias -align -Wbrief -Wdeprecated -Wuninitialized -align -Wbrief -Wunused-function -Wpointer-arith -Wreturn-type"
#CAMEL includes #CAMEL includes
include_dirs " ../src" include_dirs " $(CAMELROOT)/src"
include_dirs "../src/camel" include_dirs "$(CAMELROOT)/src/camel"
include_dirs "../src/Minuit2-5.28.00/src" include_dirs "$(CAMELROOT)/src/Minuit2-5.28.00/src"
include_dirs "../src/Minuit2-5.28.00/inc" include_dirs "$(CAMELROOT)/src/Minuit2-5.28.00/inc"
include_dirs "../src/cxxsupport" include_dirs "$(CAMELROOT)/src/cxxsupport"
include_dirs "../src/AbsRand" include_dirs "$(CAMELROOT)/src/AbsRand"
include_dirs "../src/camel/JLA" include_dirs "$(CAMELROOT)/src/camel/JLA"
include_dirs "../src/camel/JLA/jla_likelihood_v3/src" include_dirs "$(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src"
#JLA :requires cblas/lapack (use intel versions) #JLA :requires cblas/lapack (use intel versions)
macro_append cppflags " -DJLA " macro_append cppflags " -DJLA "
macro_append CAMEL_linkopts " -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -ljla " macro_append CAMEL_linkopts " -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -ljla "
application test_jla -group=test -s=../src/camel test/test_jla.cc application test_jla -group=test -s=$(CAMELROOT)/src/camel test/test_jla.cc
#cfitsio #cfitsio
#cfitsio: here the CLIK version (below) will be used so no need #cfitsio: here the CLIK version (below) will be used so no need
...@@ -38,20 +38,20 @@ macro_append CAMEL_linkopts " $(CLIKLIBS) " ...@@ -38,20 +38,20 @@ macro_append CAMEL_linkopts " $(CLIKLIBS) "
macro_append cppflags " -DPICO $(PICOINC) " macro_append cppflags " -DPICO $(PICOINC) "
macro_append CAMEL_linkopts " $(PICOLIBS)" macro_append CAMEL_linkopts " $(PICOLIBS)"
macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" ' macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" '
application testPico -group=test -s=../src/camel/pico/exec testPico.cc application testPico -group=test -s=$(CAMELROOT)/src/camel/pico/exec testPico.cc
application FitClassFromPico -group=exec -s=../src/camel exec/FitClassFromPico.cc application FitClassFromPico -group=exec -s=$(CAMELROOT)/src/camel exec/FitClassFromPico.cc
#CAMEL LIBRARIES #CAMEL LIBRARIES
library Minuit -no_share ../src/Minuit2-5.28.00/src/*.cxx library Minuit -no_share $(CAMELROOT)/src/Minuit2-5.28.00/src/*.cxx
library Util -no_share -x=ddl.cc ../src/cxxsupport/*.cc library Util -no_share -x=ddl.cc $(CAMELROOT)/src/cxxsupport/*.cc
library AbsRand -no_share ../src/AbsRand/*.cc library AbsRand -no_share $(CAMELROOT)/src/AbsRand/*.cc
library CLHEP -no_share ../src/CLHEP/src/*.cc library CLHEP -no_share $(CAMELROOT)/src/CLHEP/src/*.cc
library jla -no_share ../src/camel/JLA/jla_likelihood_v3/src/ini.c ../src/camel/JLA/jla_likelihood_v3/src/jla.cc library jla -no_share $(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src/ini.c $(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src/jla.cc
macro camelsrc "*.cc CMB/*.cc BAO/*.cc Lensing/*.cc pico/*.cc JLA/*.cc Class/*.cc Constraints/*.cc" macro camelsrc "*.cc CMB/*.cc BAO/*.cc Lensing/*.cc pico/*.cc JLA/*.cc Class/*.cc Constraints/*.cc"
library MinuitFit -no_share -s=../src/camel $(camelsrc) library MinuitFit -no_share -s=$(CAMELROOT)/src/camel $(camelsrc)
library MCMC -no_share -s=../src/camel/MCMC *.cc library MCMC -no_share -s=$(CAMELROOT)/src/camel/MCMC *.cc
macro CAMEL_linkopts "-L$(CAMEL_root)/${CMTCONFIG} -lMinuitFit -lMinuit -lMCMC -lCLHEP -lAbsRand -lUtil " macro CAMEL_linkopts "-L$(CAMEL_root)/${CMTCONFIG} -lMinuitFit -lMinuit -lMCMC -lCLHEP -lAbsRand -lUtil "
macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" ' macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" '
...@@ -59,26 +59,26 @@ macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" ' ...@@ -59,26 +59,26 @@ macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" '
#CAMEL applications #CAMEL applications
# pour relinker si changement: toutes les application du package # pour relinker si changement: toutes les application du package
macro CAMEL_stamps " $(PACKAGE_ROOT)/$(CMTCONFIG)/MinuitFit.stamp $(PACKAGE_ROOT)/$(CMTCONFIG)/MCMC.stamp " macro CAMEL_stamps " $(CAMELROOT)/$(CMTCONFIG)/MinuitFit.stamp $(CAMELROOT)/$(CMTCONFIG)/MCMC.stamp "
macro application_suffix "" macro application_suffix ""
#groupe exec #groupe exec
application writeChi2 -group=exec -s=../src/camel exec/writeChi2.cc application writeChi2 -group=exec -s=$(CAMELROOT)/src/camel exec/writeChi2.cc
application writeSpectra -group=exec -s=../src/camel exec/writeSpectra.cc application writeSpectra -group=exec -s=$(CAMELROOT)/src/camel exec/writeSpectra.cc
application writeSpectraPk -group=exec -s=../src/camel exec/writeSpectraPk.cc application writeSpectraPk -group=exec -s=$(CAMELROOT)/src/camel exec/writeSpectraPk.cc
application Minimize -group=exec -s=../src/camel exec/Minimize.cc application Minimize -group=exec -s=$(CAMELROOT)/src/camel exec/Minimize.cc
application Profile -group=exec -s=../src/camel exec/Profile.cc application Profile -group=exec -s=$(CAMELROOT)/src/camel exec/Profile.cc
application ScanParam -group=exec -s=../src/camel exec/ScanParam.cc application ScanParam -group=exec -s=$(CAMELROOT)/src/camel exec/ScanParam.cc
application mcmc -group=exec -s=../src/camel/MCMC exec/mainMCMC.cc application mcmc -group=exec -s=$(CAMELROOT)/src/camel/MCMC exec/mainMCMC.cc
#tests #tests
application testKlass -group=test -s=../src/camel test/testKlass.cc application testKlass -group=test -s=$(CAMELROOT)/src/camel test/testKlass.cc
application testCLHEP -group=test -s=../src/camel/test testCLHEP.cc application testCLHEP -group=test -s=$(CAMELROOT)/src/camel/test testCLHEP.cc
application testBAO -group=test -s=../src/camel/test testBAO.cc application testBAO -group=test -s=$(CAMELROOT)/src/camel/test testBAO.cc
application testHiLLiPOP -group=test -s=../src/camel/test testHiLLiPOP.cc application testHiLLiPOP -group=test -s=$(CAMELROOT)/src/camel/test testHiLLiPOP.cc
application dump_clik -group=test -s=../src/camel test/test_clik.cc application dump_clik -group=test -s=$(CAMELROOT)/src/camel test/test_clik.cc
application dump_lensing -group=test -s=../src/camel test/test_lensing.cc application dump_lensing -group=test -s=$(CAMELROOT)/src/camel test/test_lensing.cc
#lIST OF ALL DEPENDENCIES #lIST OF ALL DEPENDENCIES
macro_append Minimize_dependencies " MinuitFit " macro_append Minimize_dependencies " MinuitFit "
......
package CAMEL package CAMEL
#THE FOLLWING LINKS TO YOUR CLASS LIBRARY- YOU CAN TEST WHICH ONE IN YOUR
#SHELL WITH THE FOLLWING COMMAND : cmt show uses
# you may put an explicit version instead of * (as v2.4.4 or v2.*...)
use class * use class *
#CLASS optional FastPk access
#macro_append cppflags " -DFASTPK "
#COMPILER - TO EASE PAIN USE THE SAME THAN FOR CLASS/CLIK COMPILATION
# DEFAULT IS gcc SO DO NOT UNCOMMENT IF YOUR ARE HAPPY WITH THIS (EXAMPLE FOR CHANGING TO ICPC)
#macro cpp "icpc"
#COMPILER FLAGS for default=gcc #compiler options
#C++ flags #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 " -O3 -pipe -ansi -fPIC -Wall "
# C flags
macro cflags " -O2 -fopenmp "
# or for icpc (if you changed previously the compiler otherwise don't touch) #do we need optimzations here?
#macro cppflags " -O2 -ip -ansi_alias -align -Wbrief " #macro_append cppflags "-ffast-math -m64 "
# # although it may be strange we do not compile CAMEL with OMP because CLASS is not thread safe
# CFITSIO IS REQUIRED. # no worries: CLASS is compiled with OMP
# include_dirs indicates the path to fitsio.h/ and CAMEL_linkopts teh #macro_append cppflags "-fopenmp "
# link to the propoer library. In the following we use the one that was macro_append cpplinkflags " -fopenmp "
# compiled when building CLIK but it can be also found
# in your /usr area. If the library is shared you may need to update your
# LD_LIBRARY_PATH or uncomment the next line before sourcing camel_setup.sh
#path_append LD_LIBRARY_PATH "$(CLIKDIR)/lib"
include_dirs "$(CLIKDIR)/include"
macro_append CAMEL_linkopts " -L$(CLIKDIR)/lib -lcfitsio"
#CAMEL includes
include_dirs " $(CAMELROOT)/src"
include_dirs " $(CAMELROOT)/src/camel"
include_dirs " $(CAMELROOT)/src/Minuit2-5.28.00/src"
include_dirs " $(CAMELROOT)/src/Minuit2-5.28.00/inc"
include_dirs "$(CAMELROOT)/src/cxxsupport"
include_dirs "$(CAMELROOT)/src/AbsRand"
include_dirs "$(CAMELROOT)/src/camel/JLA"
include_dirs "$(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src"
#cfitsio
include_dirs "/usr/include/cfitsio"
macro_append CAMEL_linkopts " -lcfitsio"
#JLA :requires cblas/lapack
#macro_append cppflags ' -DJLA '
#include_dirs "/usr/include/atlas"
#macro_append CAMEL_linkopts " -L/usr/lib64/atlas -ltatlas -llapack -ljla "
#application test_jla -group=test -s=$(CAMELROOT)/src/camel test/test_jla.cc
#library jla -no_share $(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src/ini.c $(CAMELROOT)/src/camel/JLA/jla_likelihood_v3/src/jla.cc
# PLANCK CLIK support [optional] #PLANCK
# NB: you always have access to PLanck/Hillipop (high-ell) likelihood since
# it is native in CAMEL.
# CLIKCFLAGS and CLIKLIBS were defined when you ran: camel_setup.sh
#macro_append cppflags " -DCLIK $(CLIKCFLAGS)" #macro_append cppflags " -DCLIK $(CLIKCFLAGS)"
#macro_append cflags " -DCLIK $(CLIKCFLAGS)" #macro_append cflags " -DCLIK $(CLIKCFLAGS)"
#macro_append CAMEL_linkopts " $(CLIKLIBS) " #macro_append CAMEL_linkopts " $(CLIKLIBS) "
#include_dirs "$(CLIKDIR)/include"
#include_dirs "$(CLIKDIR)/src"
#macro_append cppflags " -DCLIK "
#macro_append cflags " -DCLIK "
#macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lclik " #macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lclik "
#application dump_clik -group=test -s=../src/camel test/test_clik.cc #path_append LD_LIBRARY_PATH "$(CLIKDIR)/lib"
#application dump_lensing -group=test -s=../src/camel test/test_lensing.cc #application dump_clik -group=test -s=$(CAMELROOT)/src/camel test/test_clik.cc
#application dump_lensing -group=test -s=$(CAMELROOT)/src/camel test/test_lensing.cc
#JLA [optional] :requires cblas/lapack
# in most linux distributions packaged with the atlas library.
# if you installed CLIK you may also look for them in teh MKLROOT you used.
# macro_append cppflags ' -DJLA '
#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
# PICO [optional] # PICO
#macro_append cppflags " -DPICO $(PICOINC) " #macro_append cppflags " -DPICO $(PICOINC) "
#macro_append CAMEL_linkopts " -L$(PICO_CODE) -lpico -lpython2.7 " #macro_append CAMEL_linkopts " -L$(PICO_CODE) -lpico -lpython2.7 "
# if the previous link fails try using the PICOLIBS defined in camel_setup.sh # the previous line should be sufficient otherwise try the PICOLIBS
# (set in camel_setup.sh)
#macro_append CAMEL_linkopts " $(PICOLIBS)"
#macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" ' #macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" '
#application testPico -group=test -s=../src/camel/pico/exec testPico.cc #application testPico -group=test -s=$(CAMELROOT)/src/camel/pico/exec testPico.cc
#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
#application FitClassFromPico -group=exec -s=../src/camel exec/FitClassFromPico.cc
###########################################################################################
###FROM THERE YOU SHOUL NOT NEED TO TOUCH ANYTHING
###########################################################################################
#CAMEL includes
include_dirs " ../src"
include_dirs "../src/camel"
include_dirs "../src/Minuit2-5.28.00/src"
include_dirs "../src/Minuit2-5.28.00/inc"
include_dirs "../src/cxxsupport"
include_dirs "../src/AbsRand"
include_dirs "../src/camel/JLA"
include_dirs "../src/camel/JLA/jla_likelihood_v3/src"
###FROM THERE YOU DONT NEED TO TOUCH
###########################################################################################
#CAMEL LIBRARIES #CAMEL LIBRARIES
library Minuit -no_share ../src/Minuit2-5.28.00/src/*.cxx library Minuit -no_share $(CAMELROOT)/src/Minuit2-5.28.00/src/*.cxx
library Util -no_share -x=ddl.cc ../src/cxxsupport/*.cc library Util -no_share -x=ddl.cc $(CAMELROOT)/src/cxxsupport/*.cc
library AbsRand -no_share ../src/AbsRand/*.cc library AbsRand -no_share $(CAMELROOT)/src/AbsRand/*.cc
library CLHEP -no_share ../src/CLHEP/src/*.cc library CLHEP -no_share $(CAMELROOT)/src/CLHEP/src/*.cc
library jla -no_share ../src/camel/JLA/jla_likelihood_v3/src/ini.c ../src/camel/JLA/jla_likelihood_v3/src/jla.cc
macro camelsrc "*.cc CMB/*.cc BAO/*.cc Lensing/*.cc pico/*.cc JLA/*.cc Class/*.cc Constraints/*.cc" macro camelsrc "*.cc CMB/*.cc BAO/*.cc Lensing/*.cc pico/*.cc JLA/*.cc Class/*.cc Constraints/*.cc Pk/*.cc"
library MinuitFit -no_share -s=../src/camel $(camelsrc) library MinuitFit -no_share -s=$(CAMELROOT)/src/camel $(camelsrc)
library MCMC -no_share -s=../src/camel/MCMC *.cc library MCMC -no_share -s=$(CAMELROOT)/src/camel/MCMC *.cc
macro CAMEL_linkopts "-L$(CAMEL_root)/${CMTCONFIG} -lMinuitFit -lMinuit -lMCMC -lCLHEP -lAbsRand -lUtil " macro CAMEL_linkopts "-L$(CAMELROOT)/${CMTCONFIG} -lMinuitFit -lMinuit -lMCMC -lCLHEP -lAbsRand -lUtil "
macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" ' macro_append cppflags ' -DRELPATH=\"$(CAMELROOT)/lik\" '
#CAMEL applications #CAMEL applications
# pour relinker si changement: toutes les application du package # pour relinker si changement: toutes les application du package
macro CAMEL_stamps $(PACKAGE_ROOT)/$(CMTCONFIG)/MinuitFit.stamp macro CAMEL_stamps " $(CAMELROOT)/$(CMTCONFIG)/MinuitFit.stamp $(CAMELROOT)/$(CMTCONFIG)/MCMC.stamp "
macro application_suffix "" macro application_suffix ""
#groupe exec: to build run: make exec #groupe exec
application writeChi2 -group=exec -s=../src/camel exec/writeChi2.cc application writeChi2 -group=exec -s=$(CAMELROOT)/src/camel exec/writeChi2.cc
application writeSpectra -group=exec -s=../src/camel exec/writeSpectra.cc application writeSpectra -group=exec -s=$(CAMELROOT)/src/camel exec/writeSpectra.cc
application Minimize -group=exec -s=../src/camel exec/Minimize.cc application writeSpectraPk -group=exec -s=$(CAMELROOT)/src/camel exec/writeSpectraPk.cc
application ScanParam -group=exec -s=../src/camel exec/ScanParam.cc application Minimize -group=exec -s=$(CAMELROOT)/src/camel exec/Minimize.cc
application mcmc -group=exec -s=../src/camel/MCMC exec/mainMCMC.cc application Profile -group=exec -s=$(CAMELROOT)/src/camel exec/Profile.cc
application ScanParam -group=exec -s=$(CAMELROOT)/src/camel exec/ScanParam.cc
application mcmc -group=exec -s=$(CAMELROOT)/src/camel/MCMC exec/mainMCMC.cc
#tests #tests
application testKlass -group=test -s=../src/camel test/testKlass.cc application testKlass -group=test -s=$(CAMELROOT)/src/camel test/testKlass.cc
application testCLHEP -group=test -s=../src/camel/test testCLHEP.cc application testCLHEP -group=test -s=$(CAMELROOT)/src/camel/test testCLHEP.cc
application testBAO -group=test -s=../src/camel/test testBAO.cc application testBAO -group=test -s=$(CAMELROOT)/src/camel/test testBAO.cc
application testHiLLiPOP -group=test -s=../src/camel/test testHiLLiPOP.cc application testHiLLiPOP -group=test -s=$(CAMELROOT)/src/camel/test testHiLLiPOP.cc
#lIST OF ALL DEPENDENCIES #lIST OF ALL DEPENDENCIES
macro_append Minimize_dependencies " MinuitFit " macro_append Minimize_dependencies " MinuitFit "
macro_append Profile_dependencies " MinuitFit "
macro_append ScanParam_dependencies " MinuitFit " macro_append ScanParam_dependencies " MinuitFit "
macro_append writeChi2_dependencies " MinuitFit " macro_append writeChi2_dependencies " MinuitFit "
macro_append writeSpectra_dependencies " MinuitFit " macro_append writeSpectra_dependencies " MinuitFit "
macro_append mcmc_dependencies " MinuitFit MCMC" macro_append writeSpectraPkependencies " MinuitFit "
ma