developments in the common component architecture for
TRANSCRIPT
• CCA• Common Component Architecture
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company,for the United States Department of Energy’s National Nuclear Security Administration
under contract DE-AC04-94AL85000.
Developments in the Common Component Architecture
for Scientific Software
Benjamin A. AllanCCA Forum
April 9, 2007
• CCA• Common Component Architecture
Overview
• Scalability in scientific software & components• Introduce CCA• Show applications and tools• The CCA specification
– Current state.– Items we expect for CCA 1.0.
• Community development• What could you do with CCA?
• CCA• Common Component Architecture
Human Minds Do Not Scale Well
Date
Softw
are
Com
plex
ity(#
lin
es 1
pro
gram
mer
can
man
age)
102
103
104
105
106
10719
45
1955
1965
1975
1985
1995
2005
101
100
10-1
10-2
Assemblers
Compilers
Structured Programming
Object-Oriented
Components
Practical high bound
108
We write imperfect
software
…but we must write more of it.
• CCA• Common Component Architecture
In Industry, Most Corporate Software is Component Software
Date
Softw
are
Com
plex
ity (#
line
s)
102
103
104
105
106
10719
45
1955
1965
1975
1985
1995
2005
101
100
10-1
10-2
Components
108
Components are for when complexity exceeds the power of a single human mind
Loose coupling and robust interfaces are more effective, including within single teams
Object-Oriented1980’s Object-oriented failed:1. Assumes a single language2. Implementation details
pollute the interfaces
1980’s Object-oriented failed:1. Assumes a single language2. Implementation details
pollute the interfaces
Components provide1. Code generation (stronger
interfaces & multiple languages)2. Additional runtime services to
support dynamic & loose coupling
Components provide1. Code generation (stronger
interfaces & multiple languages)2. Additional runtime services to
support dynamic & loose coupling
• CCA• Common Component Architecture
What is a component?
Interface definition language(IDL)
Fortran, C, C++,Java, Python Private code and data
Public interface(functions only)
Framework plug-in
• CCA• Common Component Architecture
What is a framework?
• A simple manager of component connections, &• A set of components specific to the application.
• CCA• Common Component Architecture
Code Reuse is NOT the Reason for Components
• Science and Research – Maintain correctness during many changes
• New students• New algorithms• New applications
• Corporate or for profit organization– Time to Market
Components provide strong interface boundaries & loose coupling (libraries do not).
• CCA• Common Component Architecture
Who and What is CCA?Our Goal:To provide an open forum defining multi-institutional, multi-disciplinary component architecture standards and tools enabling complex, maintainable, ultra-scale simulations through modern software practices and tools. Promote and support development of domain-specific common interfaces.
Approach: Multi-laboratory teams combine independent plug-&-play codes to create scalably engineered simulation systems.
Impact: Used in the USA and internationally for new science by scientists and educators in combustion, quantum chemistry, fusion, climate, astrophysics, fission reactor simulation, performance modeling & advanced solvers.
Institutions: ANL, JPL, LANL, LBNL, LLNL, NASA/Goddard,ORNL, PNNL, SUNY,Indiana U, U. Oregon,U. Utah,U. Illinois, Tech-X, …
• CCA• Common Component Architecture
What is most important about CCA?
Answer: Removing simulation code barriers in:– Programming languages– Hardware platforms– Organizations– Disciplines– Space– Time
• CCA• Common Component Architecture
Technically, what is CCA?
Common Component Architecture:
– Is Component-Based Software Engineering for HPC.
– Is specifications with neutrality in vendor, programming language, platform, network transport, and application.
– Avoids requirements that limit performance or shorten software life.
• CCA• Common Component Architecture
Distinctive technical features of CCA
• True object-oriented programming in FORTRAN or C.• Any-to-Any inter-language calling through SIDL. {C,
C++, Fortran[77,90,03], Java, Python}• Full support for multi-dimensional arrays in all
programming languages.• Remote method calls in all languages.• Light-weight frameworks.• Support for high performance platforms and Linux.
• CCA• Common Component Architecture
Any-to-any language binding
• Instead of pair-wise solutions:
• Write one wrapper to your library in the library’s language, and Babel does the other wrappers.
• Eliminates errors in and maintenance of language wrappers.
C++
f90
Python
C
f77
Java
C
C++
f77
f90
PythonJava
• CCA• Common Component Architecture
Remote method calls
• Calls between independent MPI jobs.– Example of sub-domain coupling later on.
• Calls between sensors and evolving simulations.
Cluster Sensor network
• CCA• Common Component Architecture
Where are CCA tools used?
Examples include:
• Quantum chemistry• Combustion• Material aging• Fission reactor simulation• Fusion processes• Performance measurement• More …
• CCA• Common Component Architecture
Example: Team of teams
PetSC
TAO
Python, C, C++, FORTRAN
MPI, ARMCI
Quantum chemistry optimization
• CCA• Common Component Architecture
Example: Performance profiling with a proxy Component
2Component
1
Component1
Component2
Proxy for Component
2
MasterMind TAU
Correlate function arguments and function costs-develop cost models and predict performance
• CCA• Common Component Architecture
Ex. Continued: Profiling Combustion
Automatically make proxy components with the
Tau profiling tools
• CCA• Common Component Architecture
Example: Multiscale vs Continuum Strain for Shock Wave on Metal Cylinder
Courtesy, Nathan Barton,LLNL.
Continuum OnlyMultiscale
• CCA• Common Component Architecture1 2 3 4 5 8760 9 n10ProcessorID
Fine Scale Response Compute Nodes
Ale3d
ResponseMaster
PSI Controller
PSI Daemons
The Petascale computer as collection of SPMD jobs (RMI+MPI)
= Process
= MPI_COMM_WORLD
= Babel RMI
Not shown: All processes can call Controller & Controller has a table of all MPI rank 0 processes.
Coupler
PSI Daemons
AdaptiveSampler
High-D Data Cache
• CCA• Common Component Architecture
What tools are available?
• SIDL and Babel• Portable parallel framework• Graphic application builder• Eclipse code editing and generator plug-ins• Scriptable tools (without graphic interface)
• CCA• Common Component Architecture
Automation features (a sampling)
• Eclipse:– SIDL/Babel plug-in for editing and building with Babel.– Generate SIDL and wrapper code by parsing C, C++,
FORTRAN, or Java.– Help for defining new components and interfaces.
• Command line (bocca):– Create custom stand-alone main programs from
components and scripts, making the framework just another library.
• CCA• Common Component Architecture
The CCA specification for HPC is:
• A standard component plug-in interface.– 1 function is required.– Components self-describe at run-time, optionally during
build time, to support the Uses-Provides pattern.• A source of interfaces for very basic services.
– Defining application interfaces is for domain experts.• Scalable (no communications required)• Written in Scientific IDL middleware (SIDL).
• CCA• Common Component Architecture
Basic services provided
• GoPort for starting a computation.• ParameterPort for run-time tuning.• Builder Service to create and manage peer
components in the same frame.• AbstractFramework containers to hold component
sub-sets.
• CCA• Common Component Architecture
Optional services provided
• MPI communicator access.• Performance data collection and logging.
• CCA• Common Component Architecture
What else is coming to CCA?
• More standard interfaces• More tools• More teams using CCA
• CCA• Common Component Architecture
Developing interface standards
• Parallel coupling interfaces.• Load balancing.• Workflow management (Kepler integration).• Quality of service management.• GUIBuilder service.
• CCA• Common Component Architecture
Developing tools (not yet public)
• C-only and FORTRAN-only frameworks (CCA-Lite).• Command line integrated development
environment (IDE) and portable build system • More Eclipse features.• High-performance communications layers for Babel
RMI.• CORBA communication layer for Babel RMI.• Wide-area network frameworks using Web
Services.
• CCA• Common Component Architecture
Developing teams
• Multi-institution software testing (each night building, testing, and reporting).
• TASCS project to provide infrastructure.• ITAPS project defining interfaces for parallel
unstructured mesh interconnections.• CSWIM (fusion simulation) coupling
magnetohydrodynamics, RF heating (ITER related).• TOPS, TAO solvers (linear, nonlinear, optimization)• Quantum chemistry, SAMR grids, many other areas.
• CCA• Common Component Architecture
What can you do with CCA and SIDL/Babel?
• Build loosely or strongly coupled applications that are more easily maintained and extended
• Write the main application in F90 (or any language you like)
• Call sub-applications remotely or in the same process• Call directly from F90 to C/C++/Python/Java without
writing any inter-language code manually• Donate improvements (all CCA tools are open-
source)
• CCA• Common Component Architecture
What we cannot do with CCA & Babel (today)
• Run on vector machines and in operating systems where the software has not been ported.– We port for anyone who donates test time and accounts.
• Develop in MS Windows– Windows is not critical to most US/DOE applications. – Adding Windows support requires a driving customer but is
technically simple. We accept Windows code donations.• Write your application main in Ruby or Matlab.
– Ruby should be easy to add.– Which Matlab version?
• Quad precision data outside Fortran.
• CCA• Common Component Architecture
The End
www.cca-forum.org/specification
www.cca-forum.org/tutorial
www.llnl.gov/casc/components/babel.html
Please join the fun:
https://www.cca-forum.org/wiki
• CCA• Common Component Architecture
On F90 from the ACTS 2006 CCA Tutorial1
Example Simple Numeric Integration Rule Component file:///C:/Documents%20and%20Settings/Administrator/Desktop/guide-html-
0.4.1_rc1/ch04s05.html#task2:integrator-mod
Object-oriented F90 Features:Private data for classes and class instances.Calling python/c/c++ subroutines just as F90 subroutines.Exception handling.Inheritance from other classes and even languages.
1) Chapter 4, section 5 http://www.cca-forum.org/download/tutorial/guide-html-0.4.1_rc1/ch04s05.html