Lancaster snoing

This is the simplest and quickest method of getting started with the SNO+ software. snoing has been installed on the EPP Cluster, with several versions of RAT preconfigured.

If you are not working directly with the RAT source code, this is the recommended method of using the SNO+ software at Lancaster.

If you are modifying the source code of RAT, refer to Local RAT Development to get that set up.

Just using RAT

All you need to do is append /snop/software/init to your PATH environment variable. If you are unsure which shell you use, assume bash.

# for bash, edit ~/.bash_profile
export PATH=PATH:/snop/software/init

# for zsh, edit ~/.zshenv
path+=(/snop/software/init)

You may need to (re)source your configuration files for this change to have any effect; i.e.,

$ source ~/.bash_profile

This puts the snoplus-env script into your PATH, which is the meat and potatoes of setting up the correct environment for your needs. You are welcome to have a read of the script to see what it is doing.

The script needs to be sourced, and you pass the version number of RAT you wish to use. There are convenient labels for the production releases; e.g.,

$ source snoplus-env water
Loaded RAT 5.3.2

You can also pass a path to a version of RAT using the -d flag. If using a relative path to a directory in the current working directory that shares a name with a label, precedence is given to the label; prepend the name with ./, or give the absolute path, to ensure it is treated as a directory.

Be aware, it will be treated as if calling for a local development version, with RATDEV set as the given path. This is intended for use of using an alternative version RAT than the one set via RATDEV.

For basic help, you can call with the -h flag. For more detailed help, there is a manual distributed with the snoplus-env script. Providing it is in your MANPATH, you can call it with:

$ man snoplus-env

It is unlikely to be in your MANPATH at all times,

$ source snoplus-env -m

is intended to try and display the manual. Alternate viewable formats are available:

Please refer to the manual as often as possible if you forget snoplus-env’s functionality or need to check the meaning of used variables or exit codes.

The snoplus-env labels

Characters within parentheses are optional, within brackets dictate a choice; such that you could type 5.3.2, water 1, water prod 1, water fill production 1, etc., to load RAT 5.3.2; te-diol or water and Te-Diol, etc., to load RAT 6.1.1.

Production version labels:

  • perylene( prod(uction))( numu)( 1)

    Perylene Production νμ, RAT 5.2.2

  • solar( prod(uction))( 1)

    Solar Production, RAT 5.2.3

  • partial water( fill)( prod(uction))( 1)

    Partial Water Fill Production, RAT 5.3.1

  • water( fill)( prod(uction)) 1

    Water Fill Production, RAT 5.3.2

  • water( fill)( prod(uction))( 2)
    [Tt]e-[Dd]iol( prod(uction)) 1
    water( fill)( and) [Tt]e-[Dd]iol( prod(uction))( 1)

    Water and Te-Diol Production, RAT 6.1.1

  • [Tt]e-[Dd]iol( prod(uction))( 2)

    Te-Diol Production, RAT 6.1.2

  • proc(essing) challenge 1

    Processing Challenge, RAT 6.2.0

  • proc(essing) challenge 2

    Processing Challenge (bugfix), RAT 6.2.1

  • proc(essing) challenge 3

    Processing Challenge update, RAT 6.2.2

  • proc(essing) challenge( 4)

    Processing Challenge update, RAT 6.2.3

Non-production version labels:

  • latest or new(est)

    The latest RAT release version installed via snoing.py.

  • local( dev(elop(ment)))

    Local development, this is the default if no argument is given, falling back on the global development version if no local exists, and RATDEV_FALLBACK is set (default is set).

  • global( dev(elop(ment)))

    Global development, this is in-line with the current development version of RAT (perhaps a day behind). This should not be considered stable.

Other flags:

  • -d path A path to a version of RAT; treated as if calling for a local development copy, with RATDEV set as the given path.

  • -h

    Prints basic help.

  • -m

    Open then manual by loading the environment first, to ensure it is in your MANPATH.

  • -i

    Prints relevant environment variables

  • -s

    Load snoing environment rather than RAT environment. This is intended for installing software by the SNO+ ‘admin’. You should not need to use this.

  • -l

    List all the versions of RAT installed on the EPP Cluster.

  • -f exec-path

    An executable, like a bash script, to be executed from within the SNO+ environment, and exit on completion.

Environment Variables

Lancaster snoing’s Configuration Variables

  • RATDEV

    If you are using a local development version, this should point the it’s path.

  • RATDEV_FALLBACK

    If set, and no RATDEV is not defined, and a local development version is requested, the environment falls-back to using the global development version of RAT.

    It is set by default. You can override this by setting RATDEV_FALLBACK to null; i.e.,

    # ~/.bash_profile or ~/.zshenv
    
    export RATDEV_FALLBACK=
    

    If set to null, environment scripts will exit with exit code 127 if a local development is requested. This behaviour might be required for automated processes.

  • SNOING

    Refers to the location of Lancaster snoing ($SNOPLUS_ROOT/opt/snoing). Do not set this variable, unless you are purposefully using your own local version of snoing on the cluster, and wish to use snoplus-env to manage your environments.

  • SNOPLUS_DEFAULT_ENV

    Determines the default environment to load when no arguments given to snoplus-env (default is local development version).

  • SNOPLUS_GROUP

    On the cluster, those working on SNO+ should be within the snop group. This environment variable is to store this group name and should not be set in your configuration.

    It is used to ensure in the environment, the user’s active group is snop. By abstracting it to a variable allows for the script to be used externally to the cluster, i.e., with a local snoing on your laptop.

  • SNOPLUS_PYTHON_VENV_SCRIPT

    If you are using a Python Virtual Environment (via virtualenv), this should point to the activate script.

    SNO+ Lancaster has it’s own Python setup like a virtual environment, with an activation script, /snop/software/sbin/python_venv_activate.

  • SNOPLUS_ROOT

    This refers to the location of the SNO+ software root directory (/snop/software). Do not set this variable in your local configuration.

It is important that you do not set the following variables:
SNOPLUS_ENV, SNOPLUS_ENV_SCRIPT, SNOPLUS_ENV_ARGS, SNOPLUS_RUN_FILE

RAT’s Variables

Do not changed these, these are explicitly set in the environment scripts for ROOT, Geant4, and RAT.

These are less important to know, these are just here for your reference, as they ‘pollute’ your global namespace; those marked with † are not exported. You are likely to only need to know RATROOT and ROOTSYS.

  • g4sls_sourced_dir: Refers to the sourced directory of the Geant4 environment †
  • Geant4 data files:
    • G4NEUTRONHPDATA
    • G4LEDATA
    • G4LEVELGAMMADATA
    • G4RADIOACTIVEDATA
    • G4NEUTRONXSDATA
    • G4PIIDATA
    • G4REALSURFACEDATA
    • G4SAIDXSDATA
    • G4ABLADATA
  • geant4_envbindir: Geant4’s bin
  • GLG4DATA: RAT’s data files
  • RAT_CFLAGS: RAT’s compilation flags
  • RAT_SCONS: Refers to SCons for building RAT
  • RATROOT: Refers to the root of the RAT
  • RATSYSTEM: The operating system installed for, i.e., Linux
  • ROOTSYS: Refers to the version of ROOT for RAT to use

You may wish to use RATROOT in scripts for automating process within the current RAT environment. If you are unfamiliar with ROOT, you can use ROOTSYS to find the ROOT tutorials ($ROOTSYS/tutorials).

Note: If a local development version of RAT is used via RATDEV, then RATDEV and RATROOT refer to the same path; however, they are semantically different.