Usage of the Python Programming Language in the CMS Experiment Rick Wilkinson (Caltech), Benedikt Hegner (CERN) On behalf of CMS Offline & Computing 1.

Slides:



Advertisements
Similar presentations
GNAM and OHP: Monitoring Tools for the ATLAS Experiment at LHC GNAM and OHP: Monitoring Tools for the ATLAS Experiment at LHC M. Della Pietra, P. Adragna,
Advertisements

Operating-System Structures
1 Databases in ALICE L.Betev LCG Database Deployment and Persistency Workshop Geneva, October 17, 2005.
Ideas on the LCG Application Architecture Application Architecture Blueprint RTAG 12 th June 2002 P. Mato / CERN.
Reconstruction and Analysis on Demand: A Success Story Christopher D. Jones Cornell University, USA.
Meta Configurations Building blocks of cmsRun workflows are independent steps like simulation, high level trigger or reconstruction Special setups still.
CMS Framework “Software bus” model –One executable, “cmsRun, with many plug-in modules Controlled by a configuration file –Controls which data to use,
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
A tool to enable CMS Distributed Analysis
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
CLEO’s User Centric Data Access System Christopher D. Jones Cornell University.
DIRAC Web User Interface A.Casajus (Universitat de Barcelona) M.Sapunov (CPPM Marseille) On behalf of the LHCb DIRAC Team.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Online Monitoring with MonALISA Dan Protopopescu Glasgow, UK Dan Protopopescu Glasgow, UK.
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
Magnetic Field Measurement System as Part of a Software Family Jerzy M. Nogiec Joe DiMarco Fermilab.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Browsing Data with GaudiPython Disclaimers: 1.I am an apprentice! 2.The porpoise: we think GaudiPython could be quite useful for a LHCb physicist… Browsing.
LC Software Workshop, May 2009, CERN P. Mato /CERN.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Experiment Support CERN IT Department CH-1211 Geneva 23 Switzerland t DBES PhEDEx Monitoring Nicolò Magini CERN IT-ES-VOS For the PhEDEx.
Python From the book “Think Python”
Stuart Wakefield Imperial College London Evolution of BOSS, a tool for job submission and tracking W. Bacchi, G. Codispoti, C. Grandi, INFN Bologna D.
Status of the LHCb MC production system Andrei Tsaregorodtsev, CPPM, Marseille DataGRID France workshop, Marseille, 24 September 2002.
NOVA Networked Object-based EnVironment for Analysis P. Nevski, A. Vaniachine, T. Wenaus NOVA is a project to develop distributed object oriented physics.
November SC06 Tampa F.Fanzago CRAB a user-friendly tool for CMS distributed analysis Federica Fanzago INFN-PADOVA for CRAB team.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Framework of Job Managing for MDC Reconstruction and Data Production Li Teng Zhang Yao Huang Xingtao SDU
And Tier 3 monitoring Tier 3 Ivan Kadochnikov LIT JINR
1 Control Software (CAT) Introduction USB Interface implementation Calorimeter Electronics Upgrade Meeting Frédéric Machefert Wednesday 5 th May, 2010.
CMS pixel data quality monitoring Petra Merkel, Purdue University For the CMS Pixel DQM Group Vertex 2008, Sweden.
Job Life Cycle Management Libraries for CMS Workflow Management Projects Stuart Wakefield on behalf of CMS DMWM group Thanks to Frank van Lingen for the.
CMSSW Configuration in Python Rick Wilkinson June 19,
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
6th Feb 2003SCT DAQ analysis development 1 SCT analysis framework Work by:Alan Barr, Matt Palmer, Dave Robinson Almost all slides originally produced by.
Added Benefits Easier to debug –Can dump configurations or add inline printouts –Can validate files by compiling Can use command-line arguments, environmental.
EGEE is a project funded by the European Union under contract IST “Interfacing to the gLite Prototype” Andrew Maier / CERN LCG-SC2, 13 August.
Sep 13, 2006 Scientific Computing 1 Managing Scientific Computing Projects Erik Deumens QTP and HPC Center.
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
1 The EDIT System, Overview European Commission – Eurostat.
Jean-Roch Vlimant, CERN Physics Performance and Dataset Project Physics Data & MC Validation Group McM : The Evolution of PREP. The CMS tool for Monte-Carlo.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
General requirements for BES III offline & EF selection software Weidong Li.
Pavel Nevski DDM Workshop BNL, September 27, 2006 JOB DEFINITION as a part of Production.
Vincenzo Innocente, CERN/EPUser Collections1 Grid Scenarios in CMS Vincenzo Innocente CERN/EP Simulation, Reconstruction and Analysis scenarios.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Geant4 User Workshop 15, 2002 Lassi A. Tuura, Northeastern University IGUANA Overview Lassi A. Tuura Northeastern University,
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Event Management. EMU Graham Heyes April Overview Background Requirements Solution Status.
20 October 2005 LCG Generator Services monthly meeting, CERN Validation of GENSER & News on GENSER Alexander Toropin LCG Generator Services monthly meeting.
Ganga/Dirac Data Management meeting October 2003 Gennady Kuznetsov Production Manager Tools and Ganga (New Architecture)
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
ACAT 2008 Axel Naumann (CERN), Philippe Canal (Fermilab) The Role of Interpreters in High Performance Computing.
1 RIC 2009 Symbolic Nuclear Analysis Package - SNAP version 1.0: Features and Applications Chester Gingrich RES/DSA/CDB 3/12/09.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
CMS High Level Trigger Configuration Management
Introduction to Visual Basic 2008 Programming
Chapter 2: System Structures
Introduction to Operating System (OS)
Soo Park and Janine Aquino
Genome Workbench Chuong Huynh NIH/NLM/NCBI New Delhi, India
User Interface Classes Signals / Slots
Outline Chapter 2 (cont) OS Design OS structure
Status and plans for bookkeeping system and production tools
Use Of GAUDI framework in Online Environment
Web Application Development Using PHP
Presentation transcript:

