added benefits easier to debug –can dump configurations or add inline printouts –can validate...
TRANSCRIPT
Added Benefits
• Easier to debug– Can dump configurations or add inline printouts– Can validate files by compiling
• Can use command-line arguments, environmental variables, and higher-level Python functions
• Many free tools available– See A. Hinzmann’s talk, “Visualization of the CMS
Python Configuration System”
Design
• Mimic look and feel of old configuration.
• Result is a python data structure– Not an interactive system
• Use boost::python to translate into a C++ data structure
• Translated configurations in the release– Made scripts to automatically parse, translate,
commit, and tag configuration include fragment files
New Python Config
import FWCore.ParameterSet.Config as cms
process = cms.Process(“foo”)
process.jet50Filter = cms.EDFilter(“JetFilter”, minPt = cms.double(50.))process.jet100Filter = process.jet50Filter.clone()process.jet100Filter.minPt = 100.
process.load(“Jets.Reco.JetReco_cfi”)process.jetReco.coneSize = 0.7
process.jet50to100Filter = cms.Sequence(process.jetFilter50+~process.jetFilter100)
process.jet50to100 = cms.Path(process.jetReco*process.jet50to100Filter)
Old Custom Language
process = foo {
module jet50Filter = JetFilter {
float minPt = 50.
}
module jet100Filter = jet50Filter.clone()
jet100Filter.minPt = 100.
include “Jets/Reco/data/JetReco.cfi”
replace jetReco.coneSize = 0.7
sequence jet50to100Filter = {jetFilter50&!jetFilter100}
path jet50to100 = {jetReco, jet50to100Filter}
}
Why Switch to Python?
• Previously, CMS used a custom configuration language– Parsed using flex/bison
• Users needed to be able to copy, share, and modify fragments– Users customizing their job– Production system splitting jobs, setting random
seeds, etc.
• Required a lot of effort to support these operations for all data types
CMS Job Configuration• Complex hierarchical structure
– 24 data types– 10 module types– 11 types of execution control statements & operators
• Release contains ~6000 configuration files– 4500 shared fragments– 1400 executable job configurations
• Standard full-chain simulation job defines:– 700 modules– 150 sequences of modules– over 13,000 configurable parameters