Next Generation Iterative Solvers: Belos & Anasazi Next Generation Iterative Solvers: Belos & Anasazi November 3 rd, 9:30-10:30am Mike Heroux Ulrich Hetmaniuk.

Slides:



Advertisements
Similar presentations
Applied Linear Algebra - in honor of Hans SchneiderMay 25, 2010 A Look-Back Technique of Restart for the GMRES(m) Method Akira IMAKURA † Tomohiro SOGABE.
Advertisements

MATH 685/ CSI 700/ OR 682 Lecture Notes
Modern iterative methods For basic iterative methods, converge linearly Modern iterative methods, converge faster –Krylov subspace method Steepest descent.
1cs542g-term Notes  Assignment 1 will be out later today (look on the web)
1cs542g-term Notes  Assignment 1 is out (questions?)
CS240A: Conjugate Gradients and the Model Problem.
MOOCHO and TSFCore object-oriented software and interfaces for the development of optimization and other advanced abstract numerical algorithms Roscoe.
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 6. Eigenvalue problems.
Point set alignment Closed-form solution of absolute orientation using unit quaternions Berthold K. P. Horn Department of Electrical Engineering, University.
Benchmarking Parallel Eigen Decomposition for Residuals Analysis of Very Large Graphs Edward Rutledge, Benjamin Miller, Michelle Beard HPEC 2012 September.
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.
Numerical Linear Algebra IKI Course outline Review linear algebra Square linear systems Least Square Problems Eigen Problems Text: Applied Numerical.
Using Belos: Next-generation Iterative Solvers November 6 th, 2007 Using Belos: Next-generation Iterative Solvers November 6 th, 2007 Mike Heroux Rich.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
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.
Teuchos: Utilities for Developers & Users November 4 th, 1:15-4:30pm Roscoe Bartlett Mike Heroux Kris Kampshoff Kevin Long Paul Sexton Heidi Thornquist.
Integrating Trilinos Solvers to SEAM code Dagoberto A.R. Justo – UNM Tim Warburton – UNM Bill Spotz – Sandia.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
PyTrilinos: A Python Interface to Trilinos Bill Spotz Sandia National Laboratories Reproducible Research in Computational Geophysics August 31, 2006.
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.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Large-Scale Stability Analysis Algorithms Andy Salinger, Roger Pawlowski, Ed Wilkes Louis Romero, Rich Lehoucq, John Shadid Sandia National Labs Albuquerque,
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Page 1 Embedded Sensitivities and Optimization From Research to Applications Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
ANS 1998 Winter Meeting DOE 2000 Numerics Capabilities 1 Barry Smith Argonne National Laboratory DOE 2000 Numerics Capability
After step 2, processors know who owns the data in their assumed partitions— now the assumed partition defines the rendezvous points Scalable Conceptual.
Linear algebra: matrix Eigen-value Problems
1 ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.
PDCS 2007 November 20, 2007 Accelerating the Complex Hessenberg QR Algorithm with the CSX600 Floating-Point Coprocessor Yusaku Yamamoto 1 Takafumi Miyata.
1 Eigenvalue Problems in Nanoscale Materials Modeling Hong Zhang Computer Science, Illinois Institute of Technology Mathematics and Computer Science, Argonne.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Solvers Made Easy (to use and use together) Thyra, Stratimikos, Handles and More... Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation.
An Overview of Anasazi An Overview of Anasazi November 2 nd, 2:15-3:15pm Chris Baker Ulrich Hetmaniuk Rich Lehoucq Heidi Thornquist (Lead) Sandia is a.
Danny Dunlavy, Andy Salinger Sandia National Laboratories Albuquerque, New Mexico, USA SIAM Parallel Processing February 23, 2006 SAND C Sandia.
Scalable Linear Algebra Capability Area Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation,
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.
An Overview of Trilinos Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin.
1 Stratimikos Unified Wrapper to Trilinos Linear Solvers and Preconditioners Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
CS240A: Conjugate Gradients and the Model Problem.
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.
Texas A&M University, Department of Aerospace Engineering AN EMBEDDED FUNCTION TOOL FOR MODELING AND SIMULATING ESTIMATION PROBLEMS IN AEROSPACE ENGINEERING.
*Man-Cheol Kim, Hyung-Jo Jung and In-Won Lee *Man-Cheol Kim, Hyung-Jo Jung and In-Won Lee Structural Dynamics & Vibration Control Lab. Structural Dynamics.
Connections to Other Packages The Cactus Team Albert Einstein Institute
Thyra For Developers Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia National Laboratories Trilinos Users Group Meeting (Developers.
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA
Trilinos Strategic (and Tactical) Planning Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United.
An Overview of Belos and Anasazi October 16 th, 11-12am Heidi Thornquist Teri Barth Rich Lehoucq Mike Heroux Computational Mathematics and Algorithms Sandia.
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.
Report from LBNL TOPS Meeting TOPS/ – 2Investigators  Staff Members:  Parry Husbands  Sherry Li  Osni Marques  Esmond G. Ng 
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.
Krylov-Subspace Methods - I Lecture 6 Alessandra Nardi Thanks to Prof. Jacob White, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy.
Combining Trilinos Packages To Solve Linear Systems Michael A. Heroux Sandia National Labs.
Programming Massively Parallel Graphics Multiprocessors using CUDA Final Project Amirhassan Asgari Kamiabad
Page 1 Open-Source Software for Interfacing and Support of Large-scale Embedded Nonlinear Optimization Roscoe A. Bartlett
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA Shirley Moore CPS5401 Fall 2013 svmoore.pbworks.com November 12, 2012.
Finding Rightmost Eigenvalues of Large, Sparse, Nonsymmetric Parameterized Eigenvalue Problems Minghao Wu AMSC Program Advisor: Dr. Howard.
Conjugate gradient iteration One matrix-vector multiplication per iteration Two vector dot products per iteration Four n-vectors of working storage x 0.
The Landscape of Sparse Ax=b Solvers Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More RobustLess Storage More Robust More.
ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.
Trilinos Software Engineering Technologies and Integration
Shengxin Zhu The University of Oxford
RKPACK A numerical package for solving large eigenproblems
Presentation transcript:

Next Generation Iterative Solvers: Belos & Anasazi Next Generation Iterative Solvers: Belos & Anasazi November 3 rd, 9:30-10:30am Mike Heroux Ulrich Hetmaniuk Rich Lehoucq Heidi Thornquist 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.

Outline   Background   AztecOO and ARPACK   SLEPc   Iterative solver design requirements   Generic programming   Belos and Anasazi   What’s in Trilinos 4.0   Current Interfaces   Future Development   Concluding remarks

Background   Several iterative linear solver / eigensolver libraries exist:   PETSc, SLAP, LINSOL, Aztec(OO), …   SLEPc, LOBPCG (hypre), ARPACK, …   None are (completely) written in C++   None of the linear solver libraries can efficiently deal with multiple right-hand sides   Stopping criteria are predetermined for most libraries   The underlying linear algebra is static

AztecOO Linear Solver Library  A C++ wrapper around Aztec library written in C.  Algorithms: GMRES, CG, CGS, BiCGSTAB, TFQMR.  Offers status testing capabilities.  Output verbosity level can be determined by user.  Uses Epetra to perform underlying vector space operations.  Interface to matrix-vector product is defined by the user through the Epetra_Operator.

ARnoldi PACKage (ARPACK)  Written in Fortran 77.  Algorithms: Implicitly Restarted Arnoldi/Lanczos  Static convergence tests.  Output formatting, verbosity level is determined by user.  Uses LAPACK/BLAS to perform underlying vector space operations.  Offers abstract interface to matrix-vector products through reverse communication.

Scalable Library for Eigenvalue Problem Computations ( SLEPc )   Written in C (Hernández, Román, and Vidal, 2003).   Provides some basic eigensolvers as well as wrappers around:   ARPACK (Lehoucq, Maschhoff, Sorensen, and Yang, 1998)   BLZPACK (Marques, 1995)   PLANSO (Wu and Simon 1997)   TRLAN (Wu and Simon, 2001)   Native Algorithms: Power/Subspace Iteration, RQI, Arnoldi   Wrapped Algorithms: IRAM/IRLM (ARPACK), Block Lanczos (BLZPACK), and Lanczos (PLANSO / TRLAN)   Static convergence tests.   Uses PETSc to perform underlying vector space operations, matrix-vector products, and linear solves.   Allows the creation / registration of new matrix-vector products.

Why not create a solver library that: 1. 1.Provides an abstract interface to an operator-vector products, scaling, and preconditioning Allows the user to enlist any linear algebra package for the elementary vector space operations essential to the algorithm. (Epetra, PETSc, etc.) 3. 3.Allows the user to define convergence of any algorithm (a.k.a. status testing) Allows the user to determine the verbosity level, formatting, and processor for the output. Linear/Eigensolver Software Design

AlgorithmA( … ) while ( myStatusTest.CheckStatus(…) == Unconverged ) … % Compute operator-vector product myProblem.ApplyOp(NOTRANS,v,w);  = w.dot(v); … end myOM.print(something); return (solution); end Generic Iterative Method Status Test Generic Operator Interface Generic Linear Algebra Interface Output Manager Linear/Eigen Problem

Benefits of Generic Programming 1)Generic programming techniques ease the implementation of complex algorithms. 2)Developing algorithms with generic programming techniques is easier on the developer, while still allowing them to build a flexible and powerful software package. 3)Generic programming techniques also allow the user to leverage their existing software investment. Caveat: It’s not as easy as taking a piece of code and adding: template More work has to be done to handle “numeric traits”

