Divorcing Language Dependencies from a Scientific Software Library Gary Kumfert, with Scott Kohn, Jeff Painter, & Cal Ribbens LLNLVaTech.

Slides:



Advertisements
Similar presentations
Institute of Computer Science AGH Towards Multilanguage and Multiprotocol Interoperability: Experiments with Babel and RMIX Maciej Malawski, Daniel Harężlak,
Advertisements

COM vs. CORBA.
GridRPC Sources / Credits: IRISA/IFSIC IRISA/INRIA Thierry Priol et. al papers.
The road to reliable, autonomous distributed systems
Tammy Dahlgren, Tom Epperly, Scott Kohn, and Gary Kumfert Center for Applied Scientific Computing Common Component Architecture Working Group October 3,
Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
ARCS Data Analysis Software An overview of the ARCS software management plan Michael Aivazis California Institute of Technology ARCS Baseline Review March.
Scott Kohn with Tom Epperly and Gary Kumfert Center for Applied Scientific Computing Lawrence Livermore National Laboratory October 3, 2000 Component Technology.
DCS Architecture Bob Krzaczek. Key Design Requirement Distilled from the DCS Mission statement and the results of the Conceptual Design Review (June 1999):
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Advanced Object-Oriented Programming Features
ISYS 512 Business Application Design and Development with.Net David Chao.
TerascaleSimulation Tools and Technologies Tutorial: Presenter Institution.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Advanced Java New York University School of Continuing and Professional Studies.
Oracle8 JDBC Drivers Section 2. Common Features of Oracle JDBC Drivers The server-side and client-side Oracle JDBC drivers provide the same basic functionality.
GKK 1 CASC Recommended Viewing: Since this is a pictorial presentation, I’ve gone through the effort to type up what I normally say in the “notes” section.
ISYS 512 Business Application Design and Development with.Net David Chao.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
Adapting Legacy Computational Software for XMSF 1 © 2003 White & Pullen, GMU03F-SIW-112 Adapting Legacy Computational Software for XMSF Elizabeth L. White.
Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Achieving Language Interoperability with.
CCA Port, Component & Application Build Skeleton Templates “A new script toolkit for generating CCA build skeletons” Torsten Wilde and James Kohl Oak Ridge.
Java Adaptive Mathematical Modeling Engine (JAMME) Leeland Artra, Cell Systems Initiative (CSI) Zheng Li, Department of Bioengineering University of Washington,
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Chapter 3: Objects, Components, and the Web Textbook IT Architectures and Middleware, Second Edition Chris Britton and Peter Bye AIT 600 Jeff Schmitt September.
Tamara Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert Center for Applied Scientific Computing.
Component Architecture (CORBA – RMI) -Shalini Pradhan.
CASC This work was performed under the auspices of the U.S. Department of Energy by University of California Lawrence Livermore National Laboratory under.
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Distributed Component Object Model (DCOM)
CCA Common Component Architecture CCA Forum Tutorial Working Group Contributors: Language Interoperability Using Gary.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
 OOPLs  Help companies reduce complexity  Increase competition in open markets  Speeds up development  Improves maintenance, resusability, modifiability.
Tammy Dahlgren with Tom Epperly, Scott Kohn, and Gary Kumfert Center for Applied Scientific Computing Common Component Architecture Working Group October.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Grid Computing Research Lab SUNY Binghamton 1 XCAT-C++: A High Performance Distributed CCA Framework Madhu Govindaraju.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Center for Component Technology for Terascale Simulation Software CCA is about: Enhancing Programmer Productivity without sacrificing performance. Supporting.
SCIRun and SPA integration status Steven G. Parker Ayla Khan Oscar Barney.
Presented by An Overview of the Common Component Architecture (CCA) The CCA Forum and the Center for Technology for Advanced Scientific Component Software.
Active Server Pages (ASP), also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically generated web pages.
Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert.
Scott Kohn with Tammy Dahlgren, Tom Epperly, and Gary Kumfert Center for Applied Scientific Computing Lawrence Livermore National Laboratory October 2,
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
 Common Object Request Broker Architecture  An industry standard developed by OMG to help in distributed programming.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
