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] http://www.llnl.gov/CASC/components [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 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 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

  • After carefully considering the visual argument below, write

    After carefully considering the visual argument below, write

    What is a Specific Thesis? General: Marijuana should be legalized in the United States. Marijuana should remain a banned substance. Specific: Marijuana's prohibition is costing the U.S. billions of dollars in incarcerations, and therefore, should become a regulated substance like...
  • PARTITION and More - Northern Arizona University

    PARTITION and More - Northern Arizona University

    Or were they simply the repositories of honor, the markers of community, who could be abducted, raped, mutilated to mark victory over the other? India and Pakistan signed the Inter-Dominion Treaty on December 6, 1947 for recovering as many abducted...
  • A personal health care plan thats centered on

    A personal health care plan thats centered on

    Home Infusion Bundled Services . Home Infusion Supplies and Administration and Medicare Part D Home Infusion Drugs . Home Maintenance Services . Home Visits by Medical Personnel . Immunizations . Independent Living Skills and Training . Inpatient Hospital Care (including...
  • Oncology Clinical Trials Sylvia ONeill, MD Executive Director

    Oncology Clinical Trials Sylvia ONeill, MD Executive Director

    Karen Knudsen, PhD SKCC Director. William Kevin Kelly, DO . Associate Director of Clinical Research. Early Drug Development Office. Sr. Director Barbara ... Reports to Dr. Kelly, AD Clinical Research. Data and Safety Monitoring Committee (DSMC)
  • Mastication and Deglutition - Augustana University

    Mastication and Deglutition - Augustana University

    Arial Calibri Default Design Physiology of Mastication and Deglutition Chapter 8 Mastication & Deglutition Stages of Deglutition Stages of Duglutition Deglutition Rooting & Sucking Root & Suck Reflex Other Reflexes Adult vs. Child Infant vs. Adult Videoflouroscopy Stages of Duglutition...
  • Il medioevo - Appunti del prof. Armando

    Il medioevo - Appunti del prof. Armando

    Il medioevo introduzione La periodizzazione classica fa durare il medioevo più di mille anni, il che, francamente, pare un po' eccessivo: sarebbe come dire che noi e i feudatari dell'anno mille apparteniamo alla stessa epoca storica!
  • ภาพนิ่ง 1 - University of Phayao

    ภาพนิ่ง 1 - University of Phayao

    Greenwichเป็นเมืองเล็กๆอยู่ตรงฝั่งตะวันออกเฉียงใต้ของลอนดอน เป็นเมืองที่มีชื่อเสียง เทคโนโลยีเรื่อง " การเดินเรือ "เริ่มต้นที่นี่เมื่อในอดีต ...
  • Mining Text Data: An Introduction Data Mining /

    Mining Text Data: An Introduction Data Mining /

    (hyponym=isa/subset, maple is a tree -> maple is a hyponym of tree) (meronym=hasa, tree has a leaf -> leaf is a meronym of tree) As will see, this is useful throughout NLP/ShallowLinguistics. This encodes some of the lexicon that humans...