Global organization of results and source files for LSST CCD testing

This note describes the organization of LSST CCD test result files and the run-time environment in which software that implements a station or an analysis (collectively, a "test") must expect. This note is written to guide test software developers. Some details of implementation are omitted.

Table of Contents

1 Locating Input/Output Files

Production runs of a test software job execute from a well defined environment. This environment is setup1 and the job is run via the job harness. The environment defines general and specific, per-job variables that the test software must use in order to locate input and output files.

1.1 Test Software Output Directory

The test software must place all of its output files under the directory defined by the environment variable:

$LCATR_OUTPUT_DIR

A job will be started inside this directory and it must not produce any files outside of this directory. Any files or sub-directories that are produced should be named consistently from job to job. In particular, names should not encode specifics about the job such as CCD ID or date or time stamps.

1.2 Inter-test Dependencies

Some test software will require as input the results from other test jobs that have run previously. The location of these files are specified external to the job and are communicated to the job through environment variables of the form:

$LCATR_<NAME>_DIR

Where <NAME> is replaced by the (capitalized) canonical name of the test software that produced it. The test software relies on a static naming convention for locating files or sub-directories at this location.

2 Software Installation Environment

Test software is installed by the software manager given a git commit identifier (tag or SHA1 hash) by the software developer. The installation is described by the environment variables:

$LCATR_<NAME>_HOME
locates the installation directory of the software.
$LCATR_<NAME>_VERSION
the git tag of the software release
$LCATR_<NAME>_GIT_HASH
the git SHA1 hash of the software release

In addition variables like $PATH will be suitably modified. See ./modulesfiles.org for how the environment is to be defined.

3 Job-specific environment

Some standard environment variables are defined on a per-job basis:

$LCATR_JOB_ID
a job identifier unique to the site
$LCATR_UNIT_ID
an identifier for the unit (CCD/RTM) being tested.
$LCATR_UNITD_TYPE
the type of unit tested (CCD/RTM)
$LCATR_JOB
the canonical name of the test.
$LCATR_VERSION
the version of the test software being run.
$LCATR_STAMP
the time stamp for which the test results will be recorded.

3.1 Special environment

Additional environment may be provided to the job. This can consist of information derived from the environment or as a means for passing in input parameters. The test software development should communicate with the software manager what is required.

4 File System Details

The test software jobs should not assume any understanding of the details of the file system organization except as specified by the environment described above or in test-specific static naming conventions.

That said, the file system is organized to achieve:

4.1 File System Root

The file system holding the results from all test software has a single root. This root will likely differ from site to site but the structure below it must be identical between sites and as described here. The test software must not make reference to file system paths outside this root. This root is defined by the environment variable:

$LCATR_ROOT

While this variable is exposed to the jobs the test software should rely on specific variables (described below) to locate files.

4.2 Output Directory

The path to a location containing result files (ie, $LCATR_OUTPUT_DIR or $LCATR_<NAME>_DIR) is constructed from sub-directories named, in order, by these elements:

  1. <CCD_ID> the identifier for the CCD tested.
  2. <NAME> the canonical name for the test.
  3. <VERSION> the version of the test software
  4. <JOB_ID> the unique job identifer

A general output path would then be:

LCATR_<NAME>_DIR=$LCATR_ROOT/<CCD_ID>/<NAME>/<VERSION>/<JOB_ID>/

It is noted that the values ofr these individual elements are exposed to the job as described above.

5 Environment and File System Specification

Production runs of the test software execute from a well defined environment. This environment is setup and the job is run via the job harness. The environment defines general and specific, per-job variables that must be used to locate files.

5.1 File System Root

The file system holding the results from all test software has a single root. This root will likely differ from site to site but the structure below it must be identical between sites and as described here. This root is defined by the environment variable:

$LCATR_ROOT

While this variable is exposed to the jobs the test software should rely on specific variables (described below) to locate files.

5.2 Test Software Output Directory

The test software must place all output files under the directory defined by the environment variable:

$LCATR_OUTPUT_DIR

A job should not produce any files outside of this directory.

5.3 Inter-test Dependencies

Some test software will require the results from other test jobs that have run previously. The dependency on these files are specified external to the job and are communicated to the job through environment variables of the form:

$LCATR_<NAME>_DIR

Where <NAME> is replaced by the canonical name of the test software that produced it.

6 File System Organization

The test software jobs should not assume any understanding of the details of the file system organization except the $LCATR_OUTPUT_DIR and $LCATR_<NAME>_DIR variables described above. That said, the file system is organized to allow for convenient browsing and self documenting discovery of its contents.

The path to an output directory under $LCATR_ROOT is constructed from these elements:

<CCD_ID>
the identifier for the CCD tested.
<NAME>
the canonical name for the test.
<STAMP>
a time stamp indicating when the test was run.

7 Location of Test Software

The test software is run by the job harness which sets the job's environment1. This environment must provide all run-time environment that the job needs including the variables described above and in this section. Test software and job harness authors must coordinate on this issue.

7.1 General Environment

The test software can rely on the following environment variables:

$LCATR_<NAME>_HOME
the directory where the software has been installed.
$LCATR_<NAME>_VERSION
the human readable version string (same as the git commit tag)
$LCATR_<NAME>_GIT_HASH
the git commit SHA1 hash

7.2 Specific Environment

Each test software may require additional environment either derived from the variables described in this note or in order to specify job input parameters. They will be set in this same manner.

Footnotes:

1 Environment is managed by Modules (http://modules.sf.net) or similar.

Author: Brett Viren <bv@bnl.gov>

Date: 2014-10-03 11:48:51 PDT

HTML generated by org-mode 6.21b in emacs 23