M.Frank LHCb/CERN Using Shared Libraries ã The traditional way ã How to build shared images? ã Benefits ã Process configuration ã Fortran.

Slides:



Advertisements
Similar presentations
M.Frank LHCb/CERN POOL persistency: Status  Current understanding  Today’s model  Conclusions.
Advertisements

Lightweight Abstraction for Mathematical Computation in Java 1 Pavel Bourdykine and Stephen M. Watt Department of Computer Science Western University London.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
(1) ICS 313: Programming Language Theory Chapter 10: Implementing Subprograms.
ISBN Chapter 10 Implementing Subprograms.
ISBN Chapter 10 Implementing Subprograms.
Names and Scopes CS 351. Program Binding We should be familiar with this notion. A variable is bound to a method or current block e.g in C++: namespace.
GLAST LAT Offline SoftwareWorkshop - SLAC, Jan , 2001 TDS objects and Converters. (Transient Data Store) Ian Gable Software Workshop Jan 2001.
Encapsulation by Subprograms and Type Definitions
FunctionsFunctions Systems Programming. Systems Programming: Functions 2 Functions   Simple Function Example   Function Prototype and Declaration.
1 CSCI 360 Survey Of Programming Languages 9 – Implementing Subprograms Spring, 2008 Doug L Hoffman, PhD.
. Memory Management. Memory Organization u During run time, variables can be stored in one of three “pools”  Stack  Static heap  Dynamic heap.
FunctionsFunctions Systems Programming Concepts. Functions   Simple Function Example   Function Prototype and Declaration   Math Library Functions.
Programming Languages and Paradigms Object-Oriented Programming.
1 Inheritance and Polymorphism Chapter 9. 2 Polymorphism, Dynamic Binding and Generic Programming public class Test { public static void main(String[]
Dynamic Data Exchanges with the Java Flow Processor Presenter: Scott Bowers Date: April 25, 2007.
M.Frank LHCb/CERN - In behalf of the LHCb GAUDI team Data Persistency Solution for LHCb ã Motivation ã Data access ã Generic model ã Experience & Conclusions.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
Defining and Converting Data Copyright Kip Irvine, 2003 Last Update: 11/4/2003.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
GLAST Gaudi Code Review, 10 Sept. 2002, H. Kelly, 2-1 GLAST Event Data Model and Persistency.
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
CHEP 2003 March 22-28, 2003 POOL Data Storage, Cache and Conversion Mechanism Motivation Data access Generic model Experience & Conclusions D.Düllmann,
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
CSC3315 (Spring 2008)1 CSC 3315 Subprograms Hamid Harroud School of Science and Engineering, Akhawayn University
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 8 Advanced SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Use of Gaudi in Reconstruction Weidong Li 23/06/2004.
CPSC 252 Operator Overloading and Convert Constructors Page 1 Operator overloading We would like to assign an element to a vector or retrieve an element.
Gaudi Framework Tutorial, April Job Options and Printing.
ISBN Chapter 10 Implementing Subprograms.
M.Frank LHCb/CERN Random Numbers in GAUDI ã Requirements ã Interface ã Usage.
KIC/Computer Programming & Problem Solving 1.  Introduction  Program Modules in C  Math Library Functions  Functions  Function Definitions  Function.
23/2/2000Status of GAUDI 1 P. Mato / CERN Computing meeting, LHCb Week 23 February 2000.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Tutorial: Examples (09may00 - ATLAS Software LBNL) May 2000 Prototype Framework Tutorial: Examples Paolo Calafiura, Charles Leggett HCG/NERSC/LBNL.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
General requirements for BES III offline & EF selection software Weidong Li.
Implementing Subprograms
1 Activation records Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
THE EYESWEB PLATFORM - GDE The EyesWeb XMI multimodal platform GDE 5 March 2015.
CERN Tutorial, September Overview of LHCb applications and software environment.
Athena Tutorial: Liquid Argon Example ATHENA The ATLAS Control Framework Tutorial: Liquid Argon Example Based on original by S. Rajagopalan BNL.
Dale Roberts CSCI N305 Functions Declarations Department of Computer and Information Science, School of Science, IUPUI.
Bologna Tutorial, June Overview of LHCb applications and software environment.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
ISBN Chapter 10 Implementing Subprograms.
Implementing Subprograms
Root I/O and the Gaudi Framework
CS 326 Programming Languages, Concepts and Implementation
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Java Primer 1: Types, Classes and Operators
Using Shared Libraries
GLAST Gaudi Review T. Burnett H.Kelly 10 Sept 02 Gaudi code review
Parallel Shared Memory
Chapter 5 - Functions Outline 5.1 Introduction
Implementing Subprograms
Memory Allocation CS 217.
Data Persistency Solution for LHCb
Implementing Subprograms
Activation records Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Type Conversion It is a procedure of converting one data type values into another data type In C programming language we are having two types of type conversion.
Event Storage GAUDI - Data access/storage Framework related issues
Activation records Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Activation records Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Activation records Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Implementing Subprograms
Presentation transcript:

M.Frank LHCb/CERN Using Shared Libraries ã The traditional way ã How to build shared images? ã Benefits ã Process configuration ã Fortran

M.Frank LHCb/CERNGAUDI The traditional way - comparison ã The past: ä 1 Executable ä Many object files/libraries, all linked into one executable at link time ã Gaudi: ä 1 Executable ä Very few object files/libraries linked in ä Process aquires it’s “personality” at run-time ä Dynamic linkage of images ä Execution of code within these images ã Keep possibility to link statically

M.Frank LHCb/CERNGAUDI What type of libraries exist? ã Static libraries ä Code to be duplicated for each image ä Build using CMT as known ä Result archive library ã Implicitly linked libraries ä Equivalent to tradition shared libraries ä Public implementation code: Base classes ä On the link step use CMT macro: macro XXXXshlibflags "$(libraryshr_linkopts) …”

M.Frank LHCb/CERNGAUDI What type of libraries exists? ã Explicitly linked libraries ä Loaded on demand component libraries ä Private implementation code ä Single entry point extern “C” std::list & getFactoryEntries() Access to all implemented factories ä On the link step use CMT macro: macro XXXXshlibflags "$(componentshr_linkopts) …”

M.Frank LHCb/CERNGAUDI Benefits ã Process depends on configuration PATH LD_LIBRARY_PATH ã Modules become manageable Minimize dependencies ã Upgrades are simple No link step is involved ã Efficient use of resources No unused ballast carried around

M.Frank LHCb/CERNGAUDI Managing the Environment ã Unix: cmt config; source setup.(c)sh ã WNT: use CMT add-in for Developer Studio Set Environment Show Environment Show CMT macros Build projects and workspace CMT dialog Display CMT help Output

M.Frank LHCb/CERNGAUDI Managing the Environment ã CMT add-in determines CMT parameters from active project ã If there is no active project: Dialog is invoked

M.Frank LHCb/CERNGAUDI Side Remarks ã Fortran ä Must be linked directly into the executable I.e. the traditional way ä Problem of duplication of common blocks ä Do not even think of linking Fortran to shared images - unless you know what you are doing

M.Frank LHCb/CERNGAUDI

M.Frank LHCb/CERN How to make objects persistent ã What must be provided ã The musts ã I won’t bore with internals ã See Rio example in GaudiExamples

M.Frank LHCb/CERNGAUDI Storing objects ã From using Sicb data we know ä Writing converters is a pain for starters ä …but cannot be avoided ã Automate conversion procedure as far as possible ä Use data serialization mechanism ä inspired by Java / MFC / ROOT

M.Frank LHCb/CERNGAUDI Provide Class Identifier class MyObject : public DataObject / ContainedObject{... /// Retrieve reference to class definition structure virtual const CLID& clID() const { return MyObject::classID(); } static const CLID& classID() { return CLID_MyObject;}... }; ã Nothing new ã Needed by the “generic converter” and “generic object factory” ã Mandatory to handle inhomogeneous containers

M.Frank LHCb/CERNGAUDI Provide Data Serializers StreamBuffer& MyObject::serialize( StreamBuffer& s ) const { DataObject::serialize(s); return s << m_event << m_run << m_time; } StreamBuffer& MyObject::serialize( StreamBuffer& s ) { DataObject::serialize(s); return s >> m_event >> m_run >> m_time; } ã Accepted data types ä Primitives: int, float, … ä Smart references: e.g. SmartRef Writing Reading

M.Frank LHCb/CERNGAUDI Provide Factories ã Object factory for  Contained objects static const ContainedObjectFactory s_MyTrackFactory; const IFactory& MyTrackFactory = s_MyTrackFactory;  Object container e.g. ObjectVector static const DataObjectFactory > s_MyTrackVectorFactory; const Ifactory& MyTrackVectorFactory = s_MyTrackVectorFactory; ã Converter Factory static const DbUserCnvFactory > s_CnvFactory; const ICnvFactory& MyTrackCnvFactory = s_CnvFactory;

M.Frank LHCb/CERNGAUDI // Output Stream RootDst.ItemList = { "/Event/MyTracks#1" }; RootDst.EvtDataSvc = "EventDataSvc"; RootDst.EvtConversionSvc = "RootDbEvtCnvSvc"; RootDst.OutputFile = "resultEx.root"; // Application Mgr ApplicationMgr.ExtSvc += { "DbEventCnvSvc/RootDbEvtCnvSvc” }; ApplicationMgr.DLLs += { "DbCnvImp","DbConverters","RootDb”}; ApplicationMgr.OutStream = { "RootDst" }; // Persistency/Conversion service setup: EventPersistencySvc.CnvServices = { "RootDbEvtCnvSvc”, "SicbEventCnvSvc” }; RootDbEvtCnvSvc.DbTypeName = "RootDb::OODataBase"; RootDbEvtCnvSvc.FddbName = "RioFederation"; Job options ã Persistency setup

M.Frank LHCb/CERNGAUDI Conclusions ã It should be simple to make objects persistent ã Generic converters and object factories are easy to implement ã Total overhead < 20 LOC per class ã Output toWNTLinux ä RIO x x ä Objectivity/DB (not supported) x ä ODBC / RDBMS (not supported) x