43rd Saas-Fee Course
Star formation in galaxy evolution: connecting numerical models to reality
11-16 March 2013

Installation instructions for Linux:

Prerequisite:
  1. a C/C++ compiler (for example, GCC)
  2. a fortran compiler (for example, gfortran)
  3. some very common tools (wget, tar, autoconf)
  4. OpenMPI, an open source high performance message passing library.
  5. The GNU Scientific Library (GSL)
  6. FFTW (version 2.5.1), C subroutine library for computing the discrete Fourier transform.
  7. ffmpeg, a complete, cross-platform solution to record, convert and stream audio and video.
  8. Python (version 2.6.x or 2.7.x)
  9. NumPy
  10. Matplotlib, a python 2D plotting library
Comments:
  • In the following, we will assume that all tools will be installed in a directory called sf2013 in your home directory. Thus, start by running the following command:
    mkdir ~/sf2013
  • Most of the libaries and tools listed above are very common and are easy installed from binaries provided by your favorite linux distribution. If you are running a linux distribution based on RPM packages (for example Redhat, CentOs, Fedora, Scientific Linux, Suse, OpenSuse), use "yum". If you are running a linux distribution based on Debian packages (Debian, Ubuntu), use "apt-get".

  • The FFTW library is a bit more tricky to install as we will use an old version compiled both for simple and double precision. We install it in the sf2013 directory. See the instructions below:
    1. download the tar file and uncompress it:
      wget http://www.fftw.org/fftw-2.1.5.tar.gz
      tar -xzf fftw-2.1.5.tar.gz
      cd fftw-2.1.5
    2. compile and install it in your home in single precision:
      ./configure --prefix=$HOME/sf2013/fftw-2.1.5 --enable-type-prefix --enable-mpi --enable-float
      make
      make install
    3. compile and install it in your home in double precision:
      ./configure --prefix=$HOME/sf2013/fftw-2.1.5 --enable-type-prefix --enable-mpi
      make
      make install

N_genIC:

IC-Code for cosmological structure formation.

  • author: Volker Springel

Installation:

    1. move to the sf2013 directory
      cd ~/sf2013
    2. download the tar file:
      wget http://lastro.epfl.ch/conferences/sf2013/download/n-genic-sf2013.tar.gz
    3. uncompress and untar it:
      tar -xzf n-genic-sf2013.tar.gz
      cd N-GenIC
    4. compile it:
      make
      at this point, you should end up with a binary file called N-GenIC


Gadget-2:

Code for cosmological N-body/SPH simulations on massively parallel computers.


Installation:

    1. move to the sf2013 directory
      cd ~/sf2013
    2. download the tar file:
      wget http://lastro.epfl.ch/conferences/sf2013/download/gadget-2.0.7-sf2013.tar.gz
    3. uncompress and untar it:
      tar -xzf gadget-2.0.7-sf2013.tar.gz
      cd Gadget-2.0.7/Gadget2/
    4. compile it:
      make
      at this point, you should end up with a binary file called Gadget2


FoF_Special:

A Firends of Friends (FOF) halo finder.

  • author: Volker Springel

Installation:

    1. move to the sf2013 directory
      cd ~/sf2013
    2. download the tar file:
      wget http://lastro.epfl.ch/conferences/sf2013/download/fof-sf2013.tar.gz
    3. uncompress and untar it:
      tar -xzf fof-sf2013.tar.gz
      cd FoF_Special
    4. compile it:
      make
      at this point, you should end up with a binary file called FoF_Special


Athena:

A grid-based code for astrophysical magnetohydrodynamics (MHD).


Installation:

    1. move to the sf2013 directory
      cd ~/sf2013
    2. download the tar file:
      wget http://lastro.epfl.ch/conferences/sf2013/download/athena4.1-sf2013.tar.gz
    3. uncompress and untar it:
      tar -xzf athena4.1-sf2013.tar.gz
      cd athena4.1
    4. configure it:
      autoconf
      ./configure
    5. compile it:
      make all
      make test
      if everything goes fine, you shoud end up with similar lines:
      (cd tst/1D-mhd; ./run.test)
      zone-cycles/cpu-second = 6.192302e+05
      zone-cycles/wall-second = 6.160847e+05
      L1 norm for density: 6.333383e-11


Cloudy:

A spectral synthesis code designed to simulate conditions in interstellar matter under a broad range of conditions.


Installation:

    1. move to the sf2013 directory
      cd ~/sf2013
    2. download the tar file:
      wget http://lastro.epfl.ch/conferences/sf2013/download/c10.00-sf2013.tar.gz
    3. uncompress and untar it:
      tar -xzf c10.00-sf2013.tar.gz
      cd c10.00/source
    4. edit the file path.h. Change the line:
    5. #define CLOUDY_DATA_PATH "/usr/local/cloudy/data:/home/user/cloudy/data"
      with:
      #define CLOUDY_DATA_PATH "/home/your_username/sf2013/cloudy/data"
      where "your_username" is obviously your user name.

    6. configure it:
    7. ./configure.sh gcc
      if you are using another compiler than gcc, or if you need specific option related to your OS, follow this link.

    8. compile it:
    9. make
      if everything goes fine, you shoud end up with a binary file called cloudy.exe.

      However, if compiling Cloudy produces the following error:
      "g++ -ansi -O3 -ftrapping-math -fno-math-errno -ftree-vectorize -Wall -W -g -DSVN_REVISION=\"Unversioned directory\" -DSYS_CONFIG=\"/home/Home/SF2013/tmp/c10.00/source/cloudyconfig.h\" -o cddefines.h.gch cddefines.h g++: directory": No such file or directory :0:14: warning: missing terminating " character Makefile:185: recipe for target `cddefines.h.gch' failed make: *** [cddefines.h.gch] Error 1"
      then the Makefile needs to be edited and the following line:
      REVISION := ${shell $(SVNVER) $(SRCDIR)}
      must be replaced with :
      REVISION := AAA
      or with any other unquoted string with no whitespaces.


RADMC-3D:

A new multi-purpose radiative transfer tool.


Installation:

    1. move to the sf2013 directory
      cd ~/sf2013
    2. download the tar file:
      wget http://lastro.epfl.ch/conferences/sf2013/download/radmc-3d_v0.35_04.02.13.tar.gz
    3. uncompress and untar it:
      tar -xzf radmc-3d_v0.35_04.02.13.tar.gz
      cd radmc-3d/version_0.35/src/
    4. compile it:
    5. make
      if everything goes fine, you shoud end up with a binary file called radmc3d.