Skip navigation.
Home

AliRoot Installation

Content


HowTO for Subversion repository

Prerequisites

 

Hardware requirements

  • Hard disk - at least 50 GB free disk space
  • Processor - 64 bit (strongly encourged) or 32 bit, no speed requirement
  • RAM – minimum 2 GB + how much your other applications are consuming
  • Video card - ATI/Nvidia (or compatible) with minimum  512 MB of RAM
  • Internet connection – minimum 1 Mb/s (incoming/outgoing).

     Note about Linux SWAP partition

Linux SWAP partition size should be chosen as max(6, 3*RAM) GB

 

Operation System requirements

  • Any Linux distribution with libc library version at least 2.5
  •        Compiler versions:
                gcc - versions at least 4.1.2
                icc - versions 7.0 - 9.0
  • Mac OS X v10.5 and v10.6
  •        Compiler versions:
                gcc - versions at least 4.2 (to update gcc version, Xcode developer tools suite should be installed).

We welcome feedback from the installation on other systems and we will be happy to consider modifications and corrections necessary to make the installation possible.

The disk space required for a full installation of AliRoot is 3GB for the system itself and 480MB for the ROOT system.

 

Installation

Environment variables

Before the installation of AliRoot the user has to set some environment variables. In the following examples the user is working on Linux and the default shell is bash. It is enough to add to the .bash_profile file few lines as shown below:

 

# ROOT
export ROOTSYS=/opt/root
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib

# AliRoot
export ALICE=/opt/alice
export ALICE_ROOT=$ALICE/AliRoot
export ALICE_TARGET=`root-config --arch`

export PATH=$PATH:$ALICE_ROOT/bin/tgt_${ALICE_TARGET}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALICE_ROOT/lib/tgt_${ALICE_TARGET}

# GEANT 3
export PLATFORM=`root-config --arch`
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALICE/geant3/lib/tgt_${ALICE_TARGET}

# Geant4
export CLHEP_BASE_DIR=$ALICE/CLHEP

# Flupro
export FLUPRO=/opt/alice/fluka
export FLUKALIB=$ALICE/fluka_vmc/lib/tgt_$ALICE_TARGET
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FLUKALIB

 where "/home/mydir" has to be replaced with the actual directory path. The meaning of the
environment variables is the following:

  • ROOTSYS ­ the place where the ROOT package is located;
  • ALICE ­ top directory for all the software packages used in ALICE;
  • ALICE_ROOT ­ the place where the AliRoot package is located, usually as subdirectory of ALICE;
  • ALICE_TARGET ­ specific platform name. Up to release v4-01-Release this variable was set to the result of "uname" command. Starting from AliRoot v4-02-05 the ROOT naming schema was adopted, and the user has to use "root-config ­--arch" command.
  • PLATFORM ­ is the same as ALICE_TARGET for the GEANT 3 package. Until GEANT 3 v1-0 the user had to use `uname` to specify the platform. From version v1-0 on the ROOT platform is used instead ("root-config --­arch"). Please note that the GEANT3 is located in the $ALICE directory  

Software packages

AliRoot uses the ROOT system as a foundation on which the framework for simulation, reconstruction and analysis is built.

Except for large existing libraries, such as Pythia6 and HIJING, and some remaining legacy code, this framework is based on the Object Oriented programming paradigm, and it is written in C++.

The following packages are needed to install the fully operational software distribution (please check also that you have all necessary dependencies for each package):

 

Software Website Dependencies
ROOT http://root.cern.ch
  • libX11-devel
  • libXft-devel
  • libXpm-devel
  • libXext-devel
  • libxml2-devel
  • libglu-devel
Geant 3  https://root.cern.ch/svn/geant3/  
Geant 4 http://geant4.web.cern.ch/geant4/
Fluka http://www.fluka.org  
AliRoot Guest: http://svn.cern.ch/guest/AliRoot
CERN users: https://svn.cern.ch/reps/AliRoot
 

 

A list of matching Root, Geant3 and AliRoot versions can be found here:

 

ROOT

There is a nice ROOT user's guide which incorporates important and detailed information. For those who are not familiar with ROOT a good staring point is the ROOT Web page at http://root.cern.ch . Here the experienced users may find easily the latest version of the class descriptions and search for useful information.

The recommended way to install ROOT is from the SVN sources, as it is shown below:

  • Download (check out) the needed ROOT version
cd /opt
 
Check out the needed ROOT version - consult the table above
 
ln -s root_version root

The code is stored in the directory "root" (the last argument of the svn co command). You have to go there, set the ROOTSYS environment variable (if this is not done in advance),and configure ROOT. The ROOTSYS contains the full path to the ROOT directory.

  • Configuration script for Root with AliEn support (requires aliensh)
#!/bin/bash
ALIEN_ROOT=/afs/cern.ch/alice/library/afs_volumes/vol01/alien

