Here I will document my progress on the QT (https://its.cern.ch/jira/browse/AGENE-1470)

Tuning Chain Setup (in progress):

The scripts are stored at /afs/cern.ch/user/c/cbirchsy/QT_SherpaTuningChain (for the moment)

1. The first step is to run,

source setupProfessor.sh

This exports some paths to an installation of Professor2 and Python2.7 (in aknue's TuningFramework directory until I make my own directories of dependencies)

2. Then one can run a Professor command to sample the parameter space which will be used for tuning using,

prof2-sample <parameter_space.dat> -n <N> -t <template.dat>

where <parameter_space.dat> is a file containing parameter names and ranges between which Professor will sample from for each parameter it will look like

param1 0.1 1
param2 0 0.5
param3 1 10

etc. <template.dat> is a file containing a formatting template which we can use to make professor write out its samplings in a nicer format. For Sherpa I have used a format that can be inserted straight into a runcard it looks like

"param1={param1}", "param2={param2}", "param3={param3}"

etc. The {curly brackets} tell professor where to write its samples value. This way we can input the sampled parameters into a runcard without much reformatting via

genSeq.Sherpa_i.Parameters += ["param1={0.533352}", "param2={0.023443}", "param3={3.96546}"]

for example. The result of this step is a directory (which by default is called scan/) inside this directory are N sub-directories eg (0000/ 0001/ 0002/ etc.) each containing 2 files: params.dats and template.dat containing the unformatted sampling and formatted sampling, respectively.

3. The next step is to create JobOptions.py scripts for each set of sampled parameters. To do this simply run

python CreateJOs.py <defaultJO.py> <sampledir/>

This reads in a default JobOptions.py script containing the run card for some process. It then goes into the sub-directories in sampledir/ (by default this is scan/) and reads in the parameters in the template.dat files. It then overwrites the parameters in the default JO to the sampled parameters and saves these JO in each subdirectory.

4. The next step is to run the jobs with the different sampled parameters. Before doing this it is advised to start a new session to avoid conflicting setups required. One should then do

setupATLAS
and
asetup 19.2.5.33.1,MCProd
(for Sherpa 2.2.5) change this to a version of athena compatible with the version of sherpa you are using they are listed here SherpaForAtlas.

5. One can then run,

python CreateSubmissio.py <sampledir/> <analyses.txt> <N_events> <E_cm> <username>

where <analyses.txt> is a list of Rivet analyses to base the tuning on it should look like

ATLAS_2013_I1190187
ATLAS_2013_I1217863
ATLAS_2013_I1219109
ATLAS_2013_I1230812

This script creates a pathena submission command which will run all the jobs with different parameters. (Hopefully) It will save them at user..SherpaMCTuningTest or whatever you change this to in the script.

6. To run the submission simply do

source SubmitJobs.sh

-- CallumJacobBirchSykes - 2018-11-08

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2018-11-08 - CallumJacobBirchSykes
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback