Clone wiki

cosmosis / bootstrap

Auto-Install CosmoSIS in 4 easy steps!

We have an installation script which installs cosmosis and all its dependencies that works on 64 bit Mac OSX Mavericks (10.9) and Scientific Linux 6 or its equivalents (CentOS, Redhat Enterprise).

Everything this script installs is put in a single directory which can be cleanly deleted and will not interfere with your other installed programs.

Other platforms will be supported in future, please contact the CosmoSIS development team to let us know of your interest and platform. The instructions here will not work for other platforms - please see the other set of instructions for installing on other platforms.

If you are installing CosmoSIS on the University of Chicago cluster, Midway, please follow the instructions here.

1 Install prerequisites (if necessary; typically these will already be available)

  • Git version control system (to see if git is installed, type "git help" at the prompt to see if you get the usage message)
  • Curl (used to automate downloading of CosmoSIS) (to see if curl is installed, type "curl --help" at the prompt to see if you get the usage message)

1.1 OSX

  • On OSX, Install Xcode and xcode command line tools <---- DO NOT IGNORE THIS LINE

First, make sure that you have Xcode installed. Xcode provides the Apple system compiler, so to check that you have it installed you can look for gcc:

$> type gcc

If the result is

gcc not found

you need to install Xcode, from the link given above.

Next, make sure you have the Xcode command line tools installed.

$> sudo xcode-select --install

If you already have the Xcode command line tools installed you might get the following error message when you try the above:

Can't install the software because it is not currently available from the Software Update server.

If so, then click "OK" and continue with the below. On newer versions of Apple's operating systems, the error message is

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

1.2 Scientific Linux 6.x (and other Red Hat Enterprise Linux 6.x derivatives)

  • On RHEL 6.x derivatives, you need to have the following set of RPM packages installed. <-- Do not ignore this line.

A minimal system will require the following RPM packages to be installed:

  • redhat-lsb-core
  • libpng-devel
  • freetype-devel
  • lapack-devel
  • git

Run the command

yum list redhat-lsb-core libpng-devel freetype-devel lapack-devel git lbzip2

If there are any packages listed in the 'Available packages' section of the output, you will need to have someone with superuser privileges install the packages listed.

This can be done with a single command at the terminal, but note that the root password will be required: $> su - -c "yum install redhat-lsb-core libpng-devel freetype-devel lapack-devel git lbzip2"

If redhat-lsb-core is missing, the cosmosis-bootstrap script will not be able to detect the operating system version, and will fail with a message that says the unknown operating system is not supported.

If any of the other packages is not present, the following cosmosis-bootstrap script will fail gracefully with an error message indicating which packages are missing.

2 Download and execute the bootstrap script by running the following lines. Make sure you are running the bash shell

(You can check whether you are running the bash shell by typing "echo $SHELL" at the prompt.)

$> curl -L --remote-name
$> chmod u+x cosmosis-bootstrap
$> ./cosmosis-bootstrap cosmosis #The argument is the new directory to put cosmosis in.  Change it to put it somewhere else
$> cd cosmosis # or if you changed it in the previous arg then whatever you put

Note: If you need older Planck and WMAP data add the -d flag to the ./cosmosis-bootstrap line - it may take about an hour.

If you want to get collaboration-specific modules you can add "-e <your collaboration name>" e.g. for DES: "-e des".

3 Set up the CosmoSIS environment (this must be done every time you use the program)

$> source config/setup-cosmosis

4 Build CosmoSIS libraries and included modules.

$> make

Now you can go back to the cosmosis home page and try the demos


A note for people who understand git: this procedure leaves you in a "detached head" state at the latest version. You can get to the bleeding edge with: git checkout master