decoration
User: Guest (?)

Installation

Content

IMPORTANT! Recently the AliRoot code was transfered to a Subversion (SVN) repository.

HowTO for Subversion repository

Prerequisites

 Platforms and compilers

The code is actively maintained on:

  • Linux (Pentium, Itanium and Opteron):
    • gcc (versions 3.2 - 3.4.6,4.0-4.1). GNU license, free source distribution. Not very strict or ANSI compliant by default.
    • icc (Intel versions 7.0– 9.0). Free for non-commercial use, high performance compiler. Gives 20-30% improvement during the execution of AliRoot/Root. More difficult to debug.
  • Sun (SPARC, x86)
    • CC : extensive warnings, capable to detect noninitialized variables, etc. Integrated in Forte with debugger, profiler, and memory checker.
  • Alpha (OFS) - not supported anymore
    • cxx : strict compiler (relatively old), finds come problems not indicated by any other compiler
  • Mac (Darwin):
    • gcc: very sensitive to circular library dependences, initialization of global static variables, etc.

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 SVN command Dependencies
ROOT http://root.cern.ch svn co https://root.cern.ch/svn/root/tags/v5-26-00b root
  • libX11-devel
  • libXft-devel
  • libXpm-devel
  • libXext-devel
  • libxml2-devel
Geant 3   svn co https://root.cern.ch/svn/geant3/tags/v1-11 geant3  
Geant 4 http://geant4.web.cern.ch/geant4/  
Fluka http://www.fluka.org svn co https://alisoft.cern.ch/fluka_vmc/trunk fluka_vmc  
AliRoot http://alisoft.cern.ch/AliRoot/ svn co https://alisoft.cern.ch/AliRoot/trunk AliRoot

    OR

svn co https://alisoft.cern.ch/AliRoot/branches/v4-18-Release AliRoot_v4.18-Release
 

 

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 (now v5-26-00b is required)

 

cd /opt
svn co https://root.cern.ch/svn/root/tags/v5-26-00b root_v5.26.00
ln -s root_v5.26.00 root

OR (if a given revision of the trunk is needed. Example for revision 30988)

svn co https://root.cern.ch/svn/root/trunk root_trunk-rev30988 -r 30988
ln -s root_trunk-rev30988 root

 

A list of matching Root, Geant3 and AliRoot versions can be found at Releases

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 (minimal settings)
#!/bin/bash

ALIEN_ROOT=/afs/cern.ch/alice/library/afs_volumes/vol01/alien

./configure \
  --with-pythia6-uscore=SINGLE \
  --enable-alien --with-alien-incdir=${ALIEN_ROOT}/api/include \
  --with-alien-libdir=${ALIEN_ROOT}/api/lib

 

  • 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
svn co https://root.cern.ch/svn/geant3/tags/v1-11 geant3
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

 

cd $ALICE
svn co https://alisoft.cern.ch/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 and then

cd $ALICE

svn co https://alisoft.cern.ch/AliRoot/trunk AliRoot

   OR (in case the trunk does not compile)

svn co https://alisoft.cern.ch/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`.

 

External links

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

 

Last modified on 3/18/10
by: Peter Hristov (phristov)