BOĞAZİÇİ UNIVERSITY DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS MATLAB AS A DATA MINING ENVIRONMENT.
CCA Common Component Architecture CCA Forum Tutorial Working Group CCA Status and Plans.
ProActive components and legacy code Matthieu MOREL.
Connections to Other Packages The Cactus Team Albert Einstein Institute
Getting Started with SIDL using the ANL SIDL Environment (ASE) ANL SIDL Team MCS Division, ANL April 2003 The ANL SIDL compilers are based on the Scientific.
© 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.
Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert.
A Pictorial Introduction to Components in Scientific Computing.
25 April Unified Cryptologic Architecture: A Framework for a Service Based Architecture Unified Cryptologic Architecture: A Framework for a Service.
Out Look 1.Introduction 2. Guiding Principles of Windows DNA 3. Development Technologies 4. DNA - Architecture for Distributed Applications 5. Client Environments.
ISYS 512 Business Application Design and Development with.Net David Chao.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Gary Kumfert & Scott Kohn Tammy Dahlgren, Tom Epperly, Steve Smith, and Bill Bosl Introducing...
Interface definition language
1/30/2003 Los Alamos National Laboratory1 A Migration Framework for Legacy Scientific Applications  Current tendency: monolithic architectures large,
“Port Monitor”: progress & open questions Torsten Wilde and James Kohl Oak Ridge National Laboratory CCA Forum Quarterly Meeting Santa Fe, NM ~ October.
.NET Omid Darroudi.
Inventory of Distributed Computing Concepts and Web services
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Divorcing Language Dependencies from a Scientific Software Library Gary Kumfert, with Scott Kohn, Jeff Painter, & Cal Ribbens LLNLVaTech

GKK 2 CASC l Language Interoperability Tool  You specify “interfaces” in our language  We generate glue code between application and library l Part of a Component Framework  Enables OOP in non-OOP languages  Enables safe Dynamic Casting and QueryInterface capabilities

GKK 3 CASC What I mean by “Language Interoperability” Simulation Framework (C) Solver Library (C++) Numerical Routines (f90) Scripting Driver (Python) Visualization System (Java)

GKK 4 CASC Hand Coded Solutions JNI Native SWIG Platform Dependent C C++ f77 f90 Python Java

GKK 5 CASC Objects, Virtual Functions, RMI & Reference Counting: all from Babel C C++ f77 f90 Python Java Babel

GKK 6 CASC Babel generates glue code SIDL interface description parseranalyzerbackend f77 C Python C++ machine configuration database XML repository interface description

