Installation (Advanced)
Although the traditional way to install RAT, it is advised to use one of the other methods of installation. Compiling the dependencies and RAT individually can be quite involved. It is assumed you are comfortable with installing software from source on *nix systems.
It is suggested that you install as many dependencies through your system’s package manager as you can, including the libraries.
It is suggested to set a PREFIX
environment variable, e.g.,
-
admin access:
$ export PREFIX=/usr/local $ export OPTDIR=/opt
-
no admin access:
$ export PREFIX=$HOME/.local $ export OPTDIR=$PREFIX/opt
It is also suggested to set your MAKEFLAGS
environment variable to allow parallel jobs, thus compiling things quicker (below uses all the processors available). SNO+ does not use C++11 yet, therefore it is useful to disable the new application binary interface.
$ export MAKEFLAGS=-j$(nproc)
$ export CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
When installing from source, if you wish to install in a non-default location, e.g., you do not have admin access, you will need to use the --prefix=$PREFIX
configure option, or equivalent.
For a minimum installation of the current development version:
-
- ROOT requires this for computing discrete Fourier transforms
- Requires at least v3.3.4
- Package manager:
apt-get
:fftw3
,libfftw3-dev
yum
:fftw
,fftw-devel
- Compiling:
- Configure with the
--with-pic
option enabled - Note, you need configure ROOT with the
--with-fftw3-incdir=$PREFIX/include
and--with-fftw3-libdir=$PREFIX/lib
options; thelibdir
might be$PREFIX/lib64
, so check beforehand.
- Configure with the
-
- ROOT requires this for Most numerical computations
- Requires at least v1.16
- Package manager:
apt-get
:libgsl0-dev
,yum
:gsl
,gsl-devel
- Compiling:
- Configure with the
--with-pic
option enabled - Note, you need configure ROOT with the
--with-gsl-incdir=$PREFIX/include
and--with-gsl-libdir=$PREFIX/lib
options; thelibdir
might be$PREFIX/lib64
, so check beforehand.
- Configure with the
-
- RAT requires Python, so ROOT needs to be compiled to know of it
- Requires v2.6.6, but less than v3
- Package manager:
apt-get
:python
yum
:python
- Compiling
- Configure with the
--with-enablepip --enable-shared
options
- Configure with the
- You may wish to use a virtual environment for SNO+
-
- RAT requires this for transferring data
- Requires at least v7.26.0
- Package manager:
apt-get
:curl
,libcurl3
yum
:curl
,curl-devel
- Compiling:
- You will have to change RAT’s
config/EXTERNAL.scons
to point to the correct location
- You will have to change RAT’s
-
- RAT requires this for (un)compressing files
- Requires at least v1.0.6
- Package manager:
apt-get
:bzip2
,libbz2-1.0
yum
:bzip2
,bzip2-devel
- Compiling:
- You will have to change RAT’s
config/EXTERNAL.scons
to point to the correct location
- You will have to change RAT’s
-
-
RAT requires SCons to compile
-
Requires at least v2.3.4
-
Installing:
$ mkdir -p $OPTDIR $ tar -xaf scons-VERSION.tar.gz -C$OPTDIR
-
RAT needs to know where to find this
$ export RAT_SCONS=$OPTDIR/scons-VERSION
-
-
-
RAT requires ROOT
-
Requires v5.34, download latest patch, e.g., v5.34/36
-
Untar and build
$ tar -xaf root_v5.34.PATCH_NUMBER.source.tar.gz $ cd root $ ./configure --enable-minuit2 --enable-python --enable-mathmore $ make $ make install
-
RAT needs ROOT to be within the environment
$ source ${PREFIX:-/usr/local}/bin/thisroot.sh
-
-
-
RAT requires Geant4 for Monte-Carlo simulation of particles through matter
-
Requires v10.00 with patches up to 2, which can be hard to find:
-
Untar, make build directory, and build
$ tar -xaf geant4.10.00.p02.tar.gz $ mkdir -p geant4.10.00.p02-build $OPTDIR/geant4.10.00.p02 $ cd geant4.10.00.p02-build $ cmake -DGEANT4_INSTALL_DATA=ON -DCMAKE_INSTALL_PREFIX=$OPTDIR/geant4.10.00.p02 ../geant4.10.00.p02 $ make $ make install
-
RAT needs Geant4 to be within the environment
$ source $OPTDIR/geant4.10.00.p02/bin/geant4.sh
-
-
-
Clone the repository and configure, then build
$ git clone git@github.com:snoplus/rat $OPTDIR/rat $ cd $OPTDIR/rat $ ./configure $ source env.sh $ scons
-
There were a few environment variables that were set to install RAT, they are also needed to run RAT. It is suggested you create the following script to make you life a little easier:
# rat_env.sh for local installation
PREFIX=$HOME/.local
OPTDIR=$PREFIX/opt
export PATH=$PREFIX/bin:$PATH
source $PREFIX/root/bin/thisroot.sh
source $OPTDIR/geant4.10.00.p02/bin/geant4.sh
source $OPTDIR/rat/env.sh
Then you can just source rat_env.sh
and RAT is available to you.
Updating
RAT is managed via Git; therefore you should just pull the changes and rebuild.
$ source rat_env.sh
$ cd $RATROOT
$ scons -c
$ git pull
$ ./configure
$ source env.sh
$ scons