1 ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.

Slides:



Advertisements
Similar presentations
Yi Heng Second Order Differentiation Bommerholz – Summer School 2006.
Advertisements

A Discrete Adjoint-Based Approach for Optimization Problems on 3D Unstructured Meshes Dimitri J. Mavriplis Department of Mechanical Engineering University.
Page 1 APP + Trilinos Integration Status, Opportunities, and Challenges Roscoe A. Bartlett Department of Optimization.
1 Approved for unlimited release as SAND C Verification Practices for Code Development Teams Greg Weirs Computational Shock and Multiphysics.
Engineering Optimization – Concepts and Applications Engineering Optimization Concepts and Applications Fred van Keulen Matthijs Langelaar CLA H21.1
Problem Uncertainty quantification (UQ) is an important scientific driver for pushing to the exascale, potentially enabling rigorous and accurate predictive.
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation,
Efficient Methodologies for Reliability Based Design Optimization
MOOCHO and TSFCore object-oriented software and interfaces for the development of optimization and other advanced abstract numerical algorithms Roscoe.
FY07 ASC Vertical Integration Milestone Overview, Lessons Learned, and Next Steps Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
MS17 A Case Study on the Vertical Integration of Trilinos Solver Algorithms with a Production Application Code Organizer: Roscoe A. Bartlett Sandia National.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
LTE Review (September 2005 – January 2006) January 17, 2006 Daniel M. Dunlavy John von Neumann Fellow Optimization and Uncertainty Estimation (1411) (8962.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Trilinos Software Engineering Technologies.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
Are their more appropriate domain-specific performance metrics for science and engineering HPC applications available then the canonical “percent of peak”
Continuation Methods for Performing Stability Analysis of Large-Scale Applications LOCA: Library Of Continuation Algorithms Andy Salinger Roger Pawlowski,
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
A Pilot Framework for Modern Reactor System Analysis Codes Haihua Zhao Idaho National Laboratory International RELAP5 User's.
Trilinos: From a User’s Perspective Russell Hooper Nov. 7, 2007 SAND P Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Report on Sensitivity Analysis Radu Serban Keith Grant, Alan Hindmarsh, Steven Lee, Carol Woodward Center for Applied Scientific Computing, LLNL Work performed.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
Page 1 Trilinos Software Engineering Technologies and Integration Numerical Algorithm Interoperability and Vertical Integration –Abstract Numerical Algorithms.
Computing a posteriori covariance in variational DA I.Gejadze, F.-X. Le Dimet, V.Shutyaev.
Large-Scale Stability Analysis Algorithms Andy Salinger, Roger Pawlowski, Ed Wilkes Louis Romero, Rich Lehoucq, John Shadid Sandia National Labs Albuquerque,
Page 1 Embedded Sensitivities and Optimization From Research to Applications Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Page 1 Software Life-cycle and Integration Issues for CS&E R&D Software and Experiences from Trilinos (Part II, Integration Issues) Roscoe A. Bartlett.
Page 1 Trilinos Release Improvement Issues Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Trilinos.
Strategic Goals: To align the many efforts at Sandia involved in developing software for the modeling and simulation of physical systems (mostly PDEs):
ALEGRA is a large, highly capable, option rich, production application solving coupled multi-physics PDEs modeling magnetohydrodynamics, electromechanics,
Sensitivities and Optimization: Going Beyond the Forward Solve (to Enable More Predictive Simulations) Roscoe A. Bartlett Department of Optimization &
Automatic Differentiation: Introduction Automatic differentiation (AD) is a technology for transforming a subprogram that computes some function into a.
Efficient Integration of Large Stiff Systems of ODEs Using Exponential Integrators M. Tokman, M. Tokman, University of California, Merced 2 hrs 1.5 hrs.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Derivatives In modern structural analysis we calculate response using fairly complex equations. We often need to solve many thousands of simultaneous equations.
Strategies for Solving Large-Scale Optimization Problems Judith Hill Sandia National Laboratories October 23, 2007 Modeling and High-Performance Computing.
Solvers Made Easy (to use and use together) Thyra, Stratimikos, Handles and More... Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation.
An Overview of the Thyra Interoperability Effort Current Status and Future Plans Roscoe A. Bartlett Department 1411: Optimization and Uncertainty Estimation.
Danny Dunlavy, Andy Salinger Sandia National Laboratories Albuquerque, New Mexico, USA SIAM Parallel Processing February 23, 2006 SAND C Sandia.
1 1 What does Performance Across the Software Stack mean?  High level view: Providing performance for physics simulations meaningful to applications 
Thyra from a Developer's Perspective Roscoe A. Bartlett Department 1411: Optimization and Uncertainty Estimation Sandia National Laboratories Sandia is.
New Features in ML 2004 Trilinos Users Group Meeting November 2-4, 2004 Jonathan Hu, Ray Tuminaro, Marzio Sala, Michael Gee, Haim Waisman Sandia is a multiprogram.
1 Stratimikos Unified Wrapper to Trilinos Linear Solvers and Preconditioners Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Texas A&M University, Department of Aerospace Engineering AN EMBEDDED FUNCTION TOOL FOR MODELING AND SIMULATING ESTIMATION PROBLEMS IN AEROSPACE ENGINEERING.
Domain Decomposition in High-Level Parallelizaton of PDE codes Xing Cai University of Oslo.
Thyra For Developers Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia National Laboratories Trilinos Users Group Meeting (Developers.
Using Thyra and Stratimikos to Build Blocked and Implicitly Composed Solver Capabilities Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation.
Trilinos Strategic (and Tactical) Planning Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United.
Derivative-based uncertainty quantification in climate modeling P. Heimbach 1, D. Goldberg 2, C. Hill 1, C. Jackson 3, N. Petra 3, S. Price 4, G. Stadler.
Daily Integration and Testing of the Development Versions of Applications and Trilinos A stronger foundation for enhanced collaboration in application.
On the Use of Finite Difference Matrix-Vector Products in Newton-Krylov Solvers for Implicit Climate Dynamics with Spectral Elements ImpactObjectives 
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Photos placed in horizontal position with even amount of white space between photos and header Sandia National Laboratories is a multi-program laboratory.
Algebraic Solvers in FASTMath Argonne Training Program on Extreme-Scale Computing August 2015.
Anders Nielsen Technical University of Denmark, DTU-Aqua Mark Maunder Inter-American Tropical Tuna Commission An Introduction.
Page 1 Open-Source Software for Interfacing and Support of Large-scale Embedded Nonlinear Optimization Roscoe A. Bartlett
On the Path to Trinity - Experiences Bringing Codes to the Next Generation ASC Platform Courtenay T. Vaughan and Simon D. Hammond Sandia National Laboratories.
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation,
An Introduction to AD Model Builder PFRP
C Software Life-cycle and Integration Issues for CS&E R&D Software and Experiences from Trilinos (Part I) Roscoe A. Bartlett
Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation
ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.
Trilinos Software Engineering Technologies and Integration
Objective Numerical methods Finite volume.
Embedded Nonlinear Analysis Tools Capability Area
Presentation transcript:

1 ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia National Laboratories April 3 rd, 2008 Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract DE-AC04-94AL85000.

2 Overview of Nonlinear Solver and Analysis Capabilities

3 · Nonlinear Problems: · Nonlinear equations: · Stability analysis: · Transient Nonlinear Problems: · DAEs/ODEs · ODE/DAE Sensitivities … · Optimization Problems: · Unconstrained: · Constrained: Trilinos Packages NOX LOCA MOOCHO Trilinos Nonlinear Solver and Analysis Packages Rythmos

4 ModelEvaluator Overview

5 Nonlinear Algorithms and Applications : Everyone for Themselves? NOX / LOCA RythmosMOOCHO XyceCharonAriaTramonto Aleph … … Trilinos and non-Trilinos Preconditioner and Linear Solver Capability Key Point BAD Nonlinear ANA Solvers in Trilinos Sandia Applications

6 Overview of Nonlinear Model Evaluator Interface Motivation: An interface for nonlinear problems is needed that will support a variety of different types of problems Nonlinear equations (and senstitivities) Stability analysis and continuation Explicit ODEs (and sensitivities) DAEs and implicit ODEs (and sensitivities) Unconstrained optimization Constrained optimization Uncertainty quantification … as well as different combinations of problem types such as: Uncertainty in transient simulations Stability of an optimum under uncertainty of a transient problem Approach: Develop a single, scalable interface to address all of these problems (Some) Input arguments: State and differential state: Parameter sub-vectors: Time (differential): (Some) Output functions: State function: Auxiliary response functions: State/state derivative operator (LinearOpWithSolve): Key Point All inputs and outputs are optional and the model evaluator object itself decides which ones are accepted. Key Point The number of combinations of different problem types is large and trying to statically type all of the combinations is not realistic

7 Some Nonlinear Problems Supported by the ModelEvaluator Nonlinear equations: Stability analysis: DAEs/Implicit ODEs: Explicit ODEs: DAE/Implicit ODE Forward Sensitivities: Unconstrained Optimization: Constrained Optimization: ODE Constrained Optimization: Explicit ODE Forward Sensitivities:

8 Nonlinear Algorithms and Applications : Everyone for Themselves? NOX / LOCA RythmosMOOCHO XyceCharonAriaTramonto Aleph … … Trilinos and non-Trilinos Preconditioner and Linear Solver Capability Key Point BAD Nonlinear ANA Solvers in Trilinos Sandia Applications

9 Nonlinear Algorithms and Applications : Thyra & Model Evaluator! Trilinos and non-Trilinos Preconditioner and Linear Solver Capability NOX / LOCA MOOCHO XyceCharonAriaTramonto Aleph … … Key Points Provide single interface from nonlinear ANAs to applications Provide single interface for applications to implement to access nonlinear ANAs Provides shared, uniform access to linear solver capabilities Once an application implements support for one ANA, support for other ANAs can quickly follow Nonlinear ANA Solvers in Trilinos Sandia Applications Rythmos Stratimikos! Model Evaluator

10 Model Evaluator : Thyra and EpetraExt Versions Thyra::ModelEvaluator create_W_op() : LinearOpBase create_W() : LinearOpWithSolveBase createInArgs() : InArgs createOutArgs() : OutArgs … evalModel( in InArgs, out OutArgs ) EpetraExt::ModelEvaluator createInArgs() : InArgs createOutArgs() : OutArgs create_W() : Epetra_Operator … evalModel( in InArgs, out OutArgs ) Thyra::EpetraModelEvaluator createInArgs() : InArgs createOutArgs() : OutArgs create_W() : LinearOpWithSolveBase … evalModel( in InArgs, out OutArgs ) Thyra::LinearOpWithSolveFactoryBase Nonlinear ANA Concrete Application Thyra-based interoperability interface layer Epetra-based application- friendly implementation support interface Thyra::ModelEvaluator and EpetraExt::ModelEvaluator are near mirror copies of each other. Thyra::EpetraModelEvaluator is fully general adapter class that can use any linear solver through a Thyra::LinearOpWithSolveFactoryBase object it is configured with Stateless model that allows for efficient multiple shared calculations (e.g. automatic differentiation) Adding input and output arguments involves Modifying only the Thyra::ModelEvaluator, EpetraExt::ModelEvaluator, Thyra::EpetraModelEvaluator, and a few other auxiliary classes and tools => O(1) overhead to add new arguments! Only recompilation of Nonlinear ANA and Concrete Application code Stratimikos!

11 Simple Example EpetraExt::ModelEvaluator Subclass

12 Example EpetraExt::ModelEvaluator Application Implementation /** \brief Simple example ModelEvaluator subclass for a 2x2 set of * parameterized nonlinear equations. * * The equations modeled are: \verbatim f[0] = x[0] + x[1]*x[1] - p[0]; f[1] = d * ( x[0]*x[0] - x[1] - p[1] ); \endverbatim */ class EpetraModelEval2DSim : public EpetraExt::ModelEvaluator { public: EpetraModelEval2DSim(...); /** \name Overridden from EpetraExt::ModelEvaluator. */ RCP get_x_map() const; RCP get_f_map() const; RCP get_x_init() const; RCP create_W() const; InArgs createInArgs() const; OutArgs createOutArgs() const; void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const; private:... }; Complete nonlinear equations example in: Trilinos/packages/epetraext/example/model_evaluator/2dsim/

13 Example EpetraExt::ModelEvaluator Application Implementation EpetraExt::ModelEvaluator::InArgs EpetraModelEval2DSim::createInArgs() const { InArgsSetup inArgs; inArgs.setModelEvalDescription(this->description()); inArgs.setSupports(IN_ARG_x,true); return inArgs; } EpetraExt::ModelEvaluator::OutArgs EpetraModelEval2DSim::createOutArgs() const { OutArgsSetup outArgs; outArgs.setModelEvalDescription(this->description()); outArgs.setSupports(OUT_ARG_f,true); outArgs.setSupports(OUT_ARG_W,true); outArgs.set_W_properties( DerivativeProperties(DERIV_LINEARITY_NONCONST,DERIV_RANK_FULL,true) ); return outArgs; } void EpetraModelEval2DSim::evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const { const Epetra_Vector &x = *inArgs.get_x(); RCP f_out = outArgs.get_f(); RCP W_out = outArgs.get_W(); if (!is_null(f_out)) {... } if (!is_null(W_out)) {... } } Key Point From looking at example code, there is not even a hint that other input and output arguments exist!

14 Vertical Integration Milestone: ModelEvaluator in Action!

15 Summary of Trilinos Vertical Integration Project (Milestone) Goal: Vertically integrate Trilinos solver algorithms in Trilinos to build new predictive embedded analysis capabilities Impact: Vertically integrated 10+ Trilinos algorithm packages Goal: Demonstrate on relevant production applications Impact: Solved steady-state parameter estimation problems and transient sensitivities on semiconductor devices in Charon Impact: Solved Eigen problems on MHD problem in Charon Added Goal: Explore refined models of collaboration between production application developers and algorithm researchers. Impact: Closer collaboration between application and algorithm developers yielding better algo and app R&D Bartlett, Roscoe, Scott Collis, Todd Coffey, David Day, Mike Heroux, Rob Hoekstra, Russell Hooper, Roger Pawlowski, Eric Phipps, Denis Ridzal, Andy Salinger, Heidi Thornquist, and Jim Willenbring. ASC Vertical Integration Milestone. SAND , Sandia National Laboratories, 2007 [

16 Si interstitial (I) (+2,+1,0,–1,–2) Vacancy (V) (+2,+1,0,–1,–2) VV (+1,0,–1,–2) B I (+,0,–) C I (+,0,-) VP (0,–) VB (+,0) VO (0,–) B I B (0,–) B I O (+,0) BICBIC Annihilation Defect reactions QASPR Qualification of electronic devices in hostile environments PDE semiconductor device simulation Stockpile BJT

17 Vertical Integrations of Trilinos Capabilities: Example 1 Nonlinear Solver Time Integration Optimization Continuation Constrained Solves Sensitivity Analysis Stability Analysis Analysis Tools (embedded) Data Structures Direct Solvers Linear Algebra Preconditioners Iterative Solvers Eigen Solver Matrix Partitioning Derivatives Derivative Tools Sensitivities Transient sensitivity analysis of a 2n2222 BJT in Charon w/AD+Rythmos: 14x faster than FD Trilinos Capabilities

18 Vertical Integrations of Trilinos Capabilities: Example 2 Nonlinear Solver Time Integration Optimization Continuation Constrained Solves Sensitivity Analysis Stability Analysis Analysis Tools (embedded) Data Structures Direct Solvers Linear Algebra Preconditioners Iterative Solvers Eigen Solver Matrix Partitioning Derivatives Derivative Tools Sensitivities Trilinos Capabilities Destabilizing eigen-vector for heated fluid in magnetic field

19 Vertical Integrations of Trilinos Capabilities: Example 3 Nonlinear Solver Time Integration Optimization Continuation Constrained Solves Sensitivity Analysis Stability Analysis Analysis Tools (embedded) Data Structures Direct Solvers Linear Algebra Preconditioners Iterative Solvers Eigen Solver Matrix Partitioning Derivatives Derivative Tools Sensitivities Trilinos Capabilities Steady-Sate Parameter Estimation Problem using 2n2222 BJT in Charon MOOCHO + AD

20 Derivative Support and Sensitivity Analysis

21 Model Derivatives State function parameter sensitivities: [LinearOpBase or MultiVectorBase] Auxiliary function state sensitivities: Auxiliary function parameter sensitivities: [LinearOpBase or MultiVectorBase 2 ] State function state sensitivities: [LinearOpWithSolveBase or LinearOpBase] First Derivatives Use Cases: Steady-state and transient sensitivity computations Optimization Multi-physics coupling … Key Point Derivative class used to store one of these three forms of a derivative

22 Forward/Direct and Adjoint Sensitivities Steady-state constrained response:Reduced response function: Reduced Sensitivities: where: Forward/Direct Sensititivies (n g large, n p small) =+- Adjoint Sensititivies (n g small, n p large) MVLOLOWSMV -T =+- npnp ngng ngng npnp MVLOLOWSMV Key Point The form of the derivatives you need depends on whether you are doing direct or adjoint sensitivities

23 Transient Sensitivities: State Equations with Responses Fully Implicit ODE/DAE State Equations Composite Response Function Reduced Composite Response Function where:

24 Transient Sensitivities: Forward Sensitivity Method Forward Sensitivity Equations: Forward Reduced Gradient Forward Sensitivity Methods: The forward sensitivities d(x)/d(p) are integrated right along with the forward state equation Can be solved using explicit or implicti time integration mehtods O(n p ) extra storage and computation per time step Reuse of forward solver integrator infrastructure, Jacobian/preconditioner storage

25 Forward Transient Sensitivities with Charon/Rythmos QASPR transient current sensitivities w.r.t. reaction parameters for an irradiated semiconductor device modeled with Charon –Embedded sensitivities with AD/Sacado (Phipps) & Rythmos –Finite differences (steplen=1e-2) (optimal steplen=1e-1) –Embedded sensitivities vs. finite diff. Much more accurate and robust! 10x faster for 40 parameters! Bartlett, Roscoe, Scott Collis, Todd Coffey, David Day, Mike Heroux, Rob Hoekstra, Russell Hooper, Roger Pawlowski, Eric Phipps, Denis Ridzal, Andy Salinger, Heidi Thornquist, and Jim Willenbring. ASC Vertical Integration Milestone. SAND , Sandia National Laboratories, 2007 [

26 Motivation for Unified ModelEvaluator Approach to Nonlinear Problems Large overlap in commonality between requirements for many nonlinear abstract numerical algorithms (ANAs). Incremental support for sensitivities, optimization, and UQ Mixed problem types will become more and more common and must be easy to support Properties of ModelEvalutor Software Strong Typing of Input/Object Types but Weak Typing of Problem Formulation Designed for Augmentation Incremental Development of Model Types and Capabilities Self-Describing Models => Smart Algorithms Independence/Multiplicity of Input and Output Objects ANAs already using or can use ModelEvaluator NOX (nonlinear equations) LOCA (stability analysis, continuation) Rythmos (explicit ODEs, implicit ODEs, DAEs) MOOCHO (constrained optimization, unconstrained optimization, nonlinear equations) Aristos (full space, trust-region optimization) ModelEvaluator Software Summary