ALICE Off-line Project Logo Installation ALICE Logo

Content


Prerequisites

Environment

The code is actively maintained on Linux and HP (both CC and aCC compilers). It also runs on Compaq OSF1 and SunOS. 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 360MB for the system itself and 120MB for the ROOT system.

gmake

The installation is performed via the gmake program. gmake is the GNU version of make, it is free and, if missing on your machine, it can be loaded from the GNU Internet site ftp://ftp.gnu.ai.mit.edu/pub/gnu/make. gmake is compatible with the standard UNIX make and on the CERN ion WGS make is aliased to gmake. The only files you need for gmake are the executable gmake and the script autoconf, therefore you can copy such files from any site in a directory in your path.

ROOT

ROOT is available for many platforms, therefore in most cases no ROOT installation is required. To install ROOT on your machine, connect to the web site and follow the link downloads. Usually you should get the latest release, unless announced differently by the news of the Off-line Project.

All you need to do is download the compressed tar file, that usually is called root_v...tar.gzuncompress and untar it (we supposed you downloaded the tar file in your $HOME):

$ gunzip root_v...tar.gz
$ cd directory # name of the directory where you want ROOT to sit
$ tar xvf ~/root_v...tar

When tar ends, you will have the full root directory tree, with already installed libraries for your platform.

The following shell variables should be defined in the login scripts:

variablevalue
ROOTSYS directory/root
on all systems but HP-UX
LD_LIBRARY_PATH $LD_LIBRARY_PATH\:$ROOTSYS/lib
on HP-UX
SHLIB_PATH $SHLIB_PATH\:$ROOTSYS/lib
PATH $PATH\:$ROOTSYS/bin

Installation

  1. Install ROOT and define the necessary variables correctly.

  2. Decide where the code will reside (from here on directory).

  3. Define the following global variables in the login script

    variablevalue
    ALICE directory
    ALICE_LEVEL pro
    ALICE_ROOT $ALICE/$ALICE_LEVEL
    ALICE_TARGET `uname` (i.e. result of the Unix uname command)
    on all systems but HP-UX
    LD_LIBRARY_PATH $ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$LD_LIBRARY_PATH
    on HP-UX
    SHLIB_PATH $ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$SHLIB_PATH
    PATH $PATH\:$ALICE_ROOT/bin/tgt_${ALICE_TARGET}

    At this point you should logout, login again and check that the symbols are set correctly.

  4. Retrieve the AliRoot code. This code is available under 3 main versions (old, pro and new). Check the Releases page to select the appropriate version and get the corresponding CVS Tag. There are two ways to retrieve the code: the preferred way consists in retrieving a tar file on the ftp server and the slow and network consuming way is checking out the whole cvs tree using cvs. Cvsup may be available soon as an alternative.

  5. install the CERN library part

    $ cd $ALICE_ROOT
    $ gmake cernlibs
    

  6. Install the ALICE specific software

    $ cd $ALICE_ROOT
    $ gmake
    

  7. Copy the file $ALICE_ROOT/.rootrc to your home directory

  8. For users with c-like shells, update your search path:

    $ rehash
    

    This usually has to be done only once, after having defined the new PATH.

  9. Change to your home directory and run the code

    $ cd
    $ aliroot
    
    
    
    root [1] .x menu.C
    

Code development and user environment

If the ALICE environment is set up correctly, the $ALICE_ROOT/lib/tgt_$ALICE_TARGET directory is in the shared libraries load path, and the $ALICE_ROOT/bin/tgt_$ALICE_TARGET directory is in the PATH variable. This means that the command aliroot will in fact correspond to the file $ALICE_ROOT/bin/tgt_$ALICE_TARGET/aliroot.

This is convenient for the normal user, but as soon as the user wants to modify one or more directories, this arrangement becomes inefficient because if a local copy of one of the shared libraries is remade, the linker will always find the official unmodified one that sits in the above directory before the local one in the load library path. Moreover, and unless the full path is specified, the local version of the aliroot executable will be ignored and the official version executed.

Therefore in order to develop one or more packages locally (let's say the TPC) and make modifications, the following steps should be performed. The remote cvs server use and setup is explained in the code development section.



Preparation of the environment

$ mkdir AliRoot create the working directory
$ cd AliRoot set default to it
$ mkdir pro create pro subdirectory
$ cd pro set default to it
$ ln -s $ALICE_ROOT/* ./ link all files here
$ rm lib remove link for library, we need a local file here to containing the new TPC library
$ rm bin remove bin, we need a local copy of the aliroot executable
$ mkdir bin make a local bin directory
$ rm CVS remove the link to the CVS directory, we need a local one to check-out files
$ rm TPC remove link for TPC subdirectory, we need the real files here
$ rm ALIROOT remove link to ALIROOT subdirectory, may be this is not really necessary on all systems, but we do it just to be on the safe side
$ cvs co -r Release-3-XX TPC get from the cvs server the release version of the TPC files to be modified
$ cvs co -r Release-3-XX ALIROOT get from the server the release version of the ALIROOT files to recreate the executable
$ mkdir -p lib/tgt_$ALICE_TARGET create library directory
$ cd lib/tgt_$ALICE_TARGET set default to the lib directory
$ ln -s $ALICE_ROOT/lib/tgt_$ALICE_TARGET/* ./ link all libraries here
$ rm libTPC.sl (on HP)
$ rm libTPC.so (on the other systems)
remove link to TPC library, we need a real one
$ changeRoot $HOME/AliRoot change the AliRoot root to $HOME/AliRoot via the changeRoot command
$ rehash make sure that the new PATH is taken into account by the shell


Normal development cycle

$ cd $ALICE_ROOT/TPC (1) set default to TPC directory
$ make macroclean clean up all objects
$ emacs AliTPCv1.cxx (2) edit all the files...
$ make (3) recreate ../lib/libTPC.sl
$ cd ../ALIROOT set default to ALIROOT directory
$ make macroclean clean up object files
$ make make new executable
$ cd directory (4) set default elsewhere
$ aliroot (5) run aliroot

Steps 1-5 are the normal development cycle after the first pass through the procedure.


Please report problems to webmaster@alisoft.cern.ch