professor is hosted by Hepforge, IPPP Durham

Parallelize computations – prof-batchtune

prof-batchtune assists you to run prof-interpolate or prof-tune in parallel, e.g. on a batch cluster, by filling job-script template files. This is done by splitting the MC run combinations into smaller sets. These sets can then be processed in parallel.

The data locations must be given on the command line (e.g. --datadir or --weights), and the MC, reference and interpolation directories must all exist. The paths are converted to absolute paths. The number of scripts that are produced is controlled with -N NUMSCRIPTS. Additional arguments can be passed through to the called professor script with -o ADDITIONALOPTIONS. Paths in ADDITIONALOPTIONS must be absolute.

The output of the scripts is stored in numbered directories under JOBBASEOUTDIR given by -j

A simple algorithm is used to distribute the number of run combinations equally over the job scripts. If the number of scripts is not a divisor of the number of run combinations, the last script will contain less than the other scripts. In some cases less than NUMSCRIPTS scripts will be created.

Note

At the moment the Cheetah templating library is required.

Templates

Template files are distributed together with the professor source code:

templates/prof-interpolate.template
Template for prof-interpolate job scripts. The scripts will put the coefficient files in the same directory given by IPOLDIR (see: --datadir, --ipoldir). JOBBASEOUTDIR contains only the log files.
templates/prof-tune.template

Template for prof-tune job scripts. The result files and interpolated histograms will be stored in output directories under JOBBASEOUTDIR:

jobout/000/results.pkl
           professor.log
           params/params-tune{xxx}/...
           ipolhistos/histos-tune{xxx}/...
      001/...
      ...

Examples

Create 20 job scripts for prof-interpolate to compute the coefficients of the polynomial parameterization. Use cubic polynomials:

prof-batchtune  -N 20  --weights weights  --datadir .  -R runs-cubic  -o "--ipol-method=cubic"  /PATH/TO/PROFESSOR/SOURCE/templates/prof-interpolate.template

The scripts are created in scripts_interpolate_weights/. The output directory for the coefficient files (./ipol/) must exist!

Create 10 job scripts for prof-tune using quadratic polynomials and the default initial point method:

prof-batchtune  -N 10  --weights my.weights  -R my.combinations  --datadir my/data  /PATH/TO/PROFESSOR/SOURCE/templates/prof-tune.template

The scripts are created in scripts_tune_my.weights/. The result files will be put in jobout/xxx/results.pkl.

Create 20 job scripts for prof-tune with a fixed parameter and three initial points per run combination using cubic polynomials:

prof-batchtune -N 20 --weights weights --datadir . -R runs.cubic -o "--ipol-method=cubic --spmethods='random,random,center' --fixed-params='Par1=3.1'"  /PATH/TO/PROFESSOR/SOURCE/templates/prof-tune.template

Command-line options

-N NUMSCRIPTS

The number of scripts that should be created. By default one script for each run combination is created, which usually means a lot of scripts.

-o ADDITIONALOPTIONS, --options ADDITIONALOPTIONS

Options that are passed to the called prof-* program, e.g. the order of the polynomial.

-s SCRIPTDIR, --script-outdir SCRIPTDIR

The job scripts will be placed in SCRIPTDIR. By default the directory name will be constructed from the name of the template and the weights file.

-j JOBBASEOUTDIR, --outdir=JOBBASEOUTDIR

Base directory for the output of the job scripts, e.g. where the results files are stored. [default: ./jobout]

Input data

-R RUNSFILE, --runsfile RUNSFILE, --runcombs RUNSFILE

A file with run combinations that are used as anchor points. One set of polynomial coefficients is calculated for each run combination. [default: runcombs.dat]

--datadir DATADIR

The directory containing the mc/ and ipol/ directories.

--mcdir MCDIR, optional

The directory containing the MC run data. [default: DATADIR/mc/]

--ipoldir IPOLDIR, optional

The directory where the parameterization data are stored. [default: DATADIR/ipol/]

--weights WEIGHTS, --obsfile WEIGHTS

Parameterization coefficients for all observables in WEIGHTS kre calculated.