D0race

Installation of D0 Software Releases

Before we can install D0 software there are a few UPS/UPD configuration issues to be addressed.  As root, create the directories:

/d0dist/dist
/d0usr/products

(As usual these can be links rather than actual directories.)  Next, change directory into /d0dist/dist, and download the file UPSd0dist.tar.gz into this directory.  Similarly, download UPSd0uprod.tar.gz into /d0usr/products.  (Actually theses files can be downloaded into and executed from any convenient location -- the above is one example.)  From each directory unzip & untar the files:

> tar zxvf UPS*.tar.gz

The scripts fix-*.sh (courtesy Alan Jonckheere) will update UPS with the correct locations where the D0 software is to be installed (i.e., /d0dist/dist & /d0usr/products).  Execute the scripts and answer yes at the prompt.  Now edit the file /fnal/ups/etc/upsdb_list (which is equivalent to $SETUPS_DIR/upsdb_list, if UPS was previously setup) to indicate the location of your local UPS databases.  Typically this includes:

/fnal/ups/db (or ~products/db -- same thing)
/d0usr/products/upsdb
/d0dist/dist/upsdb

The default version will probably include:

/afs/fnal/ups/db
/local/ups/db

These entries can be commented out, but leaving them is o.k.  One final modification -- change directory to /fnal/ups/db/.updfiles (same as ~products/db/.updfiles).  A new version of updconfig will be used, so change the name of the original:

> mv updconfig updconfig_original

Now download the new version of updconfig into this same directory.  This file has four main sections, each with the heading COMMON:.  Check the value of the variable UPS_THIS_DB in each section.  The first two should be your location for /d0dist/dist/upsdb, the third corresponds to /d0usr/products/upsdb, and the final entry is your default UPS database, probably /fnal/ups/db.

Next we proceed to the actual D0 software installation.


Begin by setting up UPS/UPD:

> . ~products/etc/setups.sh (for bash shell)
> source ~products/etc/setups.csh (for c-shell)
> setup upd

Note: the two commands for setting up ups (~products/etc/setups.sh & source ~products/etc/setups.sh) use the fact that the login directory for the 'products' account created during the UPS/UPD installation is /fnal/ups.

Now we can check for the availability of D0 releases:

> upd list -aK+ -h www-d0.fnal.gov -q dist D0RunII

(-q dist specifies that only releases certified for distribution are displayed -- -h www-d0.fnal.gov is necessary since we're searching on a D0-specific node.)  This command should return a listing of several "pxx..." and "txx..." options.  In general t-releases ("test") are the frequent updates (weekly?) of the D0 software code.  p-releases ("production") are those versions of the D0 code used on the reco & Monte Carlo farms.  Note that this listing is operating system flavor neutral (i.e., "NULL") 0-- to see which versions of the compiled (binaries) code are available, do:

> upd list -aK+ -h www-d0.fnal.gov D0RunII-bin

This should return a listing of all available SGI (Irix) and Linux binary packages.
To restrict the search to Linux versions, add | grep -i linux:

> upd list -aK+ -h www-d0.fnal.gov D0RunII-bin  | grep -i linux


Note: as of late March 2002 the UPS/UPD download procedure has been modified somewhat by Alan to use a "four-tier" vs. "three-tier" approach.  This is expected to make the process more robust, particularly for remote users.  See the links:

 http://d0server1.fnal.gov/users/jonckheere/D0Race/alan-procedure-031402.pdf
 http://d0server1.fnal.gov/users/jonckheere/D0Race/alan-install-031402.pdf

for details of the system.


For this example we'll install release t02.17.00:

> upd install -h www-d0.fnal.gov D0RunII t02.17.00 -q dist -G'-c'

This command will return information like the following:

****
**** To configure D0RunII t02.17.00 the following commands
ups declare D0RunII t02.17.00 -z /d0dist/dist/upsdb -m D0RunII.table -f NULL -r /products/d0dist/dist/releases/t02.17.00
**** To fetch the source code packages from www-d0.fnal.gov:
setup D0RunII t02.17.00 -q dist
${SRT_PUBLIC_CONTEXT}/D0reltools/fetchpkgs.sh
**** To fetch the external products from www-d0.fnal.gov or fnkits.fnal.gov:
${SRT_PUBLIC_CONTEXT}/D0reltools/fetchprod.sh
**** See /products/d0dist/dist/releases/t02.17.00/ups/INSTALL.txt for details. (VERY USEFUL!)
****
informational: installed D0RunII t02.17.00.

Next we declare the release to the UPS database as indicated above:

> ups declare D0RunII t02.17.00 -z /d0dist/dist/upsdb -m D0RunII.table
    -f NULL -r /products/d0dist/dist/releases/t02.17.00

Now use UPD to install the binaries:

> upd install -h www-d0.fnal.gov D0RunII-bin t02.17.00 -q Linux2-KCC_4_0

At this point we need to use the scripts provided in $SRT_PUBLIC_CONTEXT/D0reltools (fetchpkgs.sh, D0-glpkgs-chk.sh, & fetchprod.sh) to install the sources, check for required external products, and install the external products, respectively.  The SRT_PUBLIC_CONTEXT environment variable is defined by setting up the release (setup ups if necessary):

> setup D0RunII t02.17.00 -q dist (-q dist is only necessary during this installation phase)

First the sources install:

> $SRT_CONTEXT_PUBLIC/D0reltools/fetchpkgs.sh

You can see the various external packages required by the D0 release by running:

> $SRT_CONTEXT_PUBLIC/D0reltools/D0-glpkgs-chk.sh

The external packages can be installed "by hand" using 'upd install package version...' etc., or by executing:

> $SRT_CONTEXT_PUBLIC/D0reltools/fetchprod.sh

Finally you're ready test the D0 release installation.  Login as a normal user, setup UPS, and type:

> setup D0RunII t02.17.00

This command should return:

**** setup D0RunII t02.17.00


Questions/comments? Contact Mark Sosebee
Last updated May 23, 2002