Taming the beast: Using Python To Control ATLAS Software David Quarrie NERSC Division Lawrence Berkeley National Laboratory 3 July 2006.

Slides:



Advertisements
Similar presentations
10 July 2006ATLAS Plenary1 Welcome to the ATLAS Overview Week in Stockholm - A few words introducing ATLAS to our hosts - The new LHC schedule - Financial.
Advertisements

1 Japanese activities in LHC Takahiko Kondo, KEK November 28, 2005 KEK-DESY 1st Collaboration Meeting in Tokyo.
10/26/2005 ATLAS Visit Dr Pierre Coulombe President, National Research Council Canada Short introduction by Peter Jenni and Robert Orr.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
Usage of the Python Programming Language in the CMS Experiment Rick Wilkinson (Caltech), Benedikt Hegner (CERN) On behalf of CMS Offline & Computing 1.
© Copyright Eliyahu Brutman Programming Techniques Course.
Roger Jones: The ATLAS Experiment Ankara, Turkey - 2 May The ATLAS Experiment Roger Jones Lancaster University.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
. APS meeting April 14 h, ATLAS Detector – status and plans David Lissauer Brookhaven National Lab. ATLAS Technical Coordination APS meeting April.
Japanese Commitment to the LHC experiments Katsuo Tokushuku (KEK) May 17, 2008 The KEK-CNRS/IN2P3-CEA/DSM/DAPNIA Collaboration Meeting at CRNS.
Cracow Grid Workshop 2003 Institute of Computer Science AGH A Concept of a Monitoring Infrastructure for Workflow-Based Grid Applications Bartosz Baliś,
Framework for Automated Builds Natalia Ratnikova CHEP’03.
Alexei Klimentov : ATLAS Distributed Computing NEC2009 Varna- 10 September Alexei Klimentov Brookhaven National Laboratory XXII-th International.
1 ATLAS installation: Status about 3 years ago…. 2 ATLAS installation: Status half a years ago…
Andrea Ventura University of Salento & INFN Lecce on behalf of the ATLAS Collaboration New Trends in High-Energy Physics Alushta, Crimea, Ukraine, September.
Computing Sciences NERSC High Energy and Nuclear Physics Computing Group Craig E. Tull HCG/NERSC/LBNL 2005 Science Colloquium Series DOE - August 23, 2005.
Introduzione al Software di CMS N. Amapane. Nicola AmapaneTorino, Aprile Outline CMS Software projects The framework: overview Finding more.
The Large Hadron Collider project is a global scientific adventure, combining the accelerator, a worldwide computing grid and the experiments, initiated.
LC Software Workshop, May 2009, CERN P. Mato /CERN.
Didier Lacour CERN Hadron Structure Herl'any Slovakia September Status of the ATLAS Detector Construction Outline : Overall detector concept.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett The Athena Control Framework in Production, New Developments and Lessons Learned.
David N. Brown Lawrence Berkeley National Lab Representing the BaBar Collaboration The BaBar Mini  BaBar  BaBar’s Data Formats  Design of the Mini 
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
5 May 98 1 Jürgen Knobloch Computing Planning for ATLAS ATLAS Software Week 5 May 1998 Jürgen Knobloch Slides also on:
ALICE Simulation Framework Ivana Hrivnacova 1 and Andreas Morsch 2 1 NPI ASCR, Rez, Czech Republic 2 CERN, Geneva, Switzerland For the ALICE Collaboration.
MINER A Software The Goals Software being developed have to be portable maintainable over the expected lifetime of the experiment extensible accessible.
W. Pokorski - CERN Simulation Project1 Python binding for Geant4 toolkit using Reflex/PyROOT tool Witek Pokorski EuroPython 2006, CERN, Geneva
ALICE, ATLAS, CMS & LHCb joint workshop on
Unit 4 Object-Oriented Design Patterns NameStudent Number CAI XIANGHT082182A KYAW THU LINHT082238Y LI PENGFEIHT082220L NAUNG NAUNG LATTHT082195L PLATHOTTAM.
1 “Steering the ATLAS High Level Trigger” COMUNE, G. (Michigan State University ) GEORGE, S. (Royal Holloway, University of London) HALLER, J. (CERN) MORETTINI,
SEAL Core Libraries and Services CLHEP Workshop 28 January 2003 P. Mato / CERN Shared Environment for Applications at LHC.
LC Software Workshop, May 2009, CERN P. Mato /CERN.
GDB Meeting - 10 June 2003 ATLAS Offline Software David R. Quarrie Lawrence Berkeley National Laboratory
January 21, 2003 Transition from the Construction Project to Pre-Ops and Operations Howard Gordon.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
ATLAS, ATLAS through first data Fabiola Gianotti (on behalf of the ATLAS Collaboration)
September 2007CHEP 07 Conference 1 A software framework for Data Quality Monitoring in ATLAS S.Kolos, A.Corso-Radu University of California, Irvine, M.Hauschild.
F.Gianotti, ATLAS RRB, Collaboration and Management matters First results from 900 GeV and 7 TeV collision data (in particular: first observation.
NOVA A Networked Object-Based EnVironment for Analysis “Framework Components for Distributed Computing” Pavel Nevski, Sasha Vanyashin, Torre Wenaus US.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
TAU08, NovosibirskM. Pilar Casado (IFAE & UAB) 1 ATLAS Tau Trigger Belanger-Champagne, C; Benslama, K; Bosman, M; Brenner, R; Casado, MP; Czyczula, Z;
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.
23/2/2000Status of GAUDI 1 P. Mato / CERN Computing meeting, LHCb Week 23 February 2000.
General requirements for BES III offline & EF selection software Weidong Li.
MND review. Main directions of work  Development and support of the Experiment Dashboard Applications - Data management monitoring - Job processing monitoring.
- GMA Athena (24mar03 - CHEP La Jolla, CA) GMA Instrumentation of the Athena Framework using NetLogger Dan Gunter, Wim Lavrijsen,
Introduction S. Rajagopalan August 28, 2003 US ATLAS Computing Meeting.
27 March 2003RD Schaffer & C. Arnault CHEP031 Use of a Generic Identification Scheme Connecting Events and Detector Description in Atlas  Authors: C.
The V-Atlas Event Visualization Program J. Boudreau, L. Hines, V. Tsulaia University of Pittsburgh A. Abdesselam University of Oxford T. Cornelissen NIKHEF.
Overview Methodology Design Architecture Outline of future work Ideas for discussion.
CPT Week, November , 2002 Lassi A. Tuura, Northeastern University Core Framework Infrastructure Lassi A. Tuura Northeastern.
David Adams ATLAS ATLAS Distributed Analysis and proposal for ATLAS-LHCb system David Adams BNL March 22, 2004 ATLAS-LHCb-GANGA Meeting.
Online Software November 10, 2009 Infrastructure Overview Luciano Orsini, Roland Moser Invited Talk at SuperB ETD-Online Status Review.
Mar 05 - hvdsOffline / HLT1  Athena SW Infrastructure  programming + applying tools wrt. dependencies between packages  developing + testing extra ideas.
Establishing large international research facilities: the HEP case 1st ASEPS Summit Tsukuba March 25, 2010 Sergio Bertolucci CERN LHC.
Searching for Compositeness with ATLAS Kaushik De University of Texas at Arlington For the ATLAS Collaboration DPF/JPS 2006, Hawaii November 1, 2006.
The ATLAS Trigger and Data Acquisition System John Strong Royal Holloway, University of London.
VisIt Project Overview
DOE/NSF Project Experience Key Ingredients to Success
ATLAS as an example of a large scientific collaboration
Depleted CMOS Pixel Detectors
ATLAS through first data
CMS High Level Trigger Configuration Management
S. Rajagopalan August 28, 2003 US ATLAS Computing Meeting
NERSC High Energy and Nuclear Physics Computing Group
EIN 6133 Enterprise Engineering
SW Architecture SG meeting 22 July 1999 P. Mato, CERN
Design Principles of the CMS Level-1 Trigger Control and Hardware Monitoring System Ildefons Magrans de Abril Institute for High Energy Physics, Vienna.
Simulation and Physics
Presentation transcript:

Taming the beast: Using Python To Control ATLAS Software David Quarrie NERSC Division Lawrence Berkeley National Laboratory 3 July 2006

Taming the beast: Using Python to control ATLAS software 2 Authors Paolo Calafiura (LBNL) Manuel Gallas (CERN) Wim Lavrijsen (LBNL) Wolfgang Liebig (CERN) Tadashi Maeno (Brookhaven National Laboratory) David Quarrie (LBNL) David Rousseau (LAL, Orsay) Andreas Salzburger (Univ. of Innsbruck) Akira Shibata (QMC, Univ. of London)

Taming the beast: Using Python to control ATLAS software 3 LHC √ s = 14 TeV (7 times higher than Tevatron/Fermilab) → search for new massive particles up to m ~ 5 TeV L design = cm -2 s -1 (>10 2 higher than Tevatron/Fermilab) → search for rare processes with small  (N = L  ) ALICE : heavy ions ATLAS and CMS : pp, general purpose ATLAS and CMS : pp, general purpose 27 km ring used for e + e - LEP machine in Start : Summer 2007 pp LHCb : pp, B-physics

Taming the beast: Using Python to control ATLAS software 4 ATLAS Length : ~ 46 m Radius : ~ 12 m Weight : ~ 7000 tons ~ 10 8 electronic channels ~ 3000 km of cables Tracking (|  |<2.5, B=2T) : -- Si pixels and strips -- Transition Radiation Detector (e/  separation) Calorimetry (|  |<5) : -- EM : Pb-LAr -- HAD: Fe/scintillator (central), Cu/W-LAr (fwd) Muon Spectrometer (|  |<2.7) : air-core toroids with muon chambers

Taming the beast: Using Python to control ATLAS software 5 ATLAS Collaboration 34 Countries 151 Institutions 1770 Scientific Authors Albany, Alberta, NIKHEF Amsterdam, Ankara, LAPP Annecy, Argonne NL, Arizona, UT Arlington, Athens, NTU Athens, Baku, IFAE Barcelona, Belgrade, Bergen, Berkeley LBL and UC, Bern, Birmingham, Bonn, Boston, Brandeis, Bratislava/SAS Kosice, Brookhaven NL, Bucharest, Cambridge, Carleton, Casablanca/Rabat, CERN, Chinese Cluster, Chicago, Clermont-Ferrand, Columbia, NBI Copenhagen, Cosenza, INP Cracow, FPNT Cracow, Dortmund, JINR Dubna, Duke, Frascati, Freiburg, Geneva, Genoa, Glasgow, LPSC Grenoble, Technion Haifa, Hampton, Harvard, Heidelberg, Hiroshima, Hiroshima IT, Indiana, Innsbruck, Iowa SU, Irvine UC, Istanbul Bogazici, KEK, Kobe, Kyoto, Kyoto UE, Lancaster, Lecce, Lisbon LIP, Liverpool, Ljubljana, QMW London, RHBNC London, UC London, Lund, UA Madrid, Mainz, Manchester, Mannheim, CPPM Marseille, Massachusetts, MIT, Melbourne, Michigan, Michigan SU, Milano, Minsk NAS, Minsk NCPHEP, Montreal, FIAN Moscow, ITEP Moscow, MEPhI Moscow, MSU Moscow, Munich LMU, MPI Munich, Nagasaki IAS, Naples, Naruto UE, New Mexico, Nijmegen, BINP Novosibirsk, Ohio SU, Okayama, Oklahoma, LAL Orsay, Oslo, Oxford, Paris VI and VII, Pavia, Pennsylvania, Pisa, Pittsburgh, CAS Prague, CU Prague, TU Prague, IHEP Protvino, Ritsumeikan, UFRJ Rio de Janeiro, Rochester, Rome I, Rome II, Rome III, Rutherford Appleton Laboratory, DAPNIA Saclay, Santa Cruz UC, Sheffield, Shinshu, Siegen, Simon Fraser Burnaby, Southern Methodist Dallas, NPI Petersburg, Stockholm, KTH Stockholm, Stony Brook, Sydney, AS Taipei, Tbilisi, Tel Aviv, Thessaloniki, Tokyo ICEPP, Tokyo MU, Tokyo UAT, Toronto, TRIUMF, Tsukuba, Tufts, Udine, Uppsala, Urbana UI, Valencia, UBC Vancouver, Victoria, Washington, Weizmann Rehovot, Wisconsin, Wuppertal, Yale, Yerevan

Taming the beast: Using Python to control ATLAS software 6 ATLAS Computing Characteristics Large, complex detector –~10 8 channels Long lifetime –Project started in 1992, first data in 2007, last data 2027? 320 MB/sec raw data rate –~3 PB/year Large, geographically dispersed collaboration –1770 people, 151 institutions, 34 countries –Most are, or will become, software developers Scale and complexity reflected in software –~1000 packages, ~8000 C++ classes, ~5M lines of code –~70% code is algorithmic (written by physicists) –~30% infrastructure, framework (written by sw engineers) –Provide robustness but plan for evolution –Requires enabling technologies –Requires management & coherency

Taming the beast: Using Python to control ATLAS software 7 Software Methodology Object-Oriented using C++ as programming language –Some wrapped FORTRAN and Java –Python as interactive & configuration language Heavy use of components behind abstract interfaces –Support multiple implementations –Robustness & evolution Lightweight development process –Emphasis on automation and feedback rather than very formal process Previous attempt at developing a software system had failed due to a too rigorous software process decoupled from developers –Make it easy for developers to do the “right thing” –Some requirements/design reviews –Sub-system “functionality” reviews 2 weeks each Focus on client viewpoint

Taming the beast: Using Python to control ATLAS software 8 Control Framework Framework is implementation of an architecture Capture common behaviour for HEP processing –Processing stages Generation, simulation, digitization, reconstruction, analysis –Online (trigger & monitoring) & offline Control framework steers series of modules to perform transformations –Component based –Dynamically reconfigurable Although framework captures common behaviour, it’s important to make it as flexible and extensible as possible Blackboard model –Algorithms register and retrieve data on shared blackboard –Component decoupling Athena/Gaudi Framework common project with LHCb

Taming the beast: Using Python to control ATLAS software 9 Event Store Athena/Gaudi Component Model Converter Algorithm StoreGateSvc Persistency Service Data Files Algorithm StoreGateSvc Persistency Service Data Files Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Application Manager Converter Event LoopMgr Auditors Persistency Service Data Files Histogram Store Sequencer

Taming the beast: Using Python to control ATLAS software 10 Athena Components Algorithms –Provide basic per-event processing –Share a common interface (state machine) –Sequencer is type of Algorithm that sequences/filters other Algorithms Tools –More specialized but more flexible than Algorithms Services –E.g. Particle Properties, Random Numbers, Histogramming Data Stores (blackboards) –Data registered by one Algorithm/Tool can be retrieved by another –Multiple stores handle different lifetimes (per event, per job, etc.) –Stores accessed via Services (e.g. StoreGateSvc) Converters –Transform data from one representation to another e.g. transient/persistent Properties –Adjustable parameters of components –Can be modified at run-time to configure job

Taming the beast: Using Python to control ATLAS software 11 Python in Athena, a bit of history Initially configuration specified using text files and ad-hoc parser Extended bindings to most athena components –Initial goal to run athena interactively from a python shell athena now a python program controlling primarily C++ components

Taming the beast: Using Python to control ATLAS software 12 C++/Python Bindings Several iterations –Manual (C API) –boost::python –LHC common project C++ Reflex package and its auto- generated python bindings gccxml Still need to customize the bindings –Not writing a debugger: interaction should respect athena “state machine” architecture –Dynamic vs linked language see next talk by P. Mato

Taming the beast: Using Python to control ATLAS software 13 Job Configuration Decided to migrate to python to –address scalability, maintainability issues by introducing structure in job configuration –Take advantage of a widely used, well documented language Two-stage migration strategy –Started with 80K lines of text configuration files –Use (python) tool to translate text to python HelloWorld.MyDouble = HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ] –This of course does not solve lack of structure Build structure by taking advantage of language features

