WARNING! When running multiple simultaneous jobs on SLAC Public, be sure that each batch job is given a unique, local PFILE path in which to write its parameter files (one .par file is created by each ScienceTool). This is accomplished by setting a unique environment variable within each batch job.

For example:

PFILES=/scratch/<uniqueIdentifier>/pfiles;/nfs/farm/g/glast/u30/
builds/rh9_gcc32opt/ScienceTools/ScienceTools-v9r11/pfiles

This environment variable tells the ScienceTools (and FTOOLS) to use the first path in the list for writing and preferentially for reading, but use the second as a read-only reference, as needed. (Note the semi-colon between path elements.)

Cleanup. Be sure to perform a cleanup on /scratch after your jobs have completed.

Python Script. For an example of setup and cleanup routines from a python script that runs multiple batch jobs, each with a unique environment variable, see new.py.txt and note the two FILE.write blocks. The first block creates the unique environment variables for each job, and the second block cleans up the scratch directory after the batch jobs have completed.

Why bother? If you do not specify a PFILE path for each batch job, ~/pfiles will be created if it does not already exist. Thus, each batch job will write its .par files to the same directory, causing an unfortunate and painful conflict. When running several hundred or more jobs, you will begin "hammering" the server—sometimes fatally. Whatever you do, DO NOT direct your writable PFILE path to one of the GLAST user disks! (Such anti-social behavior will not go unnoticed.)


Owned by: Richard Dubois
Last updated by: Chuck Patterson 05/21/2009