Name Center for Applied Scientific Computing month day, 1998

Name Center for Applied Scientific Computing month day, 1998

Achieving Language Interoperability with Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Babels Scope & CCA CCA Compliant Frameworks Component Semantics Babel provides language interoperability, not components. We collaborate with CCA to add parallel distributed support Compilers & Linkers Operating System

We also provide tools (Quorum & Alexandria) to facilitate component development and deployment CASC GKK 2 Release Announcement C, CASC C++, F77, Python(client) GKK 3 babel-0.5.0.tar.gz Babel written in Java Babel

code generator runtime library written in ANSI C Docs (minimal) papers, talks, javadoc html babel101 tutorial CASC GKK 4 Hand Coded Language Interoperability f77 JNI Native SWIG Platform Dependent C

f90 C++ Python Java CASC GKK 5 Babel Enabled Language Interoperability Truly Object Oriented Exception Handling Reference Counting RMI (future) f77

C f90 C++ Python Java CASC GKK 6 Babel Enabled Language Interoperability Whats Whats In In This This Release: Release: f77 C f90 C++ Python Java

CASC GKK 7 Babel Has Two Types of Customers Developers Users Have Have a code Want to increase their user base Want Will May learn SIDL

Want Babel general and powerful CASC a problem to solve their problem never see SIDL Want software thats easy & trustworthy GKK 8 Babels Design Priorities Performance Developer/User dichotomy Whats natural for each language? Could expose C array structs in C++ C++ style would be SIDL::array

template template <> <> array array :: public public array_mixin array_mixin << array_t, array_t, item_t, item_t, CASC item_cxx_wrapper_t> item_cxx_wrapper_t> {{ }} GKK 9 SIDL (Scientific Interface Definition Language) Builds on Industry version Hello 1.0; IDL technology CORBA COM