Usage of the Python Programming Language in the CMS Experiment Rick Wilkinson (Caltech), Benedikt Hegner (CERN) On behalf of CMS Offline & Computing 1

About Using Python No top-down decision to use it –Groups decided to use it on their own –Probably influenced by what others are doing Why people say they use Python –Easy to learn –Easy to understand syntax –Good for rapid prototyping –Lots of standard tools –Lots of useful external tools cherrypy, PyRoot, PyQt –Can do their scripting and their programming in one step 2

CMS Job Configuration CMS jobs are defined by configuration files –One executable, cmsRun, with many plug-in modules –Not interactive Release contains ~6000 configuration files –4500 shared fragments –1400 executable job configurations Standard full-chain validation job defines: –700 modules –150 sequences of modules – over 13,000 configurable parameters See O. Gutsche’s talk, “Validation of Software Releases For CMS” 3

Why Switch to Python? Previously, CMS used a custom configuration language – Parsed using flex/bison – Fills C++ data structures 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 –We underestimated the need for a full programming language, instead of just a declarative language 4

Design Mimic look and feel of old configuration. Result is a python data structure –Again, not an interactive system –Easy for production system to manipulate Use boost::python to translate into a C++ data structure See poster “Using Python for Job Configuration in CMS” 5

Added Benefits Easier to debug –Can dump configurations or add inline printouts –Can check for syntax errors by compiling i.e. “ python my_cfg.py ” Easier to build configs –For example, naming your input file and output file consistently –Don’t need, say, perl scripts to edit config files Can use command-line arguments, and higher- level Python functions Many free tools available –See A. Hinzmann’s talk, “Visualization of the CMS Python Configuration System” 6

Meta Configurations Building blocks of cmsRun workflows are independent steps like simulation, high level trigger or reconstruction Special setups still demand simultaneous changes in all steps –cosmic vs. collision –full simulation vs. fast simulation Use Python config API to create standard workflows for production and release validation cmsDriver.py TTbar.cfi --step GEN,FASTSIM 7

CMS and PyROOT CMS stores its data in ROOT files Two main modes of analyzing event data files –cmsRun as full framework Make a C++ Analyzer module which extracts data into a separate ROOT analysis file –FWLite for read-only access In FWLite, needed libraries are loaded via auto-loader mechanisms Class dictionaries are provided via ROOT/Reflex Usable interfaces in C++ and Python 8

FWLite Example from PhysicsTools.PythonAnalysis import * from ROOT import * # prepare the FWLite autoloading mechanism gSystem.Load("libFWCoreFWLite.so") AutoLibraryLoader.enable() events = EventTree("reco.root") # book a histogram histo = TH1F("photon_pt", "Pt of photons", 100, 0, 300) # event loop for event in events: photons = event.photons # uses aliases print “# of photons in event %i: %i" % (event, len(photons)) for photon in photons: if photon.eta() < 2: histo.Fill(photon.pt()) 9

Analysis with FWLite Simple script –Almost pseudocode To use, just say: > python –i script.py >>> histo.Draw() 10

Production Workflows  All request and job management uses one Python framework Clusters of Python daemons Event-driven Message Service MySQL for persistency  See van Lingen & Wakefield’s poster, “CMS production and processing system - Design and experiences” 11

Data Management Many web-based services: FileMover: see Valentin Kuznetsov’s talk SiteDB: see Simon Metson’s poster Data Quality Monitoring GUI: see Lassi Tuura’s talk Conditions Database GUI: see Antonio Pierro’s poster All of these tools are consolidating into a standard framework See van Lingen & Wakefield’s talk, “Job Life Cycle Management libraries for CMS Workflow Management Projects ” 12

Conclusion CMS uses Python extensively –And we like it A variety of activities –Scripting –Job Configuration –Analysis –GUIs –Web interfaces –Message passing –Database interfaces 13