Taming the beast: Using Python to control ATLAS software 14 Building Structure Text-based to python translation left every property setting in global scope –Long-range side effects –Could not modularize automatically Solution is a three step process: – Provide smarter, low-level building blocks Automatically generated for all components – Provide structuring support Removes boiler-plate code from configuration – Build higher level structures Simplify user view, full access for developers

Taming the beast: Using Python to control ATLAS software 15 Example of Structured Configuration # instantiate the top alg sequence for athena from AthenaCommon.AlgSequence import * theJob = AlgSequence() # instantiate one tool looper from EventViewConfiguration.EVToolLoopers import * defaultEVLooper = EVMultipleOutputToolLooper("defaultEVLooper") # the name of the EventView (in StoreGate) created by this tool looper defaultEVLooper.EventViewCollectionOutputName="defaultEventView" # schedule EVMultipleOutputToolLoopers to athena top sequencer theJob += defaultEVLooper from EventViewConfiguration.DefaultEventView_module import * # define insertion order, you may want to play with this order toInsert=["Electron", "Photon", "Muon","TauJet","JetTag”] # schedule the default inserter module with this insertion order defaultEVLooper += DefaultEventView("Inserters", toDo=toInsert) # set up the athena job theJob.setup() # print the whole job schedule print theJob # Run the job theJob.run()

