Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.

Slides:



Advertisements
Similar presentations
Lecture 14: Newton’s method for system of two nonlinear equations Function newton2d01 Set initial (x,y) point, maximum number of iterations, and convergence.
Advertisements

Inexact SQP Methods for Equality Constrained Optimization Frank Edward Curtis Department of IE/MS, Northwestern University with Richard Byrd and Jorge.
Steepest Decent and Conjugate Gradients (CG). Solving of the linear equation system.
Classification and Prediction: Regression Via Gradient Descent Optimization Bamshad Mobasher DePaul University.
Lecture 5 A Priori Information and Weighted Least Squared.
Motion Analysis (contd.) Slides are from RPI Registration Class.
1 A Matrix Free Newton /Krylov Method For Coupling Complex Multi-Physics Subsystems Yunlin Xu School of Nuclear Engineering Purdue University October 23,
1cs426-winter-2008 Notes  SIGGRAPH crunch time - my apologies :-)
Computational Optimization
UNCONSTRAINED MULTIVARIABLE
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 8. Nonlinear equations.
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.
Using Belos: Next-generation Iterative Solvers November 6 th, 2007 Using Belos: Next-generation Iterative Solvers November 6 th, 2007 Mike Heroux Rich.
LTE Review (September 2005 – January 2006) January 17, 2006 Daniel M. Dunlavy John von Neumann Fellow Optimization and Uncertainty Estimation (1411) (8962.
1 Hybrid methods for solving large-scale parameter estimation problems Carlos A. Quintero 1 Miguel Argáez 1 Hector Klie 2 Leticia Velázquez 1 Mary Wheeler.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
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.
Frank Edward Curtis Northwestern University Joint work with Richard Byrd and Jorge Nocedal February 12, 2007 Inexact Methods for PDE-Constrained Optimization.
ENCI 303 Lecture PS-19 Optimization 2
Page 1 Trilinos Software Engineering Technologies and Integration Numerical Algorithm Interoperability and Vertical Integration –Abstract Numerical Algorithms.
Large-Scale Stability Analysis Algorithms Andy Salinger, Roger Pawlowski, Ed Wilkes Louis Romero, Rich Lehoucq, John Shadid Sandia National Labs Albuquerque,
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory 101 Quasi-Newton Methods.
Introduction to GSL CS 3414 From GNU Scientific Library Reference Manual at
Page 1 Embedded Sensitivities and Optimization From Research to Applications Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Amesos Sparse Direct Solver Package Ken Stanley, Rob Hoekstra, Marzio Sala, Tim Davis, Mike Heroux Trilinos Users Group Albuquerque 3 Nov 2004.
1 ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.
ML: Multilevel Preconditioning Package Trilinos User’s Group Meeting Wednesday, October 15, 2003 Jonathan Hu Sandia is a multiprogram laboratory operated.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
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.
Strategies for Solving Large-Scale Optimization Problems Judith Hill Sandia National Laboratories October 23, 2007 Modeling and High-Performance Computing.
Frank Edward Curtis Northwestern University Joint work with Richard Byrd and Jorge Nocedal January 31, 2007 Inexact Methods for PDE-Constrained Optimization.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Optimization & Constraints Add mention of global techiques Add mention of calculus.
1 SciDAC TOPS PETSc Work SciDAC TOPS Developers Satish Balay Chris Buschelman Matt Knepley Barry Smith.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
Danny Dunlavy, Andy Salinger Sandia National Laboratories Albuquerque, New Mexico, USA SIAM Parallel Processing February 23, 2006 SAND C Sandia.
Amesos Interfaces to sparse direct solvers October 15, :30 – 9:30 a.m. Ken Stanley.
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.
Solution of Nonlinear Functions
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.
Teuchos: Utilities for Developers & Users November 2nd, 3:30-4:30pm Roscoe Bartlett Mike Heroux Kris Kampshoff Kevin Long Paul Sexton Heidi.
Thyra For Developers Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia National Laboratories Trilinos Users Group Meeting (Developers.
Trilinos Strategic (and Tactical) Planning Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United.
1 Chapter 6 General Strategy for Gradient methods (1) Calculate a search direction (2) Select a step length in that direction to reduce f(x) Steepest Descent.
Inexact SQP methods for equality constrained optimization Frank Edward Curtis Department of IE/MS, Northwestern University with Richard Byrd and Jorge.
An Overview of Belos and Anasazi October 16 th, 11-12am Heidi Thornquist Teri Barth Rich Lehoucq Mike Heroux Computational Mathematics and Algorithms Sandia.
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.
ML: A Multilevel Preconditioning Package Copper Mountain Conference on Iterative Methods March 29-April 2, 2004 Jonathan Hu Ray Tuminaro Marzio Sala Sandia.
Algebraic Solvers in FASTMath Argonne Training Program on Extreme-Scale Computing August 2015.
Combining Trilinos Packages To Solve Linear Systems Michael A. Heroux Sandia National Labs.
Page 1 Open-Source Software for Interfacing and Support of Large-scale Embedded Nonlinear Optimization Roscoe A. Bartlett
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation,
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Bounded Nonlinear Optimization to Fit a Model of Acoustic Foams
Xing Cai University of Oslo
Introduction to GSL CS 3414 From GNU Scientific Library Reference Manual at
ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.
Trilinos Software Engineering Technologies and Integration
Chapter 10. Numerical Solutions of Nonlinear Systems of Equations
Instructor :Dr. Aamer Iqbal Bhatti
~ Least Squares example
~ Least Squares example
Embedded Nonlinear Analysis Tools Capability Area
Presentation transcript:

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-94AL NOX: An Object-Oriented Nonlinear Solver Package Roger Pawlowski, Tamara Kolda, Russell Hooper, and John Shadid Sandia National Laboratories Albuquerque, NM Trilinos Workshop Copper Mountain Conference on Iterative Solvers March 30 th, 2004

Background NOX is the nonlinear solver package in the Trilinos Framework. NOX is being developed to: –Enable robust and efficient solutions to systems of nonlinear equations. –Provide a broad array of nonlinear algorithms through a single interface. –Allow for rapid deployment of new solver technology into ASCI codes. –Eliminate redundancies in ASCI code development. Written in C++: object-oriented design. Online documentation:

Broyden’s Method Newton’s Method Tensor Method Nonlinear Solution Algorithms Iterative Linear Solvers, Adaptive Forcing Terms Line Search Interval Halving Quadratic Cubic More’-Thuente Homotopy Artificial Parameter Continuation Natural Parameter Continuation Trust Region Dogleg Inexact Dogleg Globalizations

Stopping Criteria (Status Test) Example: Newton’s Method for F (x) = 0 Choose an initial guess x 0 For k = 0,1,2,... –Compute F k = F (x k ) –Compute J k where (J k ) ij =  F i (x k )/  x j –Let d k = - J k -1 F k –(Optional) Let k be a calculated step length –Set x k + 1 = x k + k d k –Test for Convergence or Failure Calculating the Direction Damping or Line Search Iterate Control (Solver) Building Blocks of NOX

NOX Solvers (Iterate Control) 1. LineSearchBased Compute Direction Compute Step Length Scale direction by step length Update solution Check Convergence 2. TrustRegionBased (dogleg) Computes Newton Direction Computes Cauchy Direction Adjust trust region radius Update solution Check Convergence 3. InexactTrustRegionBased (Prerelease) 4. TensorBased (Prerelease) 5. UserDefined Solver is determined by passing a parameter list to a handle for the class: NOX::Solver::Manager solver(group, StatusTests, ParameterList); int status = solver.solve(); Derived from NOX::Solver::Generic bool reset(NOX::Abstract::Group& grp, NOX::StatusTest::Generic& tests, NOX::Parameter::List& params) bool reset(NOX::Abstract::Group& grp, NOX::StatusTest::Generic& tests) NOX::StatusTest::StatusType getStatus() NOX::StatusTest::StatusType iterate() NOX::StatusTest::StatusType solve() const NOX::Abstract::Group& getSolutionGroup() const const NOX::Abstract::Group& getPreviousSolutionGroup() const int getNumIterations() const const NOX::Parameter::List& getParameterList() const

NOX Directions Steepest Descent Newton Requires a linear solve Adaptive forcing terms Broyden Modified Newton with rank-1 updates to the most recently computed Jacobian Nonlinear-CG (Prerelease) Tensor (Prerelease) User Defined Directions Derived from NOX::Direction::Generic Passed into the solver via parameter list using a direction template ctor. User Defined Merit Function Derived from NOX::Parameter::MeritFunction Passed into the solver via parameter list using the NOX::Parameter::Arbitrary entry Direction is determined and constructed in a handle called a “Manager”: NOX::Direction::Manager dir(PrintParams, DirectionParams);

NOX Line Searches Full Step Constant step size. Defaults to 1.0. Backtrack interval halving Polynomial Interpolation Quadratic and Cubic interpolation Requires a “Sufficient Decrease” Condition More’-Thuente Polynomial Interpolation Sufficient Decrease and Curvature Conditions Nonlinear-CG – (Prerelease) Curvilinear (Prerelease) User Defined Line Searches Derived from NOX::LineSearch::Generic Passed into the solver via parameter list using a template constructor. User Defined Merit Function Derived from NOX::Parameter::MeritFunction Passed into the solver via parameter list using the NOX::Parameter::Arbitrary entry User Defined Norms Derived from NOX::Parameter::UserNorm Passed into the solver via parameter list using the NOX::Parameter::Arbitrary entry Line Searches are determined and constructed in a handle called a “Manager”: NOX::LineSearch::Manager ls(PrintParams, LineSearchParams);

Mix-n-Match Solver Algorithms Solver –Line Search Based –Trust Region Based –Tensor Based Direction –Newton –Broyden –Steepest Descent –Tensor –User-Defined Line Search / Damping –Full Step –Backtrack –Polynomial/Quadratic –More’-Thuente –Curvilinear –User-Defined Newton Trust-Region Method Tensor Method Newly-Deployed Broyden Method Quadratic Line Search Example Parameter List “Nonlinear Solver” = “Line Search Based” “Direction” sublist “Method” = “Newton” “Newton” sublist “Linear Solver” sublist “Tolerance” = 1.0e-10 “Line Search” sublist “Method” = “Polynomial” “Polynomial” sublist “Minimum Step” = 1.0e-10 “Max Iters” = 10 “Interpolation” = “Quadratic” NOX Documentation: Related PagesRelated Pages

Stopping Criteria (StatusTests) Highly Flexible Design: Users build a convergence test hierarchy and registers it with the solver (via solver constructor or reset method). –Norm F: {Inf, One, Two} {absolute, relative} –Norm Update  X: {Inf, One, Two} –Norm Weighted Root Mean Square (WRMS): –Max Iterations: Failure test if solver reaches max # iters –FiniteValue: Failure test that checks for NaN and Inf on –Stagnation: Failure test that triggers if the convergence rate fails a tolerance check for n consecutive iterations. –Combination: {AND, OR} –Users Designed: Derive from NOX::StatusTest::Generic

Building a Status Test Fail if value of becomes Nan or Inf NOX::StatusTest::FiniteValue finiteValueTest; FiniteValue: finiteValueTest Fail if we reach maximum iterations Converge if both: MaxIters: maxItersTest NOX::StatusTest::MaxIters maxItersTest(200); normFTest NOX::StatusTest::NormF normFTest(); normWRMSTest NOX::StatusTest::NormWRMS normWRMSTest(); Combo(AND): convergedTest NOX::StatusTest::Combo convergedTest(NOX::StatusTest::Combo::AND); Combo(OR) allTests NOX::StatusTest::Combo allTests(NOX::StatusTest::Combo::OR); allTests.addStatusTest(finiteValueTest); allTests.addStatusTest(maxItersTest); allTests.addStatusTest(convergedTest); convergedTest.addStatusTest(normFTest); convergedTest.addStatusTest(normWRMSTest);

Status Tests Continued User Defined are Derived from NOX::StatusTest::Generic NOX::StatusTest::StatusType checkStatus(const NOX::Solver::Generic &problem) NOX::StatusTest::StatusType checkStatusEfficiently(const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType) NOX::StatusTest::StatusType getStatus() const ostream& print(ostream &stream, int indent=0) const -- Status Test Results -- ** OR Combination -> ** AND Combination -> ** F-Norm = 5.907e-01 = 1) (Max Lin Solv Tol: 1.314e-15 < 0.5) ** Finite Number Check (Two-Norm F) = Finite ** Number of Iterations = 2 < Final Status Test Results -- Converged....OR Combination -> Converged....AND Combination -> Converged....F-Norm = 3.567e-13 = 1) (Max Lin Solv Tol: 4.951e-14 < 0.5) ?? Finite Number Check (Two-Norm F) = Unknown ?? Number of Iterations = -1 < 200

