This document describes the arguments for bfcca located in $STAR_SCRIPTS, a production script interface to the CRS reconstruction software and bfc.C. Please, refer to this page for the syntax of a job description ; this document will assume you are accustom to the syntax and will only describe the features implemented in bfcca itself.
bfcca is a script interface which handles running a chain, running a calibration pass and/or a chain and moving data to its final location. It includes features such as writ ting to local disk during run, log file compression, displaying information about the node the job runs on etc ... and will later be extended with automatic insertion of information in a FileCatalog.
This perl wrapper requires a few perl module, most of which are installed by default unless specified otherwise in the below list. If anything goes wrong with loading a module, please, check that you are using the proper perl version and have the modules installed.
use File::Basename; use File::Copy; use Sys::Hostname; use Digest::MD5;
Digest:MD5; this one is to be checked and is not installed by default ...
The arguments of this script are as follows:
bit |
Component |
Meaning |
1 |
IO mode |
0 regular IO (immediate/un-buffered) |
2 | Tag file copy | 0 No copy 1 Copy file to /star/data20/tags (+2) |
3 |
Code Optimization |
0 non-optimized |
4-5 |
Compression |
00 uncompressed STDOUT/STDERR |
6-7 | Copy files to DD (XRootD) |
00 Not going to copy any file to DD 01 only picodst file will be copied to DD (+32) 10 only mudst file will be copied to DD (+64) 11 both, picodst and mudst files will be copied to DD (+96) |
8 | 32-bit vs. 64-bit | 0 32-bit 1 64-bit (+128) |
outputstreamtype | outputdir | destination | Effect |
UNIX | . i.e. local directory | . | Output streams will will be ignored and lost |
UNIX | . | PATH | Output streams will be created on local disk and then moved to the final destination $PATH |
HPSS | HPSSPATH | . or ./ | The choice of a local directory for $PATH will lead to ignore moving the outputstream. The files will be saved in HPSS only. |
HPSS | HPSSPATH | PATH | Output streams will be copied to HPSS in $HPSSPATH, in $HPSSPATH the base string /home/starreco will be substituted by $PATH. This means that $PATH only needs to specify a disk name (such as /star/data18). The directory thereafter /home/starreco will be preserved as-is on disk |
Later, we needed to extend this wrapper with some special features so the input (5) has been reshaped to accept special characters triggering special treatments. In those cases, all of the other options are shifted. It is better explained in the examples below but for now, let's review the possibilities in the next table:
Special Character | Mode | Expected arguments |
---|---|---|
/ | Alternate script mode | The next argument after "/" will be a script to run instead of bfc.C, all subsequent arguments will be passed to that script as is. Note : string arguments will passed stringified. You should NOT add quotes around strings. Short example: 25,dev,/star/data05,-1,/,StMuDstMaker.C,0,1,1000, st_physics_2270049_raw_0088.event.root The disadvantage of this mode is that you have to pass the arguments known a-priori (which breaks the philosophy of a job description) |
+ | Alternate script mode with periodic input | The next argument after the "+" will be an input periodicity or modulo. What it will do is call the script with all of the other argument but the last which will be replaced by the input given as per the job description. In other words, it will loop on all inputs and call the script separately for each call. The periodicity is used to take one input every 'period'. For example, if your chain needs to only read and scan over an event.root file BUT requires the presence of a tags.root file, the periodicity you would use is 2 . |
@ | Alternate script with fixed generic output filename. | In this mode, arguments before the "@" are passed as expected and must be specified as usual . After "@", the expected arguments are the name of a script to run instead of bfc.C following by an argument which will be used as the very last argument of your script. Typically, this could be a an output filename which will be passed as the last argument to the script. An example is given in the below example list ... |
~ | Addiitonal setup scripts may be run. | This mode is intended for passing additional setup commands to bfc before running the jobs. All arguments until the next "~" will be considered as setup options. In addition, arguments will have any "-" replaced by space. The chain options will resume normally afterward. An example is provided below. |
Examples :
25,dev,/star/data05,-1,+,2,StMuDstMaker.C,0,1,1000,-
The option-mask is set to 25 which is 16+8+1 i.e. both standard input and output will be compressed and all IO to those files will be made in delayed mode. Then, the final disk destination is chosen to be /star/data05 .
The mode used is "+" indicating a periodicity mode. Periodicity applies to the input you have selected for the job description and is specified on the next argument. However, the script to be run is the next argument and in this case, StMuDstMaker.C . This script will be called with arguments 0,1,1000 and the last argument "-" will be replaced by each input file modulo, 2 in our case. This means that only one inut every two will be passed to the selected script and replace the the last argument "-". This mode may be used if your script requires only one file as input but requires the presence of other files (this is common in STAR as the IOMaker assumes and checks for the presence of other files based on the chain options used and the extensions).
Notes:
In principle, the presence of $HOME/dbServers.xml would make our software pick this file as database configuration file. However, on the CRS nodes, the $HOME directory of the starreco is not its regular home-directory. bfcca will however respect this mechanism by using the STDB_SERVERS environment variable and setting it to the appropriate value.
In addition, note that bfcca if provided with an input file of type UNIX with a name matching /Loadbalancer/, this file will be ignored to first order except that the environment variable DB_SERVER_LOCAL_CONFIG will be over-written with the file name as value. For more information on this variable, consult Configuration File. When this mechanism is enabled, the use of $HOME/dbServers.xml as a possibility is by-passed.
Example:
inputstreamtype[1]=UNIX inputdir[1]=/afs/rhic.bnl.gov/star/packages/conf inputfile[1]=dbLoadBalancerLocalConfig_nightly.xml
This example would indicate to bfcca to ignore this input to first order (it will not be passed to the executable) and consider the file dbLoadBalancerLocalConfig_nightly.xml located in /afs/rhic.bnl.gov/star/packages/conf as an alternate configuration file for running.
<br />
In addition, bfcca has the ability of running a calibration pass before a run pass or create a calibration directory on the farm local disk (or via a soft-link to an NFS area). Note that a single calibration pass alone may be accomplished by using the regular options and the appropriate chain-option(s). The mechanism is described as follow :
If one of the inputdir of type UNIX contains the string StarDb, this input is ignored and the inputfile is parsed. Several cases are then possible, in all cases, the file specified by inputfile MUST exists (remember that a staging is done for all input streams and, in the case of UNIX staging, the file presence is required).
Example:
inputstreamtype[1]=UNIX inputdir[1]=/star/data13/reco/StarDb inputfile[1]=PreTpcT0
In this example, inputfile is pre-fixed by Pre so a pre-calibration pass is requested. A local directory ./StarDb will be created and remain for the duration of the run (calibration and real-chain execution), the content of the file /star/data13/reco/StarDb/PreTpcT0 used as the calibration options. In the above example, the content was simply in TpcT0 RY2001 so the calibration pass would use those options.
Note:
In the above example, the CRS node needs to see the file /star/data13/reco/StarDb/PreTpcT0 for the staging to be a success. The job may fail in case of NFS problems. This IS NOT a misfeature but an advantage since it would be hazardous to have the job move along in case of NFS problems (jobs would inconsistently be running a calibration pass or not).
bfcca displays some informative messages about the job before and after a chain is executed. The header of each log file will contain a tabulated summary information showing the chain options you have asked, the requested output streams name (initial and as it should be at the end) as well as information about the node, CPU speed, directory where the job is running, node it is running on etc ...
After the header, the messages are of the form
bfcca:: Severity: message
where Severity can be on of Info, Warning or Error. Messages related to copying files are for example of Severity=Info, missing files (chain did not produce what was declared in the job description) are of the kind Severity=Warning while any failure (directory creation, file cleaning etc ...) are considered Error. Note that on Severity=Error are displayed in the error file (STDERR) while others are displayed in the log file (STDOUT).