The SNO+ RAT code, tools, and documentation can be installed locally via snoing. This is the prefered method within the collaboration for personal/local installations. Lancaster snoing has all of this set up and maintained for use on the Lancaster EPP Cluster. With the right variables set, the Lancaster snoing scripts can also be used with a local snoing too.
snoing is maintained via Git, with a ‘central’/upstream repository on GitHub. To install RAT you need to be part of the SNO+ Organisation on GitHub. How to do this is explained in §2.1 of SNO+-doc-1462
.
A SSH key for GitHub is required to download all the snoing -dev
packages. Please follow GitHub’s own instructions of generating SSH keys.
snoing itself is written in Python, and SNO+’s software requires at least Python v2.6.6, but less than v3. You may wish to use a virtual environment for SNO+.
Installing
The environment variable SNOING
will be used as a place holder for the location you wish to install snoing.
$ git clone https://github.com/snoplus/snoing.git $SNOING
$ cd $SNOING
$ source env.sh
It is 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
Now you can run snoing to install software; e.g., to install the latest Water Fill Production version:
$ ./snoing.py rat-5.3.2
If no arguments are given, the default is to install rat-dev
. If you are missing any libraries, snoing will inform you of these; you will have to install them manually.
You have access to RAT software, you only need to source the environment file for the relevant version of RAT you wish to use; e.g., for the installed development version:
$ source $SNOING/install/env_rat-dev.sh
or for the latest Water Fill Production version
$ source $SNOING/install/env_rat-5.3.2.sh
It is important you have not sourced the snoing environment file when sourcing the RAT version you wish to use.
Updating
When you source the snoing environment file from within the snoing directory, it automatically updates itself (though it rarely needs updates).
To update the packages use the -p
flag, e.g.,
$ cd $SNOING
$ source env.sh
$ ./snoing.py -p rat-dev
will update rat-dev
; omitting the package will update all packages.
Using Lancaster snoing’s snoplus-env
Aquire the snoplus-env
script, either by cloning the repository https://github.com/parnmatt/snoplus-lancs.git
, or by (secure) copying the script from /snop/software/init/snoplus-env
, and place it in your PATH
; e.g.,
$ mkdir -p $HOME/.local/bin
$ export PATH=$HOME/.local/bin:$PATH
$ echo 'export PATH=$HOME/.local/bin:$PATH' > ~/.bash_profile
$ scp USERNAME@lapz.lancs.ac.uk:/snop/software/init/snoplus-env ~/.local/bin
It requires a few environment variables to work.
-
Point
SNOING
to your local installation of snoing. -
If you are using a Python Virtual Environment (via
virtualenv
), pointSNOPLUS_PYTHON_VENV_SCRIPT
to the activation script. -
The default is to use a local development version of RAT if no arguments are given. By setting
RATDEV_FALLBACK
totrue
, it will fallback to using the ‘global’ version (rat-dev
in snoing). -
If you are using a local development version of RAT, outside of snoing, in case you need
rat-dev
separate from your own work; pointRATDEV
to it’s path. Alternatively, pointRATDEV
to$SNOING/install/rat-dev
, if you want local and global labels to refer to yourrat-dev
in snoing. -
If you have a certain group set up for SNO+, you can set
SNOPLUS_GROUP
as the name of the group. -
If you wish to have a more in-depth setup, you can set a root level directory for your SNO+ software and configurations by setting
SNOPLUS_ROOT
.
A minimal example would be:
# ~/.bash_profile
export PATH=$HOME/.local/bin:$PATH
export SNOING=$HOME/development/snoing
export SNOPLUS_PYTHON_VENV_SCRIPT=$HOME/.venv/snoplus/bin/activate
A more advanced setup can be achieved by clone/fork the aforementioned Git repository, and using a tool like GNU Stow to ‘install’ the setup. For example at Lancaster, it was setup using:
$ git clone https://github.com/parnmatt/snoplus-lancs.git /snop/parnmatt
$ stow --dir=/snop/parnmatt/snoplus-lancs --target=/snop/software --stow env
(well close enough; it was actually setup using Git with the SSH protocol, with scp-like syntax URL; and the short option style for GNU Stow from within the repository — but you get the idea)
You can then edit and add to the configuration to fit your needs, after adding/removing files from your fork, you may also require a restow to ensure the new paths are symlinked, i.e.,
$ stow --dir=/snop/parnmatt/snoplus-lancs --target=/snop/software --restow env