Installation for developers¶
Development workflow¶
Installing CCL on the system is not a good idea when doing development, you can compile and run all the libraries and examples directly from your local copy. The only subtlety when not actually installing the library is that one needs to define the environment variable CCL_PARAM_FILE
pointing to include/ccl_params.ini
:
$ export CCL_PARAM_FILE=/path/to/your/ccl/folder/include/ccl_params.ini
Failure to define this environment variable will result in violent segmentation faults!
Working on the C library¶
Here are a few common steps when working on the C library:
Cloning a local copy and CCL and compiling it:
$ git clone https://github.com/LSSTDESC/CCL
$ mkdir -p CCL/build && cd CCL/build
$ cmake ..
$ make
Updating local copy from master, recompiling what needs recompiling, and running the test suite:
$ git pull # From root folder
$ make -Cbuild # The -C option allows you to run make from a different directory
$ build/check_ccl
Compiling (or recompiling) an example in the CCL/examples
folder:
$ cd examples # From root folder
$ make -C../build ccl_sample_pkemu
$ ./ccl_sample_pkemu
Reconfiguring from scratch (in case something goes terribly wrong):
$ cd build
$ rm -rf *
$ cmake ..
$ make
Working on the Python library¶
Here are a few common steps when working on the Python module:
Building the python module:
$ python setup.py build
After that, you can start your interpreter from the root CCL folder and import pyccl.
Running the tests after a modification of the C library:
$ python setup.py build
$ python setup.py test