High-Performance Component- Based Scientific Software Engineering Boyana Norris Argonne National Laboratory CSDMS Meeting:

Slides:



Advertisements
Similar presentations
Technology Drivers Traditional HPC application drivers – OS noise, resource monitoring and management, memory footprint – Complexity of resources to be.
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 2.
Current Progress on the CCA Groundwater Modeling Framework Bruce Palmer, Yilin Fang, Vidhya Gurumoorthi, Computational Sciences and Mathematics Division.
GridRPC Sources / Credits: IRISA/IFSIC IRISA/INRIA Thierry Priol et. al papers.
Cracow Grid Workshop, November 5-6, 2001 Towards the CrossGrid Architecture Marian Bubak, Marek Garbacz, Maciej Malawski, and Katarzyna Zając.
Distributed Systems Architectures
DCS Architecture Bob Krzaczek. Key Design Requirement Distilled from the DCS Mission statement and the results of the Conceptual Design Review (June 1999):
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
TerascaleSimulation Tools and Technologies Tutorial: Presenter Institution.
Jun Peng Stanford University – Department of Civil and Environmental Engineering Nov 17, 2000 DISSERTATION PROPOSAL A Software Framework for Collaborative.
Building software from reusable components.
1 FM Overview of Adaptation. 2 FM RAPIDware: Component-Based Design of Adaptive and Dependable Middleware Project Investigators: Philip McKinley, Kurt.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Iterative computation is a kernel function to many data mining and data analysis algorithms. Missing in current MapReduce frameworks is collective communication,
Center for Component Technology for Terascale Simulation Software (aka Common Component Architecture) (aka CCA) Rob Armstrong & the CCA Working Group Sandia.
Challenges in Performance Evaluation and Improvement of Scientific Codes Boyana Norris Argonne National Laboratory Ivana.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
An Automated Component-Based Performance Experiment and Modeling Environment Van Bui, Boyana Norris, Lois Curfman McInnes, and Li Li Argonne National Laboratory,
Center for Component Technology for Terascale Simulation Software 122 June 2002Workshop on Performance Optimization via High Level Languages and Libraries.
Quality Assurance for Component- Based Software Development Cai Xia (Mphil Term1) Supervisor: Prof. Michael R. Lyu 5 May, 2000.
1 TOPS Solver Components Language-independent software components for the scalable solution of large linear and nonlinear algebraic systems arising from.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 19 Slide 1 Component-based software engineering 1.
CQoS Update Li Li, Boyana Norris, Lois Curfman McInnes Argonne National Laboratory Kevin Huck University of Oregon.
Component Infrastructure of CQoS and Its Application in Scientific Computations Li Li 1, Boyana Norris 1, Lois Curfman McInnes 1, Kevin Huck 2, Joseph.
An Introduction to Software Architecture
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
1 Using the PETSc Parallel Software library in Developing MPP Software for Calculating Exact Cumulative Reaction Probabilities for Large Systems (M. Minkoff.
CCA Common Component Architecture CCA Forum Tutorial Working Group Components for Scientific.
CcaEcloud Phase I Wrap-up Phase I Doe SBIR Stefan Muszala, PI DOE Grant No DE-FG02-08ER85152 Tech-X Corporation Boulder, CO Updates: onRamp, FACETS+Babel,
EMI INFSO-RI SA2 - Quality Assurance Alberto Aimar (CERN) SA2 Leader EMI First EC Review 22 June 2011, Brussels.
A Component Infrastructure for Performance and Power Modeling of Parallel Scientific Applications Boyana Norris Argonne National Laboratory Van Bui, Lois.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
SIAM Computational Science and Engineering1 10 February Components for Scientific Computing: An Introduction David E. Bernholdt Computer Science.
4.2.1 Programming Models Technology drivers – Node count, scale of parallelism within the node – Heterogeneity – Complex memory hierarchies – Failure rates.
Tech-X Corporation for CCA Overview Tech-X Corporation is an entrepreneurial and dynamic enterprise committed to scientific and technical excellence and.
Plans and Opportunities Involving Beam Dynamics Components ComPASS SAP Project and Phase I and II Doe SBIR Boyana Norris (ANL) In collaboration with Stefan.
Grid Computing Research Lab SUNY Binghamton 1 XCAT-C++: A High Performance Distributed CCA Framework Madhu Govindaraju.
Components for Beam Dynamics Douglas R. Dechow, Tech-X Lois Curfman McInnes, ANL Boyana Norris, ANL With thanks to the Common Component Architecture (CCA)
“DECISION” PROJECT “DECISION” PROJECT INTEGRATION PLATFORM CORBA PROTOTYPE CAST J. BLACHON & NGUYEN G.T. INRIA Rhône-Alpes June 10th, 1999.
Building an Electron Cloud Simulation using Bocca, Synergia2, TxPhysics and Tau Performance Tools Phase I Doe SBIR Stefan Muszala, PI DOE Grant No DE-FG02-08ER85152.
SAP Participants: Douglas Dechow, Tech-X Corporation Lois Curfman McInnes, Boyana Norris, ANL Physics Collaborators: James Amundson, Panagiotis Spentzouris,
Issues in (Financial) High Performance Computing John Darlington Director Imperial College Internet Centre Fast Financial Algorithms and Computing 4th.
Middleware for FIs Apeego House 4B, Tardeo Rd. Mumbai Tel: Fax:
Strategies for Solving Large-Scale Optimization Problems Judith Hill Sandia National Laboratories October 23, 2007 Modeling and High-Performance Computing.
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.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
Presented by An Overview of the Common Component Architecture (CCA) The CCA Forum and the Center for Technology for Advanced Scientific Component Software.
NA-MIC National Alliance for Medical Image Computing UCSD: Engineering Core 2 Portal and Grid Infrastructure.
Presented by Scientific Annotation Middleware Software infrastructure to support rich scientific records and the processes that produce them Jens Schwidder.
1 1 What does Performance Across the Software Stack mean?  High level view: Providing performance for physics simulations meaningful to applications 
GRID Overview Internet2 Member Meeting Spring 2003 Sandra Redman Information Technology and Systems Center and Information Technology Research Center National.
CCA Common Component Architecture CCA Forum Tutorial Working Group CCA Status and Plans.
Distributed Components for Integrating Large- Scale High Performance Computing Applications Nanbor Wang, Roopa Pundaleeka and Johan Carlsson
ProActive components and legacy code Matthieu MOREL.
Progress on Component-Based Subsurface Simulation I: Smooth Particle Hydrodynamics Bruce Palmer Pacific Northwest National Laboratory Richland, WA.
Engr 691 Special Topics in Engineering Science Software Architecture Spring Semester 2004 Lecture Notes.
C OMPUTATIONAL R ESEARCH D IVISION 1 Defining Software Requirements for Scientific Computing Phillip Colella Applied Numerical Algorithms Group Lawrence.
Toward a Distributed and Parallel High Performance Computing Environment Johan Carlsson and Nanbor Wang Tech-X Corporation Boulder,
Quality of Service for Numerical Components Lori Freitag Diachin, Paul Hovland, Kate Keahey, Lois McInnes, Boyana Norris, Padma Raghavan.
Ganga/Dirac Data Management meeting October 2003 Gennady Kuznetsov Production Manager Tools and Ganga (New Architecture)
1/30/2003 Los Alamos National Laboratory1 A Migration Framework for Legacy Scientific Applications  Current tendency: monolithic architectures large,
Enabling Adaptive Algorithms through Component-Based Software Engineering Boyana Norris Argonne National Laboratory RWTH.
Towards a High Performance Extensible Grid Architecture Klaus Krauter Muthucumaru Maheswaran {krauter,
Boyana Norris Argonne National Laboratory Ivana Veljkovic
Distribution and components
Component-Based Software Engineering: Technologies, Development Frameworks, and Quality Assurance Schemes X. Cai, M. R. Lyu, K.F. Wong, R. Ko.
Presentation transcript:

High-Performance Component- Based Scientific Software Engineering Boyana Norris Argonne National Laboratory CSDMS Meeting: “Modeling for Environmental Change” October 15, 2010

Acknowledgments  Common Component Architecture Forum  CSDMS  DOE Office of Science 2

3 What are components?  No universally accepted definition in CS; some features:  A unit of software development/deployment/reuse –i.e., has interesting functionality –Ideally, functionality someone else might be able to (re)use –Can be developed independently of other components  Interacts with the outside world only through well-defined interfaces –Implementation is opaque to the outside world  Requires a managed execution environment; can be composed with other components dynamically –“Plug and play” model to build applications –Composition based on interfaces

4 What is a component architecture?  A set of standards that allows: –Multiple groups to write units of software (components)… –And have confidence that their components will work with other components written in the same architecture  These standards define… –The rights and responsibilities of a component –How components express their interfaces –The environment in which components are composed to form an application and executed (framework) –The rights and responsibilities of the framework

Object-oriented vs component-oriented development  Components can be implemented using OO techniques  Component-oriented development can be viewed as augmenting OOD with certain policies, e.g., require that certain abstract interfaces be implemented  Components, once compiled, may require a special execution environment  COD focuses on higher levels of abstraction, not particular to a specific OO language –abstract (common) interfaces –dynamic composability –language interoperability  Can convert from OO to CO specific to a given framework, possibly with some level of automation 5

6 What is the CCA?  Component-based software engineering has been developed in other areas of computing –Especially business and internet –Examples: CORBA Component Model, COM, Enterprise JavaBeans  Many of the needs are similar to those in HPC scientific computing but scientific computing imposes special requirements not common elsewhere  CCA is a component environment specially designed to meet the needs of HPC scientific computing –The CCA Forum (open to all) was formed in 1999 –Has been supported through multiple DOE projects since 2000

7 Special needs of scientific HPC  Support for legacy software –How much change required for component environment?  Performance is important –What overheads are imposed by the component environment?  Both parallel and distributed computing are important –What approaches does the component model support? –What constraints are imposed? –What are the performance costs?  Support for languages, data types, and platforms –Fortran? –Complex numbers? Arrays? (as first-class objects) –Is it available on my parallel computer?

Some examples  Different component granularity  Few vs many interfaces 8

CSDMS interfaces 9  2009 CSDMS Annual Report

CSDMS Framework 10

CSDMS Integrated Component Simulation 11

12 SPH Groundwater Modeling Framework  Bruce Palmer, PNNL

SWIM: Integrated Plasma Simulation Framework 13 A flexible, extensible computational framework capable of coupling state-of-the-art models for energy and particle sources, transport, and stability for tokamak core plasma. -Don Batchelor et al. CCA implementation File-based communication between components

SWIM: Integrated Plasma Simulation Framework Component Interface 14

Accelerator Simulations 15  Source: Tech-X Corporation  Beam dynamics (e.g., Synergia2) and cloud generation (e.g., TxPhysics) codes are often written in different programming languages  Timescales of particles in beam dynamics involve movement over km (10^5 cm) while those of cloud generation involve movement over cm

Benefits of Component-Based Software Development  Software evolution and maintainability  Encourage (force?) people to reach agreements in order to define interfaces  Enable independent development  Plug-and-play application composition 16

The Dark Side  Identifying components and designing clean interfaces is harder than writing less modular code  Components require extra code  Multiple abstraction layers add extra runtime overhead  Complications of interoperability –Different grids, boundary conditions, etc. 17

On the Bright Side  Better code reuse including outside a project –Less software to develop from scratch –Ability to leverage expert knowledge/division of labor  Huge potential for usability-enhancing automation –Development processes (software creation, modification, builds, testing) –Code generation –Link- and run-time optimizations  Community-specific frameworks that make component development highly productive  Language interoperability 18

19 Language interoperability with Babel  Programming language-neutral interface descriptions  Native support for basic scientific data types –Complex numbers –Multi-dimensional, multi-strided arrays  Automatic object-oriented wrapper generation C C++ f77 f90 Python Java vs. C C++ f77 f90 Python Java Babel

20 Babel Generates object-oriented language interoperability middleware IOR = Intermediate Object Representation comp.sidl Babel Compiler Skeletons Implementations IORs Stubs libcomp.so SIDL = Scientific Interface Definition Language 1.Write your SIDL file to define public methods 2.Generate server side in your native language using Babel 3.Edit Implementations as appropriate 4.Compile and link into library/DLL Babel Runtime user creates

21 Clients in any supported language can access components in any other language IOR = Intermediate Object Representation Skeletons Implementations IORs Component (any supported language) C Stubs C++ Stubs F77 Stubs F90 Stubs Java Stubs Python Stubs

An example of usability improvement: Managing projects with Bocca  The interoperability, connectivity, and modularity of components is independent of their function.  Bocca creates and manages a graph representation of interface and component dependencies, which is used to –Generate the build system –Generate the “glue” code for language interoperability –Generate component metadata –Generate tests

Bocca command-line example  Create some components with ports:  From the CCA perspective these are fully functional components (no implementation however):

Adapt component applications  Leverage the fact that components are plug-and-play  Automate the configuration and runtime adaptation of high-performance component applications, through the so called Computational Quality of Service (CQoS) infrastructure –Instrumentation of component interfaces –Performance data gathering –Performance analysis –Adaptive algorithm support 24

Major events in a component’s lifetime 25 Dynamic Library Loading Instantiation Configuration Execution Destruction Port Connections (Port Configuration) Port Connections (Port Configuration) Potential for automation and adaptivity

Example: Multimethod linear solver components in nonlinear PDE solution 26 Nonlinear Solver Mesh Linear Solver Adaptive Heuristic Performance Monitor MeshCheckpointingPhysics Linear Solver A Nonlinear Solver Linear Solver B Linear Solver C Example adaptive strategies based on:  CFL number  Rate of nonlinear convergence  Known phases  Matrix properties

Example 1: 2D Driven Cavity Flow 1 27  Driven cavity flow, which combines lid-driven flow and buoyancy-driven flow in a two- dimensional rectangular cavity. We use a velocity=vorticity formulation of the Navier-Stokes and energy equations, discretized on a uniform Cartesian mesh. 1 T. S. Coffey, C.T. Kelley, and D.E. Keyes. Pseudo-transient continuation and differential algebraic equations. SIAM J. Sci. Comp, 25:553–569, 2003.

Example 2: PETSc-FUN3D  3D compressible Euler (used in this work; also supports incompressible Navier- Stokes)  Fully implicit, steady-state  Developed by D. Kaushik et al. (ANL)  Based on FUN3D (developed by W.K. Anderson, NASA Langley) –Tetrahedral, vertex-centered unstructured mesh –Discretization: 1 st or 2 nd order Roe for convection and Galerkin for diffusion  Pseudo-transient continuation –backward Euler for nonlinear continuation toward steady-state solution –Switched Evolution/relaxation (SER) approach of Van Leer and Mulder 28 Newton-Krylov nonlinear solver –Matrix-Free (2 nd order FD) –Preconditioner (1 st order analytical) Won Gordon Bell prize at SC99; ongoing enhancements and performance tuning

Adaptive linear solver components 29

Example 2: FUN3D Adapt1: (1) 1 st order: BCGS / BJacobi with ILU(0) (25) 1 st order: FGMRES(30) / BJacobi with ILU(0) (28) 2 nd order: BCGS / Bjacobi with ILU(0) (66) 2 nd order: FGMRES(30) / BJacobi with ILU(0) (80) 2 nd order: FGMRES(30) / BJacobi with ILU(1) Adapt2: (1) 1 st order: GMRES(30) / Bjacobi with SOR (2) 1 st order: BCGS / BJacobi with ILU(0) (25) 1 st order: FGMRES(30) / BJacobi with ILU(0) (28) 2 nd order: BCGS / Bjacobi with ILU(0) (66) 2 nd order: FGMRES(30) / BJacobi with ILU(0) (80) 2 nd order: FGMRES(30) / BJacobi with ILU(1) base methodsadaptive Cumulative time (seconds) Nonlinear Iteration Number Linear solution time per nonlinear iteration

Example 2: FUN3D (cont.)  Comparison of traditional fixed linear solvers and an adaptive scheme, which uses a different preconditioner during each of the phases of the pseudo-transient Newton-Krylov algorithm  MCS Jazz cluster (2.4 GHz Pentium Xeon with 1 or 2 GB RAM), 4 nodes  Adaptive methods provide reliable and robust solution and reduced the number of nonlinear iterations and overall time to solution. 31 Convergence rates of base and adaptive methods Cumulative time (seconds)Nonlinear iterations Adapt1: (1) 1 st order: BCGS / BJacobi with ILU(0) (25) 1 st order: FGMRES(30) / BJacobi with ILU(0) (28) 2 nd order: BCGS / Bjacobi with ILU(0) (66) 2 nd order: FGMRES(30) / BJacobi with ILU(0) (80) 2 nd order: FGMRES(30) / BJacobi with ILU(1) Adapt2: (1) 1 st order: GMRES(30) / Bjacobi with SOR (2) 1 st order: BCGS / BJacobi with ILU(0) (25) 1 st order: FGMRES(30) / BJacobi with ILU(0) (28) 2 nd order: BCGS / Bjacobi with ILU(0) (66) 2 nd order: FGMRES(30) / BJacobi with ILU(0) (80) 2 nd order: FGMRES(30) / BJacobi with ILU(1)

Example 3: Radiation Transport  Based on Mousseau, Knoll, and Rider (LA-UR )  Govern the evolution of photon radiation in an optically thick medium  Derived by integrating over all energy frequencies, assuming –Isotropy (angle dependence averaged out) –Small mean-free photon paths  Very important in the simulation of forest fires, inertial confinement fusion ( astrophysical phenomenahttp://fusion.gat.com/icf 32 At t = 1At t = 3

Example 3: Radiation Transport 33 GMRES(30)/ SOR BCGS / ILU(1) FGMRES(30)/ ILU(1) BCGS / ILU(1)

Future directions  Many possibilities for usability enhancements  More automation –Component creation from existing code –CQoS  Community contributions 34

Summary  If defined and used properly, components are a powerful software development approach that enable diverse codes and developers collaborate effectively –50% social interaction + 30% discipline + 20% code development 35