k. harrison cern, 20th april 2004 ajdl interface and lcg submission - overview of ajdl - using ajdl...
TRANSCRIPT
![Page 1: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/1.jpg)
K. HarrisonCERN, 20th April 2004
AJDL interface and LCG submission
- Overview of AJDL- Using AJDL from Python- LCG submission
![Page 2: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/2.jpg)
20th April 2004
2
AJDL basics- AJDL (Analysis Job Description Language) provides for a high-level description of job content
- Basic elements include: Application: executable to process data Task: user configuration of application Dataset: specifies input and output Configuration: resource requirements
- AJDL aims to define way in which job information is transmitted between software components: Allow multiple clients to communicate with independently implemented services by defining a common interface
![Page 3: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/3.jpg)
20th April 2004
3
Client-service communication via AJDL
P I/S E A L
G A N G A
R O O T
J A S
C o m m a nd line
H ighle v e lJ D L
P R O O FG A N G A -LC G
C o nd o r-G
G C E /C him e raS T A RJ D A P (J A S )
D IA L-inte ra c tiv e
An a ly s is e n v iro n m e n ts S ch e d u le r s
G r idse rv ice s
A T LA S p ro d u c tio n
P lu g -inclie n ts
P o rta l/s w itc h
![Page 4: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/4.jpg)
20th April 2004
4
Working with AJDL- AJDL represents job data using XML
- To do anything useful, need classes that interpret and manipulate the data C++ implementation of relevant classes provided by DIAL - User should need to know nothing (or very little) about AJDL, but will work with client tools that use AJDL in the background
![Page 5: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/5.jpg)
20th April 2004
5
Analysis on a local batch system
- User workflow for running a Gaudi/Athena analysis on a local batch system might typically include the following steps: 1) Write code (Gaudi/Athena algorithm) 2) Specify job options 3) Select dataset 4) Provide job-execution script 5) Submit job to batch system, for example using: bsub < myJobScript 6) Intermittently query job status, for example using: bjobs 7) When job completes, look at output
![Page 6: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/6.jpg)
20th April 2004
6
Analysis on a distributed system- Aim is that user workflow for running Gaudi/Athena analysis with distributed resources and datasets should be no more complicated than for analysis on local batch system
- In ADA, steps 1) to 4) of workflow become as follows; Steps 1) and 2) Define task Step 3) Define dataset Step 4) Define application
- Client tools should help with these, and should deal with job submission, status queries and output retrieval
![Page 7: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/7.jpg)
20th April 2004
7
AJDL and Ganga
- Ganga already has its own job-description scheme, and and job-related classes, as do ATLAS and LHCb production systems Largely subjective as to which scheme is better
- AJDL not needed internally by Ganga, but is essential for interacting with ATLAS analysis services
- Two approaches possible: 1) Use current Ganga job description internally, and translate to/from AJDL as needed 2) Adopt AJDL internally also Second approach currently being investigated
![Page 8: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/8.jpg)
20th April 2004
8
Using AJDL from Python (1)
- Two approaches to supporting AJDL from Python:
1) Provide Python bindings for C++ implementation of DIAL Advantages: - Makes use of work already done - Little maintenance required (on Python side) - Demonstrates possibility to use Python with non-Python components Disadvantage: - Lose portability: rely on significant number of shared libraries, and must recompile on each platform
![Page 9: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/9.jpg)
20th April 2004
9
Using AJDL from Python (2)
2) Write Python implementation of AJDL Advantages: - Portable Disadvantages: - Work has to start from scratch - Code must be maintained, to reflect any future changes in AJDL
- Ideally, probably want both solutions: Python bindings for C++ implementation to give most complete functionality Minimal Python implementation to allow portability
![Page 10: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/10.jpg)
20th April 2004
10
Binding DIAL C++ implementation of AJDL (1)
- Start by providing Python bindings for DIAL C++ implementation of AJDL
- From outside Python, use lcgdict command, provided by SEAL, to generate LCG dictionaries from C++ class header files
- Compile dictionary files (suffix _dict.cpp) to produce shared-object libraries
- Construct Python package, with initialisation file that uses PyLCGDict/PyLCGDict2 from SEAL to load libraries and allow class access
![Page 11: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/11.jpg)
20th April 2004
11
Binding DIAL C++ implementation of AJDL (2)
- Dictionaries and libraries successfully created for DIAL AJDL classes, with help from M.Marino- Have been able to create AJDL objects from Python/Ganga, and have tested some simple methods- Some limitations with current binding software: Not possible to import free functionsProblem addressed in newer version of Reflection package? Overloaded << operator not mapped to __str__ Will find workaround to allow object printing Mapping between std::string and Python stringWorks in PyLCGDict, not yet available with PyLCGDict2- More extensive testing to start soon
![Page 12: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/12.jpg)
20th April 2004
12
Job submission to LCG- Submission of LHCb analysis jobs under LCG1 tested successfully outside of Ganga
- Data for analysis copied in advance to preselected destination site
- Needed only very simple JDL file: Executable = "/usr/bin/python2.2"; Arguments = "DaVinci.py"; StdOutput = "std.out"; StdError = "std.err"; InputSandbox = {"DaVinci.py","InstallDaVinci.py","SoftwareDistribution.py","RunDaVinci.py","DaVinci.opts"}; OutputSandbox = {"std.out","std.err"}; Requirements = other.GlueCEUniqueID == "farm012.hep.phy.cam.ac.uk:2119/jobmanager-lcgpbs-cgSq";
Python modules loaded in sandbox take care of installing required softwae and running analysis executable
![Page 13: K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission](https://reader036.vdocuments.us/reader036/viewer/2022081002/56649e905503460f94b95286/html5/thumbnails/13.jpg)
20th April 2004
13
LCG submission from Ganga
- In Ganga, could use job handler very similar to the one used for EDG submission (or an improved version of this)
- For ATLAS, would want to add an AJDL interface
- Need to understand if Ganga should continue to provide components for directly interacting with Grid/batch systems Might be better to use components developed for ATLAS and LHCb production systems