04-Nov-97 JEC
Scripts for FD Rope jobs
All scripts for FD rope jobs now have a standard structure, and standard
argument list.
A template to create a new script can be found in ~jec/jobutil/fd_job
Each job has an interactive phase, which creates the working
directory and copies or links the required files into it, followed by
a batch phase which compiles, links and runs the executable.
Interactive phase
The first five arguments of a standard script are
- Period number
- Pass number
- Data type {cs,s,d}
- FILE card type {Cat,Fat,Dat,Dad}
- Number of events
The period, pass and data type can be found
here
These are passed to opaldsn for processing.
If the inter script returns $INTER = T then the
job is prepared for submission :-
- A working directory is created under ~/temp7
- A variable $Filename is defined using the job name, data period and pass
number
- The opaldsn script is executed
to write the DATA, TRIGGER and CAL ffread cards to the file dsn.ffr,
which is then copied to fort.4
- Links to the opcal directory and the catalog are inserted
- The PATCHY cradle is copied from the Job directory
to the working directory
- The FFREAD cards are copied from the script to the working directory
- The job is submitted to the batch que defined by $Q ( = {wsvs/wss/wsm })
The output file is stored as ~/list/$Filename.lis, and histograms as
~/hist/$Filename.hrz
Execution phase
When ( if ? ) the job is eventually selected for execution on shift, the
standard OPAL utilities are used to prepare the executable file :-
- ytofort prepares the .f file using the cradle
- egrep searches the Patchy listing for useful lines
- fort compiles the .f file
- link prepares the executable file. The link libraries are stored in the
script
- The executable is executed, using the FFREAD cards as input
- The file 'rope.histo' is copied from the temporary directory to
~/hist/$Filename.hrz
- The temporary files are all deleted
Running the debugger
If you ared so desparate as to want to run the debugger, the least difficult
method is to comment out the lines at the end of the script and submit a short
job. When it finishes, run the executable file in the temporary directory.
Variables defined in the standard script
Jobdir The directory in which the script is stored
Job The name of the script
TempdirThe temporary directory in which the job is run
Period of the data to be processed
Pass of the data to be processed
Filename for storing log and histogram files;
setenv Filename "$Job"_"$Period"_"$Pass"
WARNING - do not forget to
change the definition of Job when editing a new script from an old one.
If you forget, the new script will cause the old script
to be submitted for execution.
Utilities used by the standard scripts
These utility scripts are stored in ~jec/jobutil :-
- opaldsn
- constructs the FFREAD cards required to access data on shift
- inter
- determines whether a script is running interactively or in batch
- opalexpt
- determines the Experiment number, given the period number