Skip to content

Installation

ardok-m edited this page Jun 27, 2017 · 5 revisions

For a detailed description of the installation process (and failure solving) see CLASS' wiki installation page.

Dependencies

> gcc-4.2
= python-2.7
cython (for classy)
numpy (for classy and the others python modules)
scipy (for CPU.py)
matplotlib (for CPU.py and test_class.py)

Note: For python dependencies, a "just works" solution is Anaconda.

Download

In order to install hi_class we, first, must get a copy in your filesystem. Our recommended way is using git:

git clone https://github.com/miguelzuma/hi_class_public

This command will copy the git repository in our current working directory. Otherwise, we can download it from https://github.com/miguelzuma/hi_class_public/archive/hi_class.zip which we will have to uncompress (e.g. using unzip hi_class.zip).

Compilation

Now, we must change our working directory to the hi_class_public path:

cd hi_class_public

or, in case you used the zip file:

cd hi_class_public-hi_class

(this command assumes the uncompressed file are in our current working directory.

We can see the compilation options in the Makefile. Some processors need explicit linking of some libraries to have a working classy. If this is our case, we have to edit python/setup.py and change line 32 libraries=["class"], to libraries=["class", "mvec", "m"],. We are now ready to compile hi_class. Run

make

(or, for a faster compilation, make -j$(nproc), which will allow parallel compilation with as much jobs as processors our system has).