LCATR Environment Modules

NOTE: THIS IS STILL IN DRAFT FORM. This note describes how environmental "modules" are used to define the run-time environment variables for CCD test stations and analysis software.

Table of Contents

1 Overview

The LSST CCD testing software (that which drives a test station or performs analysis on station output) must be managed in terms of the versions employed and the run-time environment supplied. The software must run at more than one site and on diverse platforms and their results must be merged, organized and made available to the collaboration. The execution of all software is controlled with a common job harness (see the document "LSST CCD Test Job Harness"). The environment is controlled using "Environment Modules" (see http://modules.sf.net) as described here.

The environment for each installed version of a test software package is defined in a so called modulefile. A set of conventions are chosen to simplify writing these files and to supply information needed for the job harness and for recording what version of the software was run. These conventions also govern installation as described in the document "LCATR Job Installation". Some additional environment variables are provided to the software by the job harness.

2 Package Installation

The modulefile describes an installed package. The installation must faithfully represent the state of source code (or in cases of proprietary programs, binaries) taken from a Git repository based on a unique identifier (a Git tag associated with a commit).

The test software developer promotes a release by making a Git tag on the appropriate commit and communicating this tag to the release managers of each site. The release managers then install the tagged version and produce a modulefile for this installation.

3 Layout of modulefiles

A modulefile may live either in the central lcatr/modulefiles repository maintained in git or be installed along with the software in host-central installation area. In both cases it is located and identified based on fact that it lives in a name/version/ sub-directory.

4 Boilerplate modulefile commands

Every modulefile must register job harness entries into its code. The simplest modulefile looks like:

#%Module1.0 #-*-tcl-*-#
source "$::env(LCATR_MODULES)/lcatr.tcl"
lcatr_package <producer> <validator>

The <producer> and <validator> arguments give the path to the producer and validator executable programs, respectively. If relative the path is assumed to be with respect to the top of the package's installation directory.

Any additional, static job-specific environment may also be defined in the modulefile.

5 Environment determined by lcatr_package

The call to the lcatr_package function will produce these environment variables.

LCATR_JOB
the canonical name of the package.
LCATR_VERSION
the version of the package.
LCATR_LACTR_PKGS
a colon-separated, ordered list of package names currently set up.
LCATR_SCHEMA_PATH
a colon-separated, ordered list of package installation directories used to look for .schema files. (see ./schema.org)
LCATR_PRODUCER
the absolute path to the producer program
LCATR_VALIDATOR
the absolute path to the validator program

6 Environment determined by the job harness

Additional environment determined by the job harness based on the configuration it is given and based on the results of loading the modulefile. These variables are available to the job but not in the context of the modulefiles. The provided variables are described in this section.

LCATR_UNIT
the unit of testing ("CCD", "RTM")
LCATR_JOB_ID
the unique identifier of the running job.
LCATR_UNIT_ID
the unique identifier of the unit (eg CCD) being tested.
LCATR_OUTDIR
the directory from which the job will run and deposit its output files.
LCATR_<dep>_OUTDIR
the directory where output files from the prior running of a the dependency <dep> were placed. Such a variable is also produced for the modulefile being processed.

Author: Brett Viren <bv@bnl.gov>

Date: 2014-10-03 11:46:09 PDT

HTML generated by org-mode 6.21b in emacs 23