Designed for Scientific Apps CASC complex types dynamic multidimensional arrays package Hello { class World { string getMsg(); } } GKK 10 version MySolverLib 0.1.0; import ESI; package MySolverLib { interface MatrixGenerator { ... } class OptionDatabase { void getOption( in string name, out string val);

} class Vector implements-all ESI.Vector { void setOptions( in OptionDatabase db ); } class Bizarre implements MatrixGenerator { ... void setData( in array a ); } CASC GKK 11 Many forms of language interoperable interfaces le b i t pa m Co le b i t a p om

C an m Hu SIDL r e l i mp o C IOR Scientific Interface Definition Language Internal Object Representation XML eXtensible Markup le b i t Language pa m

Co b We CASC GKK 12 XML enables... ...Type Descriptions on Shared Repositories ...Browsing for Types CASC ...automated creation via higher-level tools ...automated search & discovery by advanced builders GKK 13 Language Interoperability: How Babel Makes it Work Application

Stubs Application: users LOP (Language Of Preference) If developer used Babel, they also have a SIDL file. IORs SIDL SIDL Skels Impls CASC Implementation: developers LOP (Can be wrappers to legacy code) GKK 14 Language Interoperability: How Babel Makes it Work Application

Application: users LOP (Language Of Preference) Stubs Client Side Stubs: users LOP to C IORs Internal Object Representation (IOR): Always in C Skels Server Side Skeletons: translates IOR (in C) to developers LOP Impls Implementation: developers LOP (Can be wrappers to legacy code)

CASC GKK 15 How Much Language Interoperability Have We Achieved? Basic Basic Types Types Modes Modes in bool bool in Extended Types Extended Types out char char out

OO Method Dispatch Objects intMethod Dispatch OO Objects inout int inout enumerations long regular regular enumerations Exception Handling return long Exception Handling return final float

of basic types arrays final float arrays of basic types value value All Combinations of Languages For For All Combinations of Languages arrays of objects double static double static arrays of objects

C C C C interfaces fcomplex fcomplex are interfaces (arrays (arrays are C++ C++ 1431 dcomplex test C++ C++ cases dcomplex multidimensional, no 1431 test cases

classes multidimensional, no classes string string F77 F77 arrays of arrays) F77 F77 arrays of arrays) (and counting) (and counting) opaque opaque Python Python CASC GKK 16

What we foresee, based on experience with our tests... Language Interoperability Developer Concerns: Configuration, Packaging, & Deployment User Concerns: Installation Trust CASC GKK 18 These arent new problems... But they are on a larger scale Hand HandCoded Coded Language LanguageInteroperability Interoperability f77 f77 JNI JNI Native

Native SWIG SWIG Platform Dependent Platform Dependent CC f90 f90 C++ C++ Python Python Developer Concerns: Configuration, Packaging, & Deployment Java Java CASC CASC Babel Babelenabled

enabled Language LanguageInteroperability Interoperability GKK 4 GKK 4 Object Oriented Object Oriented Reference Counting Reference Countingf77 Exception Handling Exception Handling RMI (future) RMI (future) f77 CC f90 f90 C++ C++ Python Python

Java Java CASC CASC CASC User Concerns: Installation Trust GKK 5 GKK 5 GKK 19 For Example... To support Python and Java All libraries must be shared (*.so) not statically linked (*.a) C++ shared libraries are problematic

Exception support is platform/compiler dependent Linking issues when interoperating with other languages Can create valid shared library with uncatchable exceptions CASC GKK 21 Babels Configuration/Build GNU Make Autoconf configuration Automake build Makefiles Libtool shared libraries CUTE

custom testing CASC pythons own build system javas built-in (broken) make helper scripts fixes to autoconf, automake & libtool lots of hacks GKK 22 Test History

sparc-sun-solaris2.7-gcc 1600 babel 0.5.x babel 0.4.x 1400 1000 800 600 400 200 IOR Rewrite # Test Cases 1200 Configure/Build/Repository faults, not software failures!!! pass xfail

fail 0 Date CASC GKK 23 Problems affect the User too... How does a user get and install language interoperable software? Binary: if supplied by developer Source: Assume configure; make install? How to link into application? If any C++ code, must use C++ linker Which C++ to use? C++ has no std binary interface CASC

GKK 24 Crux of the problem Were building 21st century C++ F77 Python Java technology... C ... using 30 year old tools. Autoheader libtool (perl/sh) aclocal Automake (perl) Autoconf (M4) Make Bourne shell CASC GKK 25 Solution Integrated config, build, package, test and management system. no make inside! can have action create many files understands directories uses real database program all aspects in one language MUST BE OPEN SOURCE

CASC GKK 26 In the mean time... Babel works on other platforms, just not automated config/testing Java code generator (precompiled) ANSI C runtime library (no problem) Babels tests are (necessarily) pathological worst-case examples We didnt create these problems, we just exercise them aggressively CASC GKK 27 Future Babel: Will Provide More Build Help babel.make currently lists code generated

may add additional flags, macros, etc. configure currently used for regression tests may generate artifacts useful for developers helper scripts warnings CASC GKK 28 Farther Future Babel: Will Do Distributed Computing Application Line Protocol Stubs Unmarshaler IORs IORs

Internet Marshaler Skels Line Protocol Impls CASC GKK 29 Closing Remarks Babel Beta 0.5 is released Babel enables language interoperability connect C, C++, F77, and Python provide a uniform object-model, even in non-OO languages. Deploying & Installing Language

Interoperable Code in General CASC is still very hard has broken every tool we use GKK 30 The End [email protected] [email protected] [email protected] Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, Gary Kumfert, & Steve Smith CASC GKK 31 A.3. Can HPC and Component Technology REALISTICALLY be integrated? Yes. But HPC Components have huge (and unique) hurdles:

CASC Diverse Architectures Diverse OSs Integration of SPMD and Dist. Comp. Archaic Pkg/Devel/Config/Build tools Non-CS trained (or interested) users GKK 32 B.3. Can the HPC community really afford yet another compiler such as Babel? Is language interoperability important? How important? CASC GKK 33 B.3. How is the Java subset of C++ inadequate as an HPC IDL?

What is a Java subset of C++ ? How does one use it to bind to other languages? get a common inheritance model? get a common exception model? CASC GKK 34 B.5. What is the role of traditional (parallel) tools in component technology? Hopefully, theyre replaced by modern parallel tools. CASC GKK 35 B.9. What will be the configuration issues for be portable and high-performance? Lots. Lack

of Configuration, Packaging, & Deployment tools is the #1 Achilles heel for components is the #1 day-to-day pain in Babel development #1 cause for failure in regression tests CASC GKK 36 C.1. Will anyone actually make the effort to componentize their applications software? Yes. But it will be messy. Efforts to Babelize at LLNL: hypre - want OOP in ANSI C & automatic F77 bindings

ALPS - want scripting interface for laser plasma physics SAMRAI - framework used in ALPS CASC GKK 37 D.4. Should components be viewed as mostly a library/runtime developer technology? No. I used components in this PowerPoint Presentation Users can use components without knowing theyre using them. CASC This is harder to achieve in UNIX than other platforms GKK 38 UCRL-PRES-144649 23 Jul 2001

Work performed under the auspices of the U. S. Department of Energy by the University of California, Lawrence Livermore National Laboratory under Contract W-7405-Eng-48 CASC GKK 39

Recently Viewed Presentations

  • Get to 50 - Spelling Homework - Humble Independent School ...

    Get to 50 - Spelling Homework - Humble Independent School ...

    Get to 50 Spelling Homework Choice Menu Social Studies Uses the "History Alive" program Focuses on American History and US Geography Projects/Events Activity Fund Things to do Sign up for 'green' Eagle Eye - computers in 501, 503, 505 or...
  • Causes of Evolution

    Causes of Evolution

    Grade 4: Describe the theory of evolution by natural selection as a process by which living things have evolved from simple life forms. Know that a mutation is a change in the DNA code. Grade 6: Describe the steps that...
  • Condensation - U Wyoming Atmospheric Science

    Condensation - U Wyoming Atmospheric Science

    next topic: adiabatic processes and stability hazard of supercooled cloud droplets … clear ice rime ice Contrails and cloudiness Biomass burning: Oct. 94 - Mar. 95 Imagine drier air (Td = -5ºC) Graphical cloud height estimation (aerological diagram) Imagine more...
  • The United States Marine Corps Americas Expeditionary Force

    The United States Marine Corps Americas Expeditionary Force

    - Will provide unparalleled lift capability under high temperature and high altitude in austere conditions like Afghanistan. - Only shipboard-compatible aircraft that can transport 100% of the Marine Corps' equipment from amphibious shipping to inland objectives. - The first test...
  • From Big to Meta Data - Commons

    From Big to Meta Data - Commons

    From Big to Meta Dataor conversely (How) is Data complexity/level-up to Metadata achievable ... - since incommensurable, such as the meaning, renormalization, life.. ... They may cascade down the terms to measurement hierarchies to end with the basic MKS grammar...
  • In the BeginningBringing the Book of Genesis to Light(an ...

    In the BeginningBringing the Book of Genesis to Light(an ...

    Genesis as compilation of earlier, separate sources. Differing, Irreconcilable (from literal perspective) Accounts . First account is the one with which we are most familiar and is most often cited by "literalists" ...
  • Life under the Indian Act: -

    Life under the Indian Act: -

    Indian Act of 1876. A consolidation of all the aboriginal laws. Main goal: assimilation! = eliminate the "Indian Problem". Gov't working under the idea that they had to look out for Aboriginals best interest (protecting them from whiskey traders and...
  • Conflicts of Interest Training State Ethics Commission

    Conflicts of Interest Training State Ethics Commission

    Maryland Municipal League Fall ConferenceMaryland's Revised Ethics LawOctober 18, 2013. Legislative Origins. ... Modification to the requirements of the Public Ethics Law for local ethics laws adopted by counties, municipalities, and boards of education .