NOX Interface Solver Layer Abstract Vector & Abstract Group Abstract Layer Solvers - Line Search - Trust Region Directions - e.g., Newton Line Searches - e.g., Polynomial Status Tests - e.g., Norm F Don’t need to directly access the vector or matrix entries, only manipulate the objects. NOX uses an abstract interface to manipulate linear algebra objects. Isolate the Solver layer from the linear algebra implementations used by the application. This approach means that NOX does NOT rely on any specific linear algebra format. Allows the apps to tailor the linear algebra to their own needs! –Serial or Parallel –Any Storage format: User Defined, LAPACK, PETSc, Epetra

NOX::Abstract::Vector Initialization – x = y – x = | y | – x i = 1/ y i for i = 1 to n – x i =  for i = 1 to n Length of Vector Scaling – x =  x – x i = x i y i for i = 1 to n Update – x =  a +  x, – x =  a +  b +  x Norm – k x k 1, k x k 2, k x k 1 – k x k w (weighted norm) Dot – x ¢ y Clone (create a copy) – y = x The solver is not allowed nor does it need explicit access to the vector – just the ability to manipulate it.

NOX::Abstract::Group x = Iterate –Initialize –Update –Access F = F (x) –Compute –Access J = Jacobian of F at x –Compute –Apply / Apply Transpose –Apply Inverse –Apply Preconditioning n = Newton Vector –Compute n = - J -1 F to specified tolerance –Access g = Gradient of k F (x k ) k 2 – g = J T F –Access Clone The linear solver and application interface are combined into the Group. Vectors x, F, n, g are accessed as NOX::Abstract::Vector’s. Matrix J is never directly accessed!