./configure \
--with-f77=YOUR_FORTRAN_COMPILER \
--with-pythia6-uscore=SINGLE \
--enable-roofit \
--enable-minuit2 \
--with-alien-incdir=${ALIEN_ROOT}/api/include \
--with-alien-libdir=${ALIEN_ROOT}/api/lib \
--with-monalisa-libdir=${ALIEN_ROOT}/api/lib \
--with-monalisa-incdir=${ALIEN_ROOT}/api/include \
--with-xrootd-incdir=${ALIEN_ROOT}/api/include/xrootd \
--with-xrootd-libdir=${ALIEN_ROOT}/api/lib \
--disable-editline \
--enable-gsl-shared \
--disable-globus \
--build=debug

 

  • Now you can compile and test ROOT.

  Compiling and testing ROOT

#!/bin/bash

make
cd test
make
export LD LIBRARY PATH=$LD_LIBRARY_PATH:.
./stress
./stressHepix


At this point the user should have a working ROOT version. In case you want to change the platform or the configuration options, please see ./configure --help

GEANT 3

The installation of GEANT 3 is needed since for the moments this is the default particle transport package. A GEANT 3 description is available at http://wwwasdoc.web.cern.ch/wwwasdoc/geant_html3/geantall.html. You can download the GEANT 3 distribution from the ROOT SVN repository and compile it in the following way:

Make GEANT3

cd $ALICE
Check out the needed ROOT version - consult the table above
cd $ALICE/geant3
make

Please note that GEANT 3 is downloaded in $ALICE directory. This feature is used in AliRoot to set correctly the include path to TGeant3.h. Another important feature is the PLATFORM environment variable. If it is not set, the makefile sets it to the result of `root-config --­arch`.

GEANT 4:  

Please follow the instructions from the VMC page

http://root.cern.ch/drupal/content/installing-geant4vmc

Fluka

The installation of FLUKA consists of the following steps:

 

cd $ALICE
mkdir fluka
cd fluka
tar xzf <path_to_fluka_archive>/fluka.tar.gz

  • Download and compile fluka_vmc (Note that fluka_vmc repository was migrated from https://alisoft.cern.ch to CERN Central SVN Service)

 

cd $ALICE
svn co https://svn.cern.ch/reps/fluka-vmc/trunk fluka_vmc
cd fluka_vmc/source
make

For convenience, add the last two lines to your shell customisation file (.bash_profile, .zshenv, ...).

  • Create a working directory to run aliroot using FLUKA

 

cd $ALICE ROOT/TFluka/scripts
./runflukageo.sh

 

This script creates the directory tmp and inside all the necessary links for data and configuration files and starts aliroot. For the next run it is not necessary to run the script again. The tmp directory can be kept or renamed. The user should run aliroot from inside this directory.

AliRoot

The AliRoot distribution is taken from the SVN repository.

AliRoot SVN repository was migrated to CERN Central SVN Service. To comply with the central service rules, all users that commit changes to repository need to have a valid CERN computing account.

Access to CERN Central SVN service is split between anonymous users and CERN registered users

cd $ALICE
svn co http://svn.cern.ch/guest/AliRoot/trunk AliRoot (or for CERN users)
    svn co https://svn.cern.ch/reps/AliRoot/trunk AliRoot
    svn co svn+ssh://svn.cern.ch/reps/AliRoot/trunk AliRoot
 
OR (in case the trunk does not compile, check out the needed AliRoot version - consult the table above)
 
svn co http://svn.cern.ch/guest/AliRoot/branches/v4-18-Release AliRoot_v4.18-Release (or for CERN users)
    svn co https://svn.cern.ch/reps/AliRoot/branches/v4-18-Release AliRoot_v4.18-Release
    svn co svn+ssh://svn.cern.ch/reps/AliRoot/branches/v4-18-Release AliRoot_v4.18-Release
ln -s AliRoot_v4.18-Release AliRoot

cd $ALICE_ROOT
make

The AliRoot code (the above example retrieves the trunk version from SVN) is contained in ALICE_ROOT directory. The ALICE_TARGET is defined automatically in the ".bash_profile" via the call to `root-config --arch`.

Important! The instructions above a valid for AliRoot including v4-20-Release. The SVN trunk now uses CMake as build system. Please consult the file README_CMake that comes with the AliRoot distribution.

Migration to CERN Central SVN Service and switching between the 2 repository locations

In case that you already have a copy from alisoft.cern.ch repository, you can switch to the new location without deleting your local copy using svn command switch

cd $ALICE_ROOT
svn switch --relocate https://alisoft.cern.ch/AliRoot/ https://svn.cern.ch/reps/AliRoot/

For more information about CERN Central SVN Service and how to access the repositories please visit http://svn.web.cern.ch/svn/howto.php#Accessing_a_project
For support and features requests please send an email to svn.support@cern.ch

 

External links

ALICE Offline framework to compile under Ubuntu or Mac (Dario Berzano's Wiki)