part 2: compiling CAMEL for each user

On this page... (hide)

  1.   1.  Pre-requisites
  2.   2.  Get the CAMEL software
  3.   3.  Compilation
  4.   4.  Tests

Each user must retrieve the code through git and compile/link it.

[cc-inp3 users: do not use your $HOME directory, go into your /sps workspace]

1.  Pre-requisites

2.  Get the CAMEL software

CAMEL is distributed through git. If you wish to work with the master branch (which allows easier updates):

git clone CAMEL/HEAD

note the HEAD sub-directory that is needed for CMT.

Although we always try to maintain a stable master branch, you may also use the latest "v*" branches (that are thoroughly tested). To list the available branches do:

git ls-remote 

Then choose the most recent one (let us call it vXX) and clone it in the CMT/vXX corresponding directory with (replace vXX by the proper version):

git clone -b vXX CAMEL/vXX

3.  Compilation

  • Go into the cmt/ directory.
  cd CAMEL/vXX/cmt 

From now on all commands will be issued from here.

  • You need a valid requirements file (this replaces the Makefile and is much more user friendly).
    • CC-IN2P3 users:
  ln -s requirements 
  • NERSC users: the following one is slightly better optimized:
  ln -s requirements.nersc requirements 
  • Others will have to adapt the file at the site. You may start with requirements-lite, which is largely commented and/or have a look at 2 implementations depending on the compiler: requirements-gcc (gnu-gcc) and requirements-icc (intel icpc)
  • Define the local setup:

This defines your environment and in particular the CAMELROOT and CMTCONFIG folders. IT MUST BE PERFORMED AT EVERY SESSION

You should see some information on the variables that are defined, of the kind

# Selection :
use CMT v1r26 (/project/projectdirs/lsst/CAMEL)
use class v2.5.0  (/project/projectdirs/lsst/CAMEL)
your CAMELROOT is /global/homes/p/plaszczy/CAMEL/HEAD

If somethings goes wrong when executing, try to clean with

cmt clean
cmt config

and try again

  • compile+link:
make exec

(TIP: make -j8 will run on 8 cores...) make creates libraries and make exec the executables that are located in: CAMELROOT/$CMTCONFIG

4.  Tests

To check everything is OK: (assuming you are in /cmt):

 make test
  • CLHEP test:

a very basic test (essentially to test something runs)

  • CLASS/C++ interface:
  • SN/JLA test:

(should return about 703.525)

  • computing a chi2 of some likelihoods:
../$CMTCONFIG/writeChi2 ../par/examples/TE/hlpTE_tp_BAO12_LCDM_nl.par

a very complete test: watch the chi2 value that should be close to: CHI2=22706.5


If CLIK installed:

  • clik likelihoods tests :
../$CMTCONFIG/dump_clik ../lik/planck_data/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik
  • click lensing likelihood test:
../$CMTCONFIG/dump_lensing ../lik/planck_data/lensing/smica_g30_ftl_full_pttptt.clik_lensing 

if Pico installed

  • PICOtest :

If all these (interactive) set of test go to the end, you should be quite safe continuing with understanding the CAMEL structure.