CamelUse

part 3: Understanding the CAMEL stucture

On this page... (hide)

  1.   1.  At each session
  2.   2.  Structure of the code
  3.   3.  /cmt
  4.   4.  /$CMTCONFIG
  5.   5.  /lik
  6.   6.  /par
  7.   7.  /src
  8.   8.  /work

1.  At each session

You should always somewhere (as in your .bashrc file) define the relevant environment variables as described in here. From now on we go into CAMEL/your_version

At each session you should go into the /cmt directory and source camel_setup.sh

Be careful, it is a common mistake to forget it (and hard to debug)!

This defines the CAMELROOT variable as the root of your project. From there you can see:

2.  Structure of the code

We highlight the structure of the code. The camel specific software is located within src/camel


├── cmt
├── lik
│   ├── BAO
│   ├── bbn   
│   ├── class_pre
│   ├── HighEll
│   ├── HiLLiPOP
│   ├── JLA
│   ├── Lollipop
├── par
│   ├── attic
│   └── examples
├── src
│   ├── AbsRand
│   ├── camel
│   │   ├── BAO
│   │   ├── Class
│   │   ├── CMB
│   │   ├── Constraints
│   │   ├── exec
│   │   ├── JLA
│   │   │   └── jla_likelihood_v3
│   │   │       └── src
│   │   ├── Lensing
│   │   ├── MCMC
│   │   │   └── exec
│   │   ├── pico
│   │   │   └── exec
│   │   └── test
│   ├── CLHEP
│   │   ├── Matrix
│   │   ├── src
│   │   ├── Units
│   │   └── Vector
│   ├── cxxsupport
│   └── Minuit2-5.28.00
│       ├── config
│       │   └── m4
│       ├── doc
│       ├── inc
│       │   ├── Math
│       │   └── Minuit2
│       └── src
└── work
    ├── batch
    │   ├── cc
    │   └── nersc
    ├── batch_cc
    ├── bestfits
    │   └── bf
    ├── ref
    └── tools
        ├── awk
        ├── idl
        └── python


3.  /cmt

The /cmt directory is the place where you run all your make commands.

  • make : just creates the libraries. run make exec to have all executables (optionally make test ;
  • in case something goes wrong and you suspect it is just a CMT issue (for instance if you change a C++ class name) do cmt config then make clean; make exec or remove the $CAMELROOT/$CMTCONFIG directory;
  • you may recompile/clean executable separately, for example make writeSpectra; make writeSpectraclean i.e., you simply append "clean" (withtout space) to the name of the executable;
  • cmt show uses will show your class version;
  • cmt show macros, cmt show macro_value XXX to see more specific details on CMT variables;

4.  /$CMTCONFIG

The outputs of the make commands (objects, libraries, executales) are located in the directory named from the $CMTCONFIG variable (sometimes Linux-x86_64 or amd64_sl6, this depends on your CMT installation). Thus when you write scripts for running batchs you may reference the executables directory as $CAMELROOT/$CMTCONFIG

5.  /lik

This is the place for all configuration files of the likelihoods. You probably don't have to touch anything in it but you will need to reference what's in there in your parameter file. This directory also contains the links to camel_data and planck_data.

All the relative paths in your parameter file starts from here This is why you may write for example in your parameter file:

HiLLiPOP=HiLLiPOP/DX11dHM_superExt_CO_TT.lik
clikfile=planck_data/low_l/bflike/lowl_SMW_70_dx11d_2014_10_03_v5c_Ap.clik

6.  /par

This place holds several parameter files that are here to help you building your own. Look at the ones in "examples" (those in "attic" are most probably obsolete but may help figure out some setups). It is probably easier to browse the files directly from the GitLab repository.

7.  /src

This place contains the source code that is compiled by each user. CAMEL comes with a number of (nice) embedded software, namely:

  • MINUIT2: the C++ version of Minuit
  • CLHEP: a convenient high-level vector/matrix implementation (used for MCMC)
  • AbsRand: a C++ implementation of an excellent Random Number Generator (crucial for MCMC)
  • A few utilities extracted from HEALPix C++ are also shipped under src/cxxsupport: these are not spherical harmonics, but essentially CFITSIO routines (watch also paramfile.h and cxxutils.h which are pretty handy)

Any developer can (should) make use of these high-quality software.

Of course the CAMEL specific software is located in [ src/camel

8.  /work

  • batch_cc contains scripts for submitting jobs at ccin2p3 for the Planck group. You may need to adapt them or use them to write you own ones.
  • tools contains some useful scripts to analyze the jobs outputs. Again there are just indicative and it is probably better you write yours: for simplicity CAMEL output is always in the form of ASCII files.