Project

General

Profile

Admin guide » History » Version 8

Herbert Greenlee, 01/05/2015 02:56 PM

1 8 Herbert Greenlee
{{toc}}
2 8 Herbert Greenlee
3 1 Herbert Greenlee
h1. The experiment environment setup script
4 1 Herbert Greenlee
5 7 Herbert Greenlee
Every experiment has a script for initializing its standard software environment installed in a standard place.  This script may do any or all of the following things.
6 2 Herbert Greenlee
7 2 Herbert Greenlee
* Initialize ups products system and products areas.
8 2 Herbert Greenlee
* Set up some basic ups products.
9 2 Herbert Greenlee
* Set environment variables.
10 2 Herbert Greenlee
11 2 Herbert Greenlee
This section the recommended way of writing this script.
12 2 Herbert Greenlee
13 2 Herbert Greenlee
h2.  Initializing ups
14 2 Herbert Greenlee
15 2 Herbert Greenlee
After initializing ups, the following should be the case:
16 2 Herbert Greenlee
17 2 Herbert Greenlee
* The executable @ups@ should be on the execution path.
18 2 Herbert Greenlee
* Command or alias @setup@ should be defined.
19 3 Herbert Greenlee
* The products path (environment variable @PRODUCTS@) should be defined as a colon-separated list of ups products areas.
20 2 Herbert Greenlee
21 4 Herbert Greenlee
With respect to the last point, the products path may include the following ups products areas (in order).
22 2 Herbert Greenlee
23 2 Herbert Greenlee
* Experiment-specific products (e.g. @/grid/fermiapp/products/uboone@).
24 2 Herbert Greenlee
* Larsoft products (for larsoft experiments, e.g. @/grid/fermiapp/products/larsoft@).
25 2 Herbert Greenlee
* Fermilab common products (e.g. @/grid/fermiapp/products/common/db@).
26 2 Herbert Greenlee
27 5 Herbert Greenlee
Generally, ups is initialized by sourcing a script called "@setups@" (or "@setups.sh@" or "@setups.csh@", the name can vary) from some standard place.  It is acceptable to source multiple "@setups@" scripts from multiple products areas, as well as extending the products path to include additional products areas manually.
28 5 Herbert Greenlee
29 5 Herbert Greenlee
For larsoft experiments on nodes where the @/grid/fermiapp@ filesystem is mounted, the main @setups@ file path is @/grid/fermiapp/products/larsoft/setups@.
30 2 Herbert Greenlee
31 6 Herbert Greenlee
When initializing ups from the oasis cvmfs products area, the main larsoft @setups@ file path is @/cvmfs/oasis.opensciencegrid.org/fermilab/products/larsoft/setups.for.cvmfs@.
32 2 Herbert Greenlee
33 2 Herbert Greenlee
34 2 Herbert Greenlee
35 1 Herbert Greenlee
h1. Experiment-specific hooks