1 / 37

Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith

Achieving Language Interoperability with. Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith. Babel’s Scope & CCA. Babel provides language interoperability, not components. We collaborate with CCA to add parallel distributed support

valiant
Download Presentation

Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Achieving Language Interoperability with Gary Kumfert withBill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith

  2. Babel’s Scope & CCA • Babel provides language interoperability, not components. • We collaborate with CCA to add parallel distributed support • We also provide tools (Quorum & Alexandria) to facilitate component development and deployment CCA Compliant Frameworks Component Semantics Compilers &Linkers Operating System

  3. Release Announcement • C, C++, F77, Python(client) BETA 0.5

  4. babel-0.5.0.tar.gz • Babel code generator • written in Java • Babel runtime library • written in ANSI C • Docs (minimal) • papers, talks, javadoc html • babel101 tutorial

  5. Hand Coded Language Interoperability JNI Native SWIG Platform Dependent f77 f90 C C++ Python Java

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

  7. Soon!!! Babel Enabled Language Interoperability What’s In This Release: f77 f90 C C++ Python Java

  8. Have a code Want to increase their user base Will learn SIDL Want Babel general and powerful Have a problem Want to solve their problem May never see SIDL Want software that’s easy & trustworthy Developers Users Babel Has Two Types of Customers

  9. Babel’s Design Priorities • Performance • Developer/User dichotomy • What’s natural for each language? • Could expose C array structs in C++ • C++ style would be SIDL::array<T> template <> array<item_t> : public array_mixin < array_t, item_t, item_cxx_wrapper_t> { }

  10. Builds on Industry IDL technology CORBA COM Designed for Scientific Apps complex types dynamic multidimensional arrays SIDL (Scientific Interface Definition Language) version Hello 1.0; package Hello { class World { string getMsg(); } }

  11. 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<dcomplex,2> a ); } }

  12. SIDL IOR Scientific Interface Definition Language Internal Object Representation XML eXtensible Markup Language Many forms of language interoperable interfaces Compiler Compatible Human Compatible Web Compatible

  13. ...automated creation via higher-level tools ...Type Descriptions on Shared Repositories CCAScript ...automated search & discovery by advanced builders ...Browsing for Types XML enables...

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

  15. Stubs IORs Skels Language Interoperability: How Babel Makes it Work • Application: user’s LOP(Language Of Preference) • Implementation: developers LOP (Can be wrappers to legacy code) Application • Client Side Stubs: user’s LOP to C • Internal Object Representation (IOR): Always in C • Server Side Skeletons: translates IOR (in C) to developer’s LOP Impls

  16. How Much Language Interoperability Have We Achieved? • Modes • in • out • inout • return value • Basic Types • bool • char • int • long • float • double • fcomplex • dcomplex • string • opaque • Extended Types • Objects • enumerations • arrays of basic types • arrays of objects • (arrays are multidimensional, no arrays of arrays) • OO Method Dispatch • regular • final • static • interfaces • classes • Exception Handling • For All Combinations of Languages • C C • C++ C++ • F77 F77 • Python • 1431 test cases (and counting)

  17. Language Interoperability Developer Concerns: Configuration, Packaging, & Deployment User Concerns: Installation Trust What we foresee, based on experience with our tests...

  18. These aren’t new problems...But they are on a larger scale Developer Concerns: Configuration, Packaging, & Deployment User Concerns: Installation Trust

  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

  20. GNU Make Autoconf configuration Automake build Makefiles Libtool shared libraries CUTE custom testing python’s own build system java’s built-in (broken) make helper scripts fixes to autoconf, automake & libtool lots of hacks Babel’s Configuration/Build

  21. Test History sparc-sun-solaris2.7-gcc babel 0.5.x babel 0.4.x Configure/Build/Repository faults, not software failures!!! IOR Rewrite # Test Cases Date

  22. 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

  23. C++ F77 Python Java Crux of the problem • We’re building 21st century technology... • ... using 30 year old tools. C Autoheader libtool (perl/sh) aclocal Automake (perl) Autoconf (M4) Make Bourne shell

  24. 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

  25. In the mean time... • Babel works on other platforms, just not automated config/testing • Java code generator (precompiled) • ANSI C runtime library (no problem) • Babel’s tests are (necessarily) pathological worst-case examples • We didn’t create these problems, we just exercise them aggressively

  26. 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

  27. Line Protocol Stubs Unmarshaler IORs IORs Marshaler Skels Line Protocol Farther Future Babel:Will Do Distributed Computing Application Internet Impls

  28. 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 • is still very hard • has broken every tool we use

  29. TheEnd babel-announce@llnl.gov babel-users@llnl.gov http://www.llnl.gov/CASC/components components@llnl.gov Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, Gary Kumfert, & Steve Smith

  30. A.3. Can HPC and Component Technology REALISTICALLY be integrated? • Yes. • But HPC Components have huge (and unique) hurdles: • Diverse Architectures • Diverse OS’s • Integration of SPMD and Dist. Comp. • Archaic Pkg/Devel/Config/Build tools • Non-CS trained (or interested) users

  31. B.3. Can the HPC community really afford yet another compiler such as Babel? • Is language interoperability important? • How important?

  32. 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?

  33. B.5. What is the role of traditional (parallel) tools in component technology? • Hopefully, they’re replaced by modern parallel tools.

  34. B.9. What will be the configuration issues for components...to 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

  35. 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

  36. 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 they’re using them. • This is harder to achieve in UNIX than other platforms

  37. 23 Jul 2001 UCRL-PRES-144649 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

More Related