Code Demonstration Example Implementation

NOX Framework Solver Layer Abstract Vector & Abstract Group Abstract Layer Linear Algebra Interface Implementations - EPetra - PETSc - LAPACK - USER DEFINED EPetra Dependent Features - Matrix-Free Newton-Krylov - Preconditioning - Graph Coloring / Finite Diff. Solvers - Line Search - Trust Region Directions - e.g., Newton Line Searches - e.g., Polynomial Status Tests - e.g., Norm F Application Interface Layer User Interface - Compute F - Compute Jacobian - Compute Preconditioner

Linear Algebra Support Features NOX’s support libraries define a concrete implementation of the Abstract Vector and Group. We only require the user to implement a minimal interface derived from NOX:: ::Interface. bool computeF(const Epetra_Vector &x, Epetra_Vector &f, FillType flag=F) bool computeJacobian(const Epetra_Vector &x, Epetra_Operator &Jac) bool computePrecMatrix(const Epetra_Vector &x, Epetra_RowMatrix &M) bool computePreconditioner(const Epetra_Vector &x, Epetra_Operator &M) Group(NOX::Parameter::List& printingParams, NOX::Parameter::List& linearSolverParams, NOX::Epetra::Interface& i, NOX::Epetra::Vector& x, Epetra_Operator& J) Group(NOX::Parameter::List& printingParams, NOX::Parameter::List& linearSolverParams, NOX::Epetra::Interface& i, NOX::Epetra::Vector& x, Epetra_Operator& J, Epetra_Operator& M)