Teuchos Numeric Traits  OrdinalTraits  zero & one  int & long int  ScalarTraits  zero, one, magnitude type, absolute value, conjugate, square root, random number generator, …  std::numeric_limits  float, double, complex, and complex  Arbitrary precision arithmetic  Templated BLAS/LAPACK wrappers, serial dense matrix/vector Generic programming technique that uses templated interfaces to define the standard behavior of datatypes.

Teuchos Templated BLAS Example template ScalarType BLAS ::NRM2(const OrdinalType n, const ScalarType* x, const OrdinalType incx) const { OrdinalType izero = OrdinalTraits ::zero(); OrdinalType ione = OrdinalTraits ::one(); ScalarType result = ScalarTraits ::zero(); OrdinalType i, ix = izero; if ( n > izero ) { // Set the initial index. if (incx < izero) { ix = (-n+ione)*incx; } for(i = izero; i < n; i++) { result += ScalarTraits ::conjugate(x[ix]) * x[ix]; ix += incx; } result = ScalarTraits ::squareroot(result); } return result; } /* end NRM2 */ double DNRM2( const int n, const double* x, const int incx) const { int i, ix = 0; double result 0.0; if ( n > 0 ) { // Set the initial index. if (incx < 0) { ix = (-n+1)*incx; } for(i = 0; i < n; ++i) { result += x[ix] * x[ix]; ix += incx; } result = std::sqrt(result); } return result; } /* end NRM2 */

New Packages: Belos and Anasazi  Next generation linear solvers (Belos) and eigensolvers (Anasazi) libraries, written in templated C++.  Provide a generic interface to a collection of algorithms for solving large-scale linear problems and eigenproblems.  Algorithm implementation is accomplished through the use of abstract base classes (mini interface). Interfaces are derived from these base classes to operator-vector products, status tests, and any arbitrary linear algebra library.  Includes block linear solvers and eigensolvers.  Release Dates:  Internal (SNL): May 2004  External (Public): March 2005

Why are Block Solvers Useful?  Block Solvers ( in general ):  Achieve better performance for operator-vector products.  Block Eigensolvers ( Op(A)X =  X ):  Block Linear Solvers ( Op(A)X = B ):   Reliably determine multiple and/or clustered eigenvalues.   Example applications: Modal analysis, stability analysis, bifurcation analysis (LOCA)   Useful for when multiple solutions are required for the same system of equations.   Example applications: Perturbation analysis Optimization problems Single right-hand sides where A has a handful of small eigenvalues Inner-iteration of block eigensolvers

Belos/Anasazi Status (Trilinos Release 4.0)  Belos:  Solvers: BlockCG and BlockGMRES  Linear algebra adapters for Epetra and NOX/LOCA  Belos::EpetraOperator allows for integration into other codes  Epetra interface accepts Epetra_Operators, so can be used with ML, AztecOO, Ifpack, Belos, etc…  Block size is independent of number of right-hand sides  Anasazi:  Solvers: Block Krylov-Schur Method and Modal Analysis Solvers (Davidson, Jacobi-Davidson, LOBPCG, etc…)  Linear algebra adapters for Epetra and NOX/LOCA  Can solve standard and generalized eigenproblems  Epetra interface accepts Epetra_Operators, so can be used with Belos, AztecOO, etc…  Block size is independent of number of requested eigenvalues

Belos/Anasazi Design  LinearSolver / Eigensolver Class  LinearProblem / Eigenproblem Class  Sorting and Orthogonalization Class  StatusTest Class  OutputManager Class  Configurable via Teuchos::ParameterList  Interface current Belos/Anasazi abstract linear algebra classes with TSFCore abstract linear algebra classes.

Belos/Anasazi Linear Algebra Interface ( Mini-interface )  (Belos/Anasazi)::MultiVec  Abstract interface to define the linear algebra required by most iterative linear solvers / eigensolvers : clone methods dot product update methods norms initialize / randomize  (Belos/Anasazi)::Operator  Abstract interface to define the linear operator interface required by most iterative linear solvers / eigensolvers : apply methods

Belos/Anasazi IterativeSolver Interface  Provides an abstract interface to Belos/Anasazi basic iterations.  (Belos/Anasazi)::IterativeSolver  number of iterations / restarts  native residuals  linear problem / eigenproblem  initialize/finalize  iterate  Specialization for solvers that can provide more information  Block Krylov-Schur -> Ritz values / residuals

Belos/Anasazi Linear/Eigenproblem Interface   Provides an interface between the basic iterations and linear/eigenproblem to be solved.   Belos::LinearProblem   Allows preconditioning, scaling, etc. to be removed from the algorithm, performs composition apply.   Preconditioner/scaling, operator, LHS/RHS, StatusTest   Performs bookkeeping for solver   Anasazi::Eigenproblem   Allows spectral transformations to be removed from the algorithm.   Differentiates between standard and generalized eigenproblems   Intial vector, stiffness/mass matrix, operator, eigenvalues, eigenvectors

Belos/Anasazi StatusTest Interface  Similar to NOX / AztecOO.  Allows user to decide when solver is finished.  Multiple criterion can be logically connected.  Abstract base class methods:  StatusType CheckStatus( IterativeSolver * solver );  StatusType GetStatus() const;  void Reset();  ostream& Print( ostream& os ) const;  Derived classes  Maximum iterations/restarts,  Residual norm,  Combinations {AND,OR}, …

Belos/Anasazi Output Manager Interface  Allows user to control which processor will handle output from the solver and the verbosity.  Default is lowest verbosity, outputting on proc 0.  Methods:  Get/Set Methods: void SetOStream( ostream& os ); void SetVerbosity( int vbLevel ); ostream& GetOStream();  Query Methods: bool doOutput( int vbLevel );

Anasazi Sort Manager Interface  Abstract interface for managing the sorting of the eigenvalues computed by the eigensolver  Important tool to complement spectral transformations  Only two methods:  ReturnType sort(IterativeSolver * solver, int n, TYPE *evals, int *perm=0);  ReturnType sort(IterativeSolver * solver, int n, TYPE *r_evals, TYPE *i_evals, int *perm=0);  Basic sorting types are provided  largest/smallest magnitude, largest/smallest real part, largest/smallest imaginary part

How do the Interfaces Interoperate? (Anasazi) Anasazi::Eigenproblem Anasazi::StatusTest Anasazi::IterativeSolver Anasazi::OutputManagerAnasazi::SortManager Anasazi::OperatorAnasazi::MultiVec

Projected Belos/Anasazi Status (Trilinos Release 5.0)  Belos:  Solvers: CG, BlockCG, BlockGMRES, and BlockFGMRES  Interfaces are defined for Epetra, NOX/LOCA, and TSFCore  Configurable via a Teuchos::ParameterList  Anasazi:  Solvers: Block Krylov-Schur Method and Modal Analysis Solvers (Davidson, Jacobi-Davidson, LOBPCG, etc…)  Interfaces are defined for Epetra, NOX/LOCA, and TSFCore  Abstract interface to sorting and orthogonalization (???)  Configurable via a Teuchos::ParameterList

Future Anasazi/Belos Development   Belos   Algorithms: FCG and BiCGSTAB   GMRES not necessary   Abstract orthogonalization class, user-determined Krylov subspace breakdown   Higher-level robust managers to orchestrate solvers   Anasazi   Algorithms: Restarted Preconditioned Eigensolver (RPE), Generalized Davidson   Abstract orthogonalization class, user-determined Krylov subspace breakdown   Higher-level robust managers to orchestrate solvers

Concluding Remarks (audience participation)  Are there any capabilities you may need from a linear/eigensolver that have not been addressed?  Do you have any questions, comments, or suggestions about the proposed user interface?  Are there any other solvers that you think would be useful?