Taming the beast: Using Python to control ATLAS software 16 Python Control Framework Moved Application Control to python –Support interactivity –Allow inspection, debugging –Alternative control flows –Act as a glue between athena components and 3 rd party tools (ROOT, Geant 4 simulation, memory profiler,…) –String manipulation “Business” logic still in C++ Algorithms, Tools, Services

Taming the beast: Using Python to control ATLAS software 17 Data Analysis in Python Interoperability of athena and analysis tools –Atlantis Java Event Display can drive athena in client-server mode using the SimpleXMLRPCServer module –Allows interactive (re)processing of athena data

Taming the beast: Using Python to control ATLAS software 18 Interactive analysis of Z  ee events Access to athena data objects from analysis tools import ROOT import math # theApp.initialize() h16 = ROOT.TH1F (“h16”, ‘R G4 Brem photons’,100, 0.,\ 120.) for i in range(5000): theApp.nextEvent() scon=PyParticleTools.getTruthParticles("SpclMC") for p in scon: t=p.getGenParticle() tver=t.production_vertex() if tver : R=math.pow(tver.point3d().y(),2)\ +math.pow(tver.point3d().x(),2) R=math.sqrt(R)/10. if p.pdgId()==22 and math.fabs(t.barcode()) >\ : if math.fabs(p.eta())< 1.0: h16.Fill(R) # PyROOT R (leading Brem photon) cm Events with [p T (track) - p T (true)] /p T (true) < -0.3 all events

Taming the beast: Using Python to control ATLAS software 19 Some ongoing issues Two languages problem –Learning curve Not only for users but also for developers –Where to place the boundary between the two –Language mapping C++ Object ownership C++ templates Higher level structures –Now have capability but detailed design requires physicist involvement & feedback

Taming the beast: Using Python to control ATLAS software 20 Summary and Outlook ATLAS software is changing: –From development focus to analysis/production Configuration building blocks provided –Auto-generated, checkable, independent Layered structures now possible –With layered builders (functions/classes) –End-user modifiable, exploration-safe Opens up possibilities for new tools –Browsers, validators, code generators, etc.

Taming the beast: Using Python to control ATLAS software 21