GKK 7 CASC Scientific Interface Definition Language (SIDL) version Hypre 0.5; version ESI 1.0; import ESI; package Hypre { interface Vector extends ESI.Vector { double dot(in Vector y); void axpy(in double a, in Vector y); }; interface Matrix { void apply(out Vector Ax, in Vector x); }; class SparseMatrix implements Matrix, RowAddressable { void apply(out Vector Ax, in Vector x); }; class exception interface package

GKK 8 CASC l Software to be “divorced” from its language dependence l Scalable parallel linear solvers and preconditioners (LLNL) l Implemented in ANSI C using MPI l “Object Based”

GKK 9 CASC Collaboration Objectives l Babel side:  demonstrate Babel technology  feedback from library developers l Hypre side:  Automatically create Fortran bindings  Explore new designs  Object-Oriented  Component-Based  Integrate other software  C++ or F77

GKK 10 CASC Envisioned Architecture MPI “official” hypre interface (ANSI C) F77PythonC++

GKK 11 CASC Approach l Identify minimal working subset of hypre  Structured Solvers l Create SIDL description l Add base classes to create heirarchy l Tie generated code to existing hypre library l Iterate

GKK 12 CASC Problem: Creating wrong types l SIDL has 3 types of objects  interfaces - no implementations (pure abstract)  abstract classes - partial implementations  concrete classes - full implementations l Users were creating abstract classes when they meant to create concrete classes interface Foo { int doThis( in int i ); int doThat( in int i ); } class Bar implements Foo { int doThis( in int i ); }; class Grille implements Foo { int doThis( in int i ); int doThat( in int i ); };

GKK 13 CASC Solution: Fix The Grammar l Added the “abstract” keyword  Compiler issues error if a method is undefined and class is not declared abstract l Added the “implements-all” keyword  declares all methods as overridden  saves user typing interface Foo { int doThis( in int i ); int doThat( in int i ); } class Bar implements Foo { int doThis( in int i ); }; class Grille implements Foo { int doThis( in int i ); int doThat( in int i ); }; interface Foo { int doThis( in int i ); int doThat( in int i ); } abstract class Bar implements Foo { int doThis( in int i ); }; class Grille implements Foo { int doThis( in int i ); int doThat( in int i ); }; interface Foo { int doThis( in int i ); int doThat( in int i ); } abstract class Bar implements Foo { int doThis( in int i ); }; class Grille implements-all Foo { // int doThis( in int i ); // int doThat( in int i ); };

GKK 14 CASC Problem: Managing all the Files l Babel creates many source files foo.sidl foo.f foo_ior.c foo_ior.hfoo_skel.h foo_skel.cc foo_impl.h foo_impl.ccfoo_stub.c foo_stub.h one set for each class & interface

GKK 15 CASC Solution: Babel Generates Makefile Macros l A “babel.make” file is generated l Users include it into their own makefiles  They control the build rules  We provide the file names IORSRCS = foo_ior.c \ bar_ior.c \ grille_ior.c IORHDRS = foo_ior.h \ bar_ior.h \ grille_ior.h

GKK 16 CASC Problem: Incremental Development l Library Developer would do the following:  write SIDL file  run Babel to generate bindings  hand edit “Impl” files to call their library code #include “mylib.h” int impl_Foo_doThis( Foo * self, const int i ) { return mylib_Foo_doThis( (mylib_Foo*) self->userdata, i ); }

GKK 17 CASC Problem: Incremental Development (2) l Now assume this was done for 20 classes, each with 20 methods. l Now assume a class needed a 21st method l Babel would regenerate all files and wipe out Developer’s edits #include “mylib.h” int impl_Foo_doThis( Foo * self, const int i ) { return mylib_Foo_doThis( (mylib_Foo*) self->userdata, i ); }

GKK 18 CASC Solution: Code Splicing l Added preservation of developer’s edits l Code Splicer works line-by-line  interleaves old code into new code  looks for begin-end pairs embedded in comments /* DO NOT DELETE splicer.begin( user-includes ) */ #include “mylib.h” /* DO NOT DELETE splicer.end( user-includes ) */ int impl_Foo_doThis( Foo * self, const int i ) { /* DO NOT DELETE splicer.begin( Foo_doThis ) */ return mylib_Foo_doThis( (mylib_Foo*) self->userdata, i ); /* DO NOT DELETE splicer.end( Foo_doThis ) */ }

GKK 19 CASC Results l Call hypre  from C, F77, or C++  on SPARC Solaris or DEC/OSF  (more languages & platforms coming) l No interference with MPI l Babel overhead within runtime noise

GKK 20 CASC MPI “official” hypre interface (ANSI C) F77PythonC++ Best Result: Change of Architecture Python MPI F77C++ANSI C Babel Runtime “official”interface

GKK 21 CASC Reasons for Change l Liked using the tool l No Hand F77 bindings  incompatible  outdated l Preferred discussing designs in SIDL  easy for  impossible to mix implementation & interface l Convinced of Babel’s longevity l Babel enforces regularity in code l Liked automatic reference counting l Excellent compromise between:  Wanting polymorphism and OO techniques  Wanting all ANSI C for maximum portability

GKK 22 CASC Current & Future Work l Language Support  Current: C, C++, F77, Python (Client)  Coming: Python(Server), Java, F90, Matlab l Platform Independence  Implies RMI / Distributed Computing  SOAP l Parallel Data Redistribution l Babelization efforts in LLNL  hypre  SAMRAI  ALPS

GKK 23 CASC l Our Website  Alexandria (Component Repository)  Quorum (Online Voting)  Generic Parallel Redistribution l hypre

GKK 24 CASC Work performed under the auspices of the U. S. Department of Energy by Lawrence Livermore National Laboratory under Contract W-7405-Eng-48 UCRL-VG Rev 1

GKK 25 CASC Key to Babel’s Interoperability... SIDL Scientific Interface Definition Language IOR Intermediate Object Representation XML eXtensible Markup Language Human Compatible Web Compatible Compiler Compatible

GKK 26 CASC Business Component Frameworks l CORBA 4Language Independent 4Wide Industry Acceptance 4Primarily Remoting Architecture l COM 4Language Independent 4Most Established 4In Process Optimization 4Network Transparent l Enterprise Java Beans (EJB) 4Platform Independent 4Runs wherever Java does

GKK 27 CASC Business Component Frameworks l CORBA 4Language Independent 4Wide Industry Acceptance 4Primarily Remoting Architecture 8Huge Standard 8No In-Process Optimization l COM 4Language Independent 4Most Established 4In Process Optimization 4Network Transparent 8not Microsoft Transparent 8Relies on sophisticated development tools l Enterprise Java Beans (EJB) 4Platform Independent 4Runs wherever Java does 8Language Specific 8Potentially highest overhead l All The Above 8No Complex Intrinsic Datatype 8No Dynamic Multidimensional Arrays 8No Fortran77/90/95 bindings 8No Parallel Components 8No Concept of SPMD Programming Science