MCRunjob: An HEP Workflow Planner for Grid Production Processing Greg Graham CD/CMS Fermilab Iain Bertram and Dave Evans Lancaster university CHEP 2003.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

RunJob in CMS Greg Graham Discussion Slides. RunJob in CMS RunJob is an Application Configuration and Job Creation Tool –RunJob uses metadata to abstract.
Runjob: A HEP Workflow Planner for Production Processing Greg Graham CD/CMS Fermilab CD Project Status Meeting 13-Nov-2003.
Distributed, parallel web service orchestration using XSLT Peter Kelly Paul Coddington Andrew Wendelborn.
Object-Oriented Analysis and Design
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
David Adams ATLAS DIAL Distributed Interactive Analysis of Large datasets David Adams BNL March 25, 2003 CHEP 2003 Data Analysis Environment and Visualization.
NextGRID & OGSA Data Architectures: Example Scenarios Stephen Davey, NeSC, UK ISSGC06 Summer School, Ischia, Italy 12 th July 2006.
Application architectures
Communication in Distributed Systems –Part 2
Peoplesoft: Building and Consuming Web Services
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Course Instructor: Aisha Azeem
Process-oriented System Automation Executable Process Modeling & Process Automation.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Architectural Design.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
The SAM-Grid Fabric Services Gabriele Garzoglio (for the SAM-Grid team) Computing Division Fermilab.
Workflow Management Chris A. Mattmann OODT Component Working Group.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
XForms: A case study Rajiv Shivane & Pavitar Singh.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
Introduction to MDA (Model Driven Architecture) CYT.
Flexibility and user-friendliness of grid portals: the PROGRESS approach Michal Kosiedowski
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Architecting Web Services Unit – II – PART - III.
Distribution After Release Tool Natalia Ratnikova.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
1 Schema Registries Steven Hughes, Lou Reich, Dan Crichton NASA 21 October 2015.
Bookkeeping Tutorial. Bookkeeping & Monitoring Tutorial2 Bookkeeping content  Contains records of all “jobs” and all “files” that are created by production.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Page 1 WWRF Briefing WG2-br2 · Kellerer/Arbanowski · · 03/2005 · WWRF13, Korea Stefan Arbanowski, Olaf Droegehorn, Wolfgang.
Ocean Observatories Initiative Data Management (DM) Subsystem Overview Michael Meisinger September 29, 2009.
Stuart Wakefield Imperial College London Evolution of BOSS, a tool for job submission and tracking W. Bacchi, G. Codispoti, C. Grandi, INFN Bologna D.
© 2004 Mercury Computer Systems, Inc. FPGAs & Software Components Graham Bardouleau & Jim Kulp Mercury Computer Systems, Inc. High Performance Embedded.
Framework for MDO Studies Amitay Isaacs Center for Aerospace System Design and Engineering IIT Bombay.
NA-MIC National Alliance for Medical Image Computing UCSD: Engineering Core 2 Portal and Grid Infrastructure.
T3 analysis Facility V. Bucard, F.Furano, A.Maier, R.Santana, R. Santinelli T3 Analysis Facility The LHCb Computing Model divides collaboration affiliated.
Interactive Workflows Branislav Šimo, Ondrej Habala, Ladislav Hluchý Institute of Informatics, Slovak Academy of Sciences.
The Global Land Cover Facility is sponsored by NASA and the University of Maryland.The GLCF is a founding member of the Federation of Earth Science Information.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
Grid Computing Environment Shell By Mehmet Nacar Las Vegas, June 2003.
A PanDA Backend for the Ganga Analysis Interface J. Elmsheuser 1, D. Liko 2, T. Maeno 3, P. Nilsson 4, D.C. Vanderster 5, T. Wenaus 3, R. Walker 1 1: Ludwig-Maximilians-Universität.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Bookkeeping Tutorial. 2 Bookkeeping content  Contains records of all “jobs” and all “files” that are produced by production jobs  Job:  In fact technically.
Virtual Data Management for CMS Simulation Production A GriPhyN Prototype.
1 DIRAC Job submission A.Tsaregorodtsev, CPPM, Marseille LHCb-ATLAS GANGA Workshop, 21 April 2004.
Object storage and object interoperability
Analysis Tools at D0 PPDG Analysis Grid Computing Project, CS 11 Caltech Meeting Lee Lueking Femilab Computing Division December 19, 2002.
ATLAS-specific functionality in Ganga - Requirements for distributed analysis - ATLAS considerations - DIAL submission from Ganga - Graphical interfaces.
CS223: Software Engineering Lecture 13: Software Architecture.
CS223: Software Engineering
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
DZero Monte Carlo Production Ideas for CMS Greg Graham Fermilab CD/CMS 1/16/01 CMS Production Meeting.
David Adams ATLAS ATLAS Distributed Analysis and proposal for ATLAS-LHCb system David Adams BNL March 22, 2004 ATLAS-LHCb-GANGA Meeting.
Ganga/Dirac Data Management meeting October 2003 Gennady Kuznetsov Production Manager Tools and Ganga (New Architecture)
DBS Monitor and DAN CD Projects Report July 9, 2003.
Shahkar/MCRunjob: An HEP Workflow Planner for Grid Production Processing Greg Graham CD/CMS Fermilab GruPhyN 15 October 2003.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) gLite Grid Introduction Salma Saber Electronic.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
David Adams ATLAS DIAL Distributed Interactive Analysis of Large datasets David Adams BNL May 19, 2003 BNL Technology Meeting.
Architecture Review 10/11/2004
CSI 400/500 Operating Systems Spring 2009
Ch > 28.4.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Data, Databases, and DBMSs
Metadata Framework as the basis for Metadata-driven Architecture
Presentation transcript:

MCRunjob: An HEP Workflow Planner for Grid Production Processing Greg Graham CD/CMS Fermilab Iain Bertram and Dave Evans Lancaster university CHEP 2003

Ethos of MCRunjob Applications in complex production processing environments often need to be tamed –Hundreds of input parameters during MC Production –Heterogeneous runtime environments –Complex multi-application workflows –Dependencies and relationships among the metadata often modeled inside of obscure shell scripts MCRunjob captures such specialized knowledge and makes it available to non-expert users –Metadata and schema oriented descriptions –Tracks dependencies among metadata –Tracks synonyms between groups of metadata, versions –Organization of user registered functions that do the actual work –Framework driven organization of tasks

Ethos of MCRunjob MCRunjob uses a modular component based architecture. Schema Modeling: Each application or task has its own schema representation. ScriptGeneration:Each target script environment has its own generator. External Services: Each service or interface is described internally by its schema.

MCRunjob Project In use at DZero since 1999 and at CMS since –Supported by respective programs. –For MC production only so far. DZero Monte Carlo Challenges (CHEP 2001) CMS Integration Grid Testbed (CHEP 2003) We are considering a joint DZero/CMS project to address common issues at Fermilab soon –The actual code bases have diverged somewhat, but there is a common repository that was started in –Joint project name: Shahkar (which is Urdu for “Great Job”) Exploring ways to integrate with experiment frameworks. –There is some integration with DZero framework already going on –Need to explore ORCA interactions

Architecture of MCRunjob There are three major components of MCRunjob –Configurator: A container for schema describing some well defined application input, task, or external interfaces to DB or grid services Implements framework interfaces Register functions to handle framework calls, extend own interface, extend schema, define rules and dependencies to construct values for parameters. –Linker a container for Configurators, checks dependencies, enables inter-configurator communication. a container for “script objects” generated by Configurators Runs the framework –ScriptGen Mixin class for Configurators that adds methods for script object generation and framework method delegation All components are implemented in Python

A user who wants to run applications A,B, and C attaches corresponding Configurators to a Linker. The Linker verifies that dependencies are satisfied. Once attached, the user sets values for the various schema elements defined in each configurator, and defines filename rules, random seed rules, etc. The user then executes the framework. Each Configurator may generate scripts used to run the corresponding application. The scripts are collected by a ScriptGen object.

The ScriptGen object is obviously a very specialized component. Therefore, Configurators are able to delegate framework handlers to ScriptGen objects. This allows script generating code that targets specific envoronments to be collected in a single ScriptGen module. Multiple ScriptGen objects can be attached at once, allowing two different environments to be targeted by the same workflow description.

Configurator Functionality - 1 Configurators re-implement the UserDict() interface with built-in triggers on reads and writes –Schema elements must be declared before use –Triggers are typically defined in the constructor, but can be added dynamically also. Interfaces exist to extend the schema of a Configurator –Also possible to “lock” the schema to prevent further alterations. Parameter values can reference other Configurators –Inter-Configurator parameter lookup is implemented using a global read trigger on all of the schema elements. Different lookup behaviors (ie: CMS vs. DZero) possible by defining different triggers. Dependencies on other Configurators are explicitly declared –This is required for parameter lookup in the CMS implementation

Configurator Functionality - 2 Construction of parameter values –User can register functions, keyed by schema element, that will be called by the read trigger eg- Filename rules, RunNumber rules, Random Seed rules, etc. Framework handling –Handling of framework calls can be done in specific methods organized by inheritance This is considered deprecated, but it is not disallowed. –User can register functions to handle specified framework calls. –User can also specify delegation of framework calls to other Configurators that satisfy the ScriptGen interface Useful, for example, when trying to gather all related script generating functions into a single module Inheritance –Configurators are grouped by inheritance according to experiment or function Eg- Dzero vs. CMS, Generator vs. Processor, InputPlugins, etc.

Configurator Descriptions and Namespaces Configurators themselves are also described by an extensible list of key-value pairs. –Class ConfiguratorDescription( key1=val1, key2=val2, etc ) –This is useful to assign “meta-metadata” to the grouping of application metadata –But also: parameters are specified globally in a Linker space by name and ConfiguratorDescription. eg- ::ConfigDesc:ParamName –And: The ConfiguratorDescriptions also function as namespaces To keep namespaces distinct, one can also give them arbitrary aliases. This mechanism is also used to distinguish Configurators of a common type inside of the Linker space. –Studying whether Configurators should contain themselves. A pilot project at DZero is studying this.

Linker Functionality Container for Configurators and “script objects” –Linker guarantees that dependencies are satisfied by adding Configurators in serialized order. Exception thrown when this is not satisfied. –A script object may be a bash script, a derivation inVirtual Data Language, a DAG node, etc. Also runs the framework methods. Examples: –PreJob: runs before each script object –MakeJob: creates each script object –Reset: runs between script objects –RunJob: Submits a suitable “script object” to some Grid interface or batch queue Framework methods are also user definable and user callable.

ScriptGen Interface Implemented as a mixin class for Configurators Specifies methods for generating scripts –HandleFrameworkCall: a callback for Configurators to delegate handling of framework calls; mainly those that generate script objects Used so that all related “script generating” code can be gathered into a single module. –MakeScript: a method called by the linker to collect related script objects into a composite script object. Example ScriptGen objects: –Impala scripts (CMS MC production scripts) –RCP based scripts at DZero –Virtual Data Language of Chimera –MOP DAGs for Condor-G/DAGMan A Linker can support multiple ScriptGen objects simultaneously

Macro Script Language The Linker has a facility to read “macro” scripts and parse lines one by one –Functions available include: Attaching and naming Configurators, setting parameter values, adding schema values, defining synonyms, executing the framework or selected framework calls, executing selected methods, exception handling, executing other scripts –Procedural constructs supported for handling multiple jobs. Parsing is done by Configurators themselves –Users (experienced ;-) can extend the “macro” script interface by registering their own parser functions to the Configurators. –Multiple Parsers can be attached; first Parser to handle the line “wins” Many things are missing: –Full functionality is not yet available in the “macro” language –Needs parser that supports both expressions and conditionals –Syntax needs to be reviewed as a whole.

Synonyms and Ontology Configurators also contain an internal synonym table to automatically keep track of translations between schema elements of different Configurators –Example: cfg CMSIM synonym RanSeed1 ::generator:CMKIN:RunNumber cfg CMSIM print –Causes resolution of RanSeed1 by synonym lookup when parameter is not given implicit synonyms- when schema elements have the same name –eg- I didn’t have to say “synonym RunNumber ::generator:CMKIN:RunNumber” –These ontological definitions can be stored in files or database tables. –These can be used to “connect” Configurators across different versions or interface definitions on the same Configurator.

Stored Commands Configurators can also have a user specified list of stored commands to execute during framework operation –These commands are in the macro script language –Eg- cfg CMSIM addcommand on reset inc RunNumber When “reset” framework method is invoked, the command “inc RunNumber” is invoked on the CMSIM Configurator. The CMSIM Configurator has to have a Parser registered to it that can interpret “inc RunNumber” Together with synonyms and parameter lookup, stored commands can allow Configurators to track dynamically changing values in other Configurators.

MCRunjob at Runtime: SAM/JIM Innovations from SAM/JIM grid execution service for Dzero –XML based monitoring wrappers –XML database backend for persistent storage of jobs –Linker running as a server with GSI authentication –Macro preprocessor for abstract planning –Interface with SAM database production request system

Production Job Configuration Management Application designer: –writes down schema needed to configure desired application or task –writes ontological configuration files to define dependencies, synonyms, and chain behaviors –writes down ontological configuration files to handle possible version changes in schema Application deployment: –writes configuration files to define physics parameters, number of events, production assignments. Regional Center Contact: –writes configuration file for his/her regional center (if applicable)

Fun with Configurators LNameStreamConfigurator –Can register a function to this Configurator that will fill a LogicalNameList with names (eg- LFNs, PFNs) –During framework operation, this Configurator will iterate over the list, setting the schema element “OutputSpec” to the current value. InputPluginConfigurator –InputPluginBashFile will parse environment variable definitions in a sh script and expose these by including the symbols as schema elements with the corresponding values –InputPluginRefDB will obtain schema elements and values from a web server with database backend

Fun with Configurators RogueConfigurator –No schema whatsoever- user defines it all at runtime! TableConfigurator –Derives from LNameStream, but has multiple schema elements. Can read from a table file or a database table and iterate over the rows ParamSweepConfigurator –Similar to a TableConfigurator, but has added logic to generate its own table internally according to some rules. MOPDagGen –A ScriptGen Configurator that takes scripts generated by other ScriptGens, turns them into DAG nodes, and creates a master DAG. RunJobConfigurator –Takes specified script object, submits it to batch interface or grid portal.

No Tool is Complete Without a GUI MCRunjob has a Tk based GUI that functions as a wrapper around existing MCRunjob classes –No special classes needed: there is a single GUILinker wrapper class and a single GUIConfigurator wrapper class. Configurators have a “hot swappable” internal dictionary implementation –TK GUI Linkage is accomplished using the “HotSwap” method to replace the default internal UserDict with one that has Tk linkage. –Other GUI packages are possible by writing new wrapper classes and, perhaps, new dictionaries with different Linkage. Screenshot of GUI is next:

No Tool is Complete Without a GUI

Relationship to Other Projects SAM –One of the first great applications of MCRunjob was to automatically generate the metadata needed by the SAM system in order to store MC production results. –Closer integration with SAM is proceeding apace in the context of automatic generation of MC jobs from request metadata stored in SAM CHIMERA –MCRunjob has a ScriptGen which produces Virtual Data Language –Conceptually, Configurator schemas are like transformations, Configurators with values are like derivations, and ConfiguratorDescriptions and dependencies define “types” on the data appearing at the endpoints of a transformation. –MCRunjob can either generate VDL, VDL+wrapper scripts (custom transformations), or function as an abstract planner.

Relationship to Other Projects SAM/JIM –In the JIM grid execution environment, MCRunjob scripts are sent as the job instead of shell scripts or conventional executables. –MCRunjob macro scripts are GSI-authenticated and re-parallelized by a remote MCRunjob Linker process. –Delayed abstract planning! Data Provenance –MCRunjob is already capable of a fully declarative specification of workflow, and can communicate with external databases and servers. –Besides a bare specification of parameters, MCRunjob keeps track of the dependencies that existed among parameters when they were created.

Future Plans Formalize the DZero/CMS joint project –Shahkar –Language Definition Continue close cooperation with GriPhyN and better integrate MCRunjob into the Chimera environment. –Add tools to define wrapper scripts with transformations –Delayed abstract planning Add features: –Configurators for generic application monitors (BOSS) –Grid portals (currenlty MOPDagGen and VDLScriptGen) –XML representations and XML database Explore runtime functionality –Provenance, external parameter lookup services, and application monitoring services in experiment frameworks? (ala GANGA?)

Conclusions/Questions MCRunjob provides functionality to model complex workflows found in MC Production. –Is it possible/desirable to bring this to a finer granularity needed in analysis? MCRunjob is a powerful workflow planner with modular component based interfaces to external services. Prpearation for Analysis –Take it from a former Kaon physicist: Sharpening our understanding of MC production processing still has much to teach us about the more complex environments expected in physics analysis. Understanding the behavior of the underlying Grid services and the coming challenges of knowledge management in the face of clean predictable input and measurable results still has value.

References USCMS MCRunjob page : – DZero MCRunjob page : – Previous Talks and Papers: –Tools and Infrastructure for CMS Distributed Production (4-033), G.E. Graham, et al. Proceedings of Computers in High Energy Physics 2001 (CHEP 2001), Beijing, China –Dzero Monte Carlo Production Tools (8-027), G.E. Graham, et al.. Proceedings of Computers in High Energy Physics 2001 (CHEP 2001), Beijing, China –Dzero Monte Carlo, G.E. Graham. Proceeding of Advanced Computing and Analysis Techniques 2000 (ACAT 2000), Fermilab, Batavia, IL