DIRAC API DIRAC Project. Overview  DIRAC API  Why APIs are important?  Why advanced users prefer APIs?  How it is done?  What is local mode what.

Slides:



Advertisements
Similar presentations
Building Portals to access Grid Middleware National Technical University of Athens Konstantinos Dolkas, On behalf of Andreas Menychtas.
Advertisements

COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
1 CHEP 2000, Roberto Barbera Roberto Barbera (*) Grid monitoring with NAGIOS WP3-INFN Meeting, Naples, (*) Work in collaboration with.
GANGA Overview Germán Carrera, Alfredo Solano (CNB/CSIC) EMBRACE COURSE Monday 19th of February to Friday 23th. CNB-CSIC Madrid.
CHEP 2012 – New York City 1.  LHC Delivers bunch crossing at 40MHz  LHCb reduces the rate with a two level trigger system: ◦ First Level (L0) – Hardware.
GRID workload management system and CMS fall production Massimo Sgaravatto INFN Padova.
CS 110 Intro to Computer Science I Sami Rollins Fall 2006.
GRID Workload Management System Massimo Sgaravatto INFN Padova.
K.Harrison CERN, 23rd October 2002 HOW TO COMMISSION A NEW CENTRE FOR LHCb PRODUCTION - Overview of LHCb distributed production system - Configuration.
Workload Management Massimo Sgaravatto INFN Padova.
Copyright © 2014 Dr. James D. Palmer; This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße Brühl, Germany
Stuart K. PatersonCHEP 2006 (13 th –17 th February 2006) Mumbai, India 1 from DIRAC.Client.Dirac import * dirac = Dirac() job = Job() job.setApplication('DaVinci',
Analysis demos from the experiments. Analysis demo session Introduction –General information and overview CMS demo (CRAB) –Georgia Karapostoli (Athens.
Track 1: Cluster and Grid Computing NBCR Summer Institute Session 2.2: Cluster and Grid Computing: Case studies Condor introduction August 9, 2006 Nadya.
Workload Management WP Status and next steps Massimo Sgaravatto INFN Padova.
Grid Initiatives for e-Science virtual communities in Europe and Latin America DIRAC TEAM CPPM – CNRS DIRAC Grid Middleware.
K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission.
03/27/2003CHEP20031 Remote Operation of a Monte Carlo Production Farm Using Globus Dirk Hufnagel, Teela Pulliam, Thomas Allmendinger, Klaus Honscheid (Ohio.
:: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: :: GridKA School 2009 MPI on Grids 1 MPI On Grids September 3 rd, GridKA School 2009.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Belle MC Production on Grid 2 nd Open Meeting of the SuperKEKB Collaboration Soft/Comp session 17 March, 2009 Hideyuki Nakazawa National Central University.
DIRAC Review (13 th December 2005)Stuart K. Paterson1 DIRAC Review Exposing DIRAC Functionality.
1 Sergio Maffioletti Grid Computing Competence Center GC3 University of Zurich Swiss Grid School 2012 Develop High Throughput.
Status of the LHCb MC production system Andrei Tsaregorodtsev, CPPM, Marseille DataGRID France workshop, Marseille, 24 September 2002.
Ganga A quick tutorial Asterios Katsifodimos Trainer, University of Cyprus Nicosia, Feb 16, 2009.
IR Homework #2 By J. H. Wang Mar. 31, Programming Exercise #2: Query Processing and Searching Goal: to search relevant documents for a given query.
EGI-InSPIRE RI EGI-InSPIRE EGI-InSPIRE RI Direct gLExec integration with PanDA Fernando H. Barreiro Megino CERN IT-ES-VOS.
Getting started DIRAC Project. Outline  DIRAC information system  Documentation sources  DIRAC users and groups  Registration with DIRAC  Getting.
Job Management DIRAC Project. Overview  DIRAC JDL  DIRAC Commands  Tutorial Exercises  What do you have learned? KEK 10/2012DIRAC Tutorial.
The EDGeS project receives Community research funding 1 Porting Applications to the EDGeS Infrastructure A comparison of the available methods, APIs, and.
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.
Ganga 4 Basics - Tutorial Jakub T. Moscicki ARDA/LHCb Ganga Tutorial, November 2005.
INFSO-RI Enabling Grids for E-sciencE Ganga 4 – The Ganga Evolution Andrew Maier.
© Geodise Project, University of Southampton, Geodise Middleware Graeme Pound, Gang Xue & Matthew Fairman Summer 2003.
K. Harrison CERN, 22nd September 2004 GANGA: ADA USER INTERFACE - Ganga release status - Job-Options Editor - Python support for AJDL - Job Builder - Python.
Overview Background: the user’s skills and knowledge Purpose: what the user wanted to do Work: what the user did Impression: what the user think of Ganga.
LSF Universus By Robert Stober Systems Engineer Platform Computing, Inc.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
Client installation DIRAC Project. DIRAC Client Software  Many operations can be performed through the Web interface  Even more to come  However, certain.
Proxy management mechanism and gLExec integration with the PanDA pilot Status and perspectives.
NGS computation services: APIs and.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Practical using WMProxy advanced job submission.
The Institute of High Energy of Physics, Chinese Academy of Sciences Sharing LCG files across different platforms Cheng Yaodong, Wang Lu, Liu Aigui, Chen.
INFSO-RI Enabling Grids for E-sciencE Ganga 4 Technical Overview Jakub T. Moscicki, CERN.
Client installation Beijing, 13-15/11/2013. DIRAC Client Software Beijing, /11/2013 DIRAC Tutorial2  Many operations can be performed through the.
RENKEI:UGI Takashi Sasaki. Project history The RENKEI project led by Prof. Ken Miura of NII is funded by MEXT during JFY The goal of the project.
Geant4 GRID production Sangwan Kim, Vu Trong Hieu, AD At KISTI.
Job Management Beijing, 13-15/11/2013. Overview Beijing, /11/2013 DIRAC Tutorial2  DIRAC JDL  DIRAC Commands  Tutorial Exercises  What do you.
Seven things you should know about Ganga K. Harrison (University of Cambridge) Distributed Analysis Tutorial ATLAS Software & Computing Workshop, CERN,
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) gLite Grid Introduction Salma Saber Electronic.
FESR Trinacria Grid Virtual Laboratory Practical using WMProxy advanced job submission Emidio Giorgio INFN Catania.
Practical using C++ WMProxy API advanced job submission
Development Environment
Design rationale and status of the org.glite.overlay component
Java standalone version
GWE Core Grid Wizard Enterprise (
Work report Xianghu Zhao Nov 11, 2014.
Creating and running applications on the NGS
Lightweight introduction
Lightweight introduction
NGS computation services: APIs and Parallel Jobs
The Ganga User Interface for Physics Analysis on Distributed Resources
Module 01 ETICS Overview ETICS Online Tutorials
Genre1: Condor Grid: CSECCR
Wide Area Workload Management Work Package DATAGRID project
gLite Job Management Christos Theodosiou
Production Manager Tools (New Architecture)
Production client status
Presentation transcript:

DIRAC API DIRAC Project

Overview  DIRAC API  Why APIs are important?  Why advanced users prefer APIs?  How it is done?  What is local mode what is not?  Tutorial exercises  What do you have learned? KEK 10/2012DIRAC Tutorial

Why APIs are important? KEK 10/2012  Application Programming Interface (API)  The DIRAC API is encapsulated in several Python classes designed to be used easily by users to access a large fraction of the DIRAC functionality. Using the API classes it is easy to write small scripts or applications to manage user jobs and data.  The DIRAC API provides a transparent and secure way for users to submit jobs to the Grid.  Permit debug locally the programs before submit jobs to the Grid.  While it may be exploited directly by users, the DIRAC API also serves as the interface for the Ganga Grid front-end to perform distributed user analysis for LHCb, for example. DIRAC Tutorial

Why advanced users prefer APIs KEK 10/2012  API provides a simple, seamless interface to Grid resources to submit jobs that can be:  Single applications  Multiple steps of different applications  Can perform a typical user analysis using understandable Python code DIRAC Tutorial

from DIRAC.Interfaces.API.Job import Job from DIRAC.Interfaces.API.Dirac import Dirac dirac = Dirac() j = Job() j.setExecutable('ls',arguments='-al',logFile='ls.log') dirac.submit(j) from DIRAC.Interfaces.API.Job import Job from DIRAC.Interfaces.API.Dirac import Dirac dirac = Dirac() j = Job() j.setExecutable('ls',arguments='-al',logFile='ls.log') dirac.submit(j) APIs KEK 10/2012  The API allows creating DIRAC jobs using the Job object.  Example: Note that all the DIRAC API commands described here may also be executed directly from the Python prompt. DIRAC Tutorial

APIs Resources KEK 10/2012 Setting the computing resources to use:  Operating system and system architecture:  CPU requirement determined:  Site name:  Banned sites: j.setBannedSites(['LCG.CERN.ch','LCG.DESY.de']) j.setSystemConfig(“x86_64-slc5-gcc43-opt") j.setCPUTime(21600) j.setDestination('LCG.KEK.jp') DIRAC Tutorial

APIs Configurable Job Parameters KEK 10/2012  Multiple Jobs: for i in range(20): j.setName('MyJob_%d' % i) dirac.submit(j)  Log Level: j.setLogLevel('DEBUG')  Environment variables: j.setExecutionEnv({'MYVARIABLE':'TOTO'}) DIRAC Tutorial

APIs Handling Data KEK 10/2012  Input Sandbox j.setInputSandbox(['Input.options','*.txt','lib/'])  Output Sandbox j.setOutputSandbox(['*.log','summary.data'])  Input Data j.setInputData([’/ilc/user/s/sposs/somefile’])  Output Data j.setOutputData(['output1.data','output2.data'],outputSE=[’KEK- SRM'],outputPath='MyFirstAnalysis’) DIRAC Tutorial

APIs Example KEK 10/2012 from DIRAC.Interfaces.API.Job import Job from DIRAC.Interfaces.API.Dirac import Dirac j = Job() dirac = Dirac() j.setName('MyFirstJob') j.setOutputSandbox(['*.log','summary.data']) j.setInputData(['/my/logical/file/name1', '/my/logical/file/name2']) j.setOutputData(['output1.data','output2.data'], outputPath='MyFirstAnalysis') j.setSystemConfig(“x86_64-slc5-gcc43-opt") j.setCPUTime(21600) j.setDestination('LCG.KEK.jp') j.setBannedSites(['LCG.CERN.ch','LCG.DESY.de']) j.setLogLevel('DEBUG') j.setExecutionEnv({'MYVARIABLE':'TOTO'}) j.setExecutable('echo $MYVARIABLE') print j._toJDL() dirac.submit(j) DIRAC Tutorial

What is local mode? What is not? KEK 10/2012  Local mode doesn’t send the job to the Grid, the execution is not remote.  The Local submission mode is a very useful tool to check the sanity of your job before submission to the Grid.  The job executable is run locally in exactly the same way ( same input, same output ) as it will do on the Grid Worker Node.  This allows to debug the job in a friendly local environment. DIRAC Tutorial

Local Mode Example KEK 10/2012 $ python Python (r255:77872, Mar , 14:17:52) [GCC (Red Hat )] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from DIRAC.Interfaces.API.Dirac import Dirac >>> from DIRAC.Interfaces.API.Job import Job >>> j = Job() >>> j.setExecutable('/bin/echo hello') {'OK': True, 'Value': ''} >>> Dirac().submit(j,mode='local') DIRAC Tutorial

Tutorial KEK 10/2012DIRAC Tutorial  Exercises can be found at:   Run multiple Mandelbrot jobs, get output data files  Prepare a Mandelbrot job with multiple input data files

What do you have learnt? KEK 10/2012  How to submit jobs using APIs.  Debug the payload before submitting jobs to the grid  Handle job management using APIs DIRAC Tutorial