Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

There is a master configuration file (setup/svacPlSetup.cshrc) that sets disk locations, code versions, and all kinds of fun stuff.  It sets over 100 environment variables that are needed at task install or run time.

 

Pipeline Tasks and Associated Scripts

Each pipeline task consists of several c-shell, python and perl scripts.

----BeamTestRelease is run from an AFS volume.  When a new release is used, it must be either built on the AFS volume or copied there from the regular build area in NFS.  Then the cmt directories have to be configured to point to the new location.  There are 10 AFS volumes that are shared by MC, SVAC and beamtest pipelines.  They are all mounted under /afs/slac.stanford.edu/g/glast/ground/releases as volume01-volume10.  There's also a file in that directory, VOLUME.USAGE, where you can claim your space.
 

BeamTestReport should be relinked against the new version of BeamTestRelease.

Neither BeamTestELog nor ConfigTables need to be relinked, as they are implemented in Python. 

 

...

 Pipeline Tasks and Associated Scripts

Each pipeline task consists of several c-shell, python and perl scripts.

Pipeline tasks are structured as a linear chain of steps.  Each step must succeed before going on to the next one.  Each step must be attempted, until one fails or the last one succeeds.  That is to say, there is no flow control, and no parallelism.  In order to deal with this, and to reduce the chance that a step would not be reached due to the failure of a previous step on which it did not logically depend, the work we do in the pipeline is split into 7 tasks, all but one of which (updateELogDB) are launched by other tasks.  This launching is done without GINO's (the pipeline infrastructure) knowledge.

The sequence of steps within a task is set by an XML file that is uploaded via the GINO front end to create the task.  This file also sets up input & output files, what code to run, which batch quesues to run it on, etc.  The XML files are generated by perl scripts in the task directories under $beatestPlRoot.

There is no file, script, datastructure, or anything outside the maintainer's head that codifies the global structure of it all.

Tasks launch other tasks using the $beamtestPlRoot/lib/TaskLaunch.pl script.  My convention has been that I launch each task in a separate TP.  The TP and the script and wrapper that it uses have names beginning with "Launch"Pipeline tasks are structured as a linear chain of steps.  Each step must succeed before going on to the next one.  Each step must be attempted, until one fails or the last one succeeds.  That is to say, there is no flow control, and no parallelism.  In order to deal with this, and to reduce the chance that a step would not be reached due to the failure of a previous step on which it did not logically depend, the work we do in the pipeline is split into 7 tasks, all but one of which (updateELogDB) are launched by other tasks.  This launching is done without GINO's (the pipeline infrastructure) knowledge.

The names of files registered with GINO is constrained to follow a certain format.  When one task produces a file that is used as input to another task, the name given by the first task is not the name expected by the second one.  Thus, part of the process of one task launching another is to create symbolic links with the name expected by the downstream task. 

...

The cvs repository for the code is svac/svacPipeline, branch beamtestBeamTestPipeline. It contains a branch modified copy of svac/svacPipeline with the following features:

...

 Purpose

 Associated Scripts

Input

 Output

Comments

used by cleanupRecon.csh, gets rid of junk on one host

 _cleanup0ne.csh

 

 

  utility, not used in pipeline

clean up junk left on  local disks of batch hosts by failed chunks

  cleanupRecon.csh

 

 

 utility, not used in pipeline

   shared by all TPs that copy files

  copyWrapper.pl

 

 

 pipeline side

 reset eLog links to reports & ROOT files so there isn't a confusing mixed set of versions while reprocessing

  deleteLinks.csh

 

 

  utility, not used in pipeline

  shared by all TPs that delete files

  deleteWrapper.pl

 

 

 pipeline side

  merge tuple chunks into single file

  haddMerge.py

 

 

 external side

  merge tuple chunks into single file

  haddWrapper.pl

 

 

 pipeline side

 

  makeLinks.pl

 

 

not used

 look things up in eLog

  queryElogReportTable.pl

 

 

 

 launch a task from within another task

  TaskLaunch.pl

 

 

 

 Sometimes thigs don't work, and you try again and it's fine.  Usually due to some transient NFS issue. 
This script will attempt an action up to 5 times.  It's used by recon to copy & move files.

  tryAFewTimes.csh

 

 

 

 change things in eLog

  updateElogReportTable.pl

 

 

 

 Enter links to ROOT files and data reports into the eLog DB.

  updateUrl.py

 

 

 

 Enter links to ROOT files and data reports into the eLog DB. 

  urlWrapper.pl

 

 

 pipeline side
The name of the TP using this must be the same as the name of the DB field that will hold the URL. 

...

doRecon controls the reconstruction of the chunks.  It reads a list of jobs to run, and for each one, spawns a thread that submits a batch job, waits for it to complete, and returns its status.  It then writes a file listing which, if any, of the chunks failed, and exits with an unsuccessful return code if there were failed chunks.  When the TP first starts, it checks for this list of failed chunks, and if it is present and nonempty, it uses it instead of the original list of all chunks writted by setupRecon.  This way, if some chunks fail, the TP can be rolled back and it will only need to redo the failed chunks.  The failed chunk list is not registered as a pipeline dataset, since it violates logical constraints within GINO for a TP to modify its input this wayfiles.

In order to avoid problems with unreliable NFS service, the chunk jobs copy the input digi file to a local disk on the batch host (if it has one, I think they all do now) and writes the output files there as well.  It then moves the output files to a staging directory on AFS, and deletes the local copy of the input file.  When chunks fail, these files are left behind and eventually fill up the local disk.  Therefore, there is a script to seek out and delete these orphaned files.  It must run as user glastdpf.  I usually log into a noric as glastdpf and run it by hand every once in a while, but a better solution would probably be to wrap it in a task and run that task every night from my crontabbe to wrap it in a task and run that task every night from my crontab.

Space on the AFS staging disk is a bottleneck on how fast we can run data through the pipeline.  It is shared by the SVAC and beamtest pipelines.

Merging the chunks of the recon file uses 4 TPs.  The first (mergeRecon) performs the actual merge, from chunk files on the staging disk to a recon file on the staging disk.  The second deletes the chunk files from the staging disk.  The third copies the merged recon file from the staging disk to its final destination on NFS.  The fourth deletes the merged file from the staging area.  This may seem unreasonably complicated, but it reduces the amount of work that must be redone on a rollback, and in some cases a rollback wouldn't work otherwise - we used to get situations where something would fail after the chunks had ben deleted, and we'd have to redo the reconstruction.  Deleting the chunk and staged merged files could be done in a single TP at the end of the sequence, but doing it this way saves space on the staging disk.

Once the recon file is merged & moved, the reconReport and svac or beamtest tuple tasks are launched so that the can run while later steps are happening.

...