The Epetra “Goodies” Matrix-Free Newton-Krylov Operator Derived from Epetra_Operator Can be used to estimate Jacobian action on a vector NOX::Epetra::MatrixFree Finite Difference Jacobian Derived from an Epetra_RowMatrix Can be used as a preconditioner matrix NOX::Epetra::FiniteDifference Graph Colored Finite Difference Jacobian Derived from NOX::Epetra::FiniteDifference Fast Jacobian fills – need connectivity/coloring graph (NOX::Epetra::FiniteDifferenceColoring) Full interface to AztecOO using NOX parameter list Preconditioners: internal AztecOO, Ifpack, User defined Scaling object

NOX Specific Configure Options Compiling NOX library in Trilinos: --enable-nox Compiling prerelease code: --enable-prerelease Using nox built-in linear algebra support: LAPACK: --enable-nox-lapack --enable-nox-lapack-examples Epetra: --enable-nox-epetra --enable-nox-epetra-examples PETSc: --enable-nox-petsc --enable-nox-petsc-examples Compiling the test suite: --enable-tests --enable-nox-tests Compiling LOCA library in Trilinos/NOX: --enable-loca Specifying an install directory: --prefix=/usr/local > configure --enable-nox –enable-nox-epetra –prefix=/usr/local > make > make install > make dox

Sandia Applications Primary NOX Team: Tammy Kolda, Roger Pawlowski, Russ Hooper

Summary Key Features –Object-oriented C++ library –Large number of cutting-edge algorithms –Can use any linear algebra implementation –Easy interface –User Flexibility: Add solvers, directions, line searches, convergence tests NOX Support libraries –Fast integration – reduced interface –parallel iterative solvers (AztecOO, PETSc) –preconditioners (Ifpack, ML, Aztec, PETSc) –Matrix-Free Newton-Krylov –Matrix Estimation: Finite Difference/Coloring

NOX Contributors (Ideas, Code, and Testing) Sandia –Tammy Kolda * –Roger Pawlowski * –Russ Hooper * –Brett Bader* –John Shadid –Todd Coffey * –Andy Salinger (LOCA) * –Eric Phipps (LOCA) * –Bill Spotz * (PyNOX) –Mike Heroux (Trilinos) –Scott Hutchinson (Xyce) –Rob Hoekstra (Xyce) –Eric Keiter (Xyce) –Alan Williams (SIERRA) –Tom Smith (Premo) –Alfred Lorber (Premo) –Tom Brunner (Alegra) Academics –Homer Walker, WPI –Joseph Simonis, WPI –Tim Kelley, NCSU –Matthew Lasater, NCSU –Bobby Schnabel, UCB –Richard Byrd, UCB –Ryan McKenzie, Kentucky –Craig Douglas, Kentucky * NOX Developer NOX Information Tammy Kolda: Roger Pawlowski: Download: Trilinos: