March 27, 2007HPC 07 - Norfolk, VA1 C++ Reflection for High Performance Problem Solving Environments Tharaka Devadithya 1, Kenneth Chiu 2, Wei Lu 1 1.

Slides:



Advertisements
Similar presentations
ECE 750 Topic 8 Meta-programming languages, systems, and applications Load-time structural reflection in Java – Shigeru Chiba, 2000 May 27, 2004 Shimin.
Advertisements

Multi-Model Digital Video Library Professor: Michael Lyu Member: Jacky Ma Joan Chung Multi-Model Digital Video Library LYU9904 Multi-Model Digital Video.
1 Coven a Framework for High Performance Problem Solving Environments Nathan A. DeBardeleben Walter B. Ligon III Sourabh Pandit Dan C. Stanzione Jr. Parallel.
JAXB Java Architecture for XML Binding Andy Fanton Khalid AlBayat.
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
Remote Object Invocation Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Technical Architectures
DANSE Central Services Michael Aivazis Caltech NSF Review May 23, 2008.
Slides prepared by Rose Williams, Binghamton University ICS201 Lecture 24 : Collections King Fahd University of Petroleum & Minerals College of Computer.
Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
An overview of the DANSE software architecture Michael Aivazis Caltech DANSE Kick-Off Meeting Pasadena Aug 15, 2006.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Jun Peng Stanford University – Department of Civil and Environmental Engineering Nov 17, 2000 DISSERTATION PROPOSAL A Software Framework for Collaborative.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 4: RPCs vs. CORBA Dr. Michael R. Lyu Computer Science & Engineering.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
September 21, 2005 Dynamic Typing in CORBA Middleware Jeff Parsons ISIS Vanderbilt University Nashville, TN.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++
Introduction to Object-oriented programming and software development Lecture 1.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Dale Roberts Procedural Programming using Java Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
CSCI-383 Object-Oriented Programming & Design Lecture 1.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
Introduction To System Analysis and Design
Features of Object Oriented Programming Lec.4. ABSTRACTION AND ENCAPSULATION Computer programs can be very complex, perhaps the most complicated artifact.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
DANSE Central Services Michael Aivazis Caltech NSF Review May 31, 2007.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Invitation to Computer Science 5 th Edition Chapter 6 An Introduction to System Software and Virtual Machine s.
Grid Computing Research Lab SUNY Binghamton 1 XCAT-C++: A High Performance Distributed CCA Framework Madhu Govindaraju.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
SCIRun and SPA integration status Steven G. Parker Ayla Khan Oscar Barney.
TMS320 DSP Algorithm Standard: Overview & Rationalization.
Transparent Mobility of Distributed Objects using.NET Cristóbal Costa, Nour Ali, Carlos Millan, Jose A. Carsí 4th International Conference in Central Europe.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Grid programming with components: an advanced COMPonent platform for an effective invisible grid © 2006 GridCOMP Grids Programming with components. An.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
 All calls to method toString and earnings are resolved at execution time, based on the type of the object to which currentEmployee refers.  Known as.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Design of an Integrated Robot Simulator for Learning Applications Brendon Wilson April 15th, 1999.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Progress Report - Year 2 Extensions of the PhD Symposium Presentation Daniel McEnnis.
1 ProActive GCM – CCA Interoperability Maciej Malawski, Ludovic Henrio, Matthieu Morel, Francoise Baude, Denis Caromel, Marian Bubak Institute of Computer.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
(C) 2003 University of ManchesterCS31010 Lecture 14: CORBA.
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Pyragen A PYTHON WRAPPER GENERATOR TO APPLICATION CORE LIBRARIES Fernando PEREIRA, Christian THEIS - HSE/RP EDMS tech note:
Polymorphism, Interfaces & Operator Overloading
Java Beans Sagun Dhakhwa.
Object-Orientated Programming
Many-core Software Development Platforms
Inventory of Distributed Computing Concepts
Overview of Workflows: Why Use Them?
Presentation transcript:

March 27, 2007HPC 07 - Norfolk, VA1 C++ Reflection for High Performance Problem Solving Environments Tharaka Devadithya 1, Kenneth Chiu 2, Wei Lu 1 1. Computer Science Department, Indiana University 2. Department of Computer Science, State University of New York, Binghamton

Outline Reflection Overview Problem Solving Environments (PSEs) Motivation and Goals C++ Reflection Library Performance Applications Related Work March 27, 2007HPC 07 - Norfolk, VA2

March 27, 2007HPC 07 - Norfolk, VA3 Reflection Involves accessing type information Two main types  Compile-time reflection E.g., Boost type traits  Run-time reflection Some languages support reflection as part of their standard specifications  E.g., Java, C#, Python C++ supports Run-Time Type Information (RTTI)  Very limited features

March 27, 2007HPC 07 - Norfolk, VA4 Implementing Run-time Reflection Include additional metadata to compiled code. Compilers of languages that support reflection generates this metadata and inserts into the binary. Since C++ compiler does not generate this metadata, it must be generated as a separate step.

March 27, 2007HPC 07 - Norfolk, VA5 Problem Solving Environments (PSEs) Provides all the computational facilities necessary to solve a target class of problems. A scientist or engineer should be able to dynamically couple tasks or computations, such that the composite will lead to solving some problem. Examples  Symbolic manipulation for basic mathematical expressions  Visualization packages for 2-, 3-, and 4-D phenomena  Geometric modelers for a broad class of shapes

March 27, 2007HPC 07 - Norfolk, VA6 How Reflection Aids PSE Need to dynamically couple tasks or computations. It should be possible for the back-end to dynamically invoke functionalities  become known only during run-time. Reflection provides a powerful and flexible method invocation ability.  E.g., request the application to dynamically load a library and invoke an arbitrary method in it.

March 27, 2007HPC 07 - Norfolk, VA7 Need for Reflection in C++ Reflection is not supported by modern languages used in High Performance Computing (HPC). Attempts to incorporate reflection capabilities to C++ are either  intrusive, or  not fully compliant with the C++ standard specification PSE developers for HPC domains have to depend on another language (e.g., Java) to “wrap” each component with a reflection enabled interface.  Multiple language skill required  Overhead in transferring data

March 27, 2007HPC 07 - Norfolk, VA8 Benefits of Reflection Develop generic algorithms. E.g., classType = ClassType::getClass(“Service1”); obj = classType.createInstance(); obj.invoke(“method1”); Capabilities resulting from this generality.  Object serialization Results in a generic object persistence framework  Interface to a Scripting Environment E.g., provide a Python interface to HPC code without needing language bindings for each invocation.  Object Instantiation More flexible approach than using the Factory pattern.

March 27, 2007HPC 07 - Norfolk, VA9 Goals Run-time access to members.  Invoke member functions  Read from / write to data members Standard compliant.  Increases portability Relatively efficient.  Minimize overhead of indirect invocations Non-intrusive.  Can be used with existing code  Avoid programmer errors

March 27, 2007HPC 07 - Norfolk, VA10 C++ Reflection Library Consists of  a small set of core classes, and  another set of generated classes to store and present the type-specific, metadata information. generated by parsing the user-supplied target classes. Employs 2 main types of classes  Meta classes  Member classes

Code Generation Meta-data generated using source files (header files defining classes).

March 27, 2007HPC 07 - Norfolk, VA12 Meta classes Maintains information about user defined classes.  Name and type  List of data members and member functions  Inheritance information Interface to instantiate a class. Example ClassType *ct = ClassType::getClass("ClassA"); string className = ct->name(); classAObj = ct->createInstance();

March 27, 2007HPC 07 - Norfolk, VA13 Member classes Encapsulate the members of a class. Provide means of indirectly accessing them, given their names at run-time. 2 Types  Data members DataMember dm = ct->getDataMember("f1"); dm.ref (&classAObj) = 1234;  Member functions MemberFunction mf = ct->getMemberFunction("m1"); mf.invoke (&classAObj);

March 27, 2007HPC 07 - Norfolk, VA14 Sample Usage XMLDocument dom; dom.parse(...); classType = ClassType::getClass("Service"); obj = classType.createInstance(); operationName = dom.getRoot()->getName(); memberFunction = classType.getMemberFunction(operationName); Arguments args; extractArgs(memberFunction, dom.getRoot(), args); memberFunction.genericInvoke (*obj, args);

Performance Invocation time Reflection overhead  with 100 invocations  with 100,000 invocations Reflection Vs. generated code March 27, 2007HPC 07 - Norfolk, VA15

Invocation Times March 27, 2007HPC 07 - Norfolk, VA16

Reflection Overhead (100 invocations) March 27, 2007HPC 07 - Norfolk, VA17

Reflection Overhead (100,000 invocations) March 27, 2007HPC 07 - Norfolk, VA18

Reflection Vs. Generated Code March 27, 2007HPC 07 - Norfolk, VA19

Applications Remote method invocation  Requires ability to invoke a method, given the class and method names along with the arguments at runtime. Solving Large Sparse Linear Systems of Equations  Need to try out different strategies.  A PSE could help the algebraist by providing a set of components out of which he or she can choose the ones that provide the functionalities required by the current strategy. Unit testing framework  Prefix each test member function name with some predefined word, (E.g., “testXXXX()”) March 27, 2007HPC 07 - Norfolk, VA20

Related Work Some other approaches to reflection in C++  SEAL Reflex  Meta Object Protocol (MOP)  CppReflect All the above approaches are either,  intrusive, or  not fully compliant with the C++ standard specification March 27, 2007HPC 07 - Norfolk, VA21

Questions March 27, 2007HPC 07 - Norfolk, VA22