An Overview of Belos and Anasazi October 16 th, 11-12am Heidi Thornquist Teri Barth Rich Lehoucq Mike Heroux Computational Mathematics and Algorithms Sandia.

Slides:



Advertisements
Similar presentations
Yafeng Yin, Lei Zhou, Hong Man 07/21/2010
Advertisements

1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
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.
ITEC113 Algorithms and Programming Techniques
MATH 685/ CSI 700/ OR 682 Lecture Notes
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Theoretical Program Checking Greg Bronevetsky. Background The field of Program Checking is about 13 years old. Pioneered by Manuel Blum, Hal Wasserman,
Next Generation Iterative Solvers: Belos & Anasazi Next Generation Iterative Solvers: Belos & Anasazi November 3 rd, 9:30-10:30am Mike Heroux Ulrich Hetmaniuk.
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.
Monica Garika Chandana Guduru. METHODS TO SOLVE LINEAR SYSTEMS Direct methods Gaussian elimination method LU method for factorization Simplex method of.
MOOCHO and TSFCore object-oriented software and interfaces for the development of optimization and other advanced abstract numerical algorithms Roscoe.
456/556 Introduction to Operations Research Optimization with the Excel 2007 Solver.
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.
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Using Belos: Next-generation Iterative Solvers November 6 th, 2007 Using Belos: Next-generation Iterative Solvers November 6 th, 2007 Mike Heroux Rich.
CS 591x – Cluster Computing and Programming Parallel Computers Parallel Libraries.
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 Numerical Algorithm Interoperability and Vertical Integration –Abstract Numerical Algorithms.
1 Using the PETSc Parallel Software library in Developing MPP Software for Calculating Exact Cumulative Reaction Probabilities for Large Systems (M. Minkoff.
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,
Chapter 3 Solution of Algebraic Equations 1 ChE 401: Computational Techniques for Chemical Engineers Fall 2009/2010 DRAFT SLIDES.
PDCS 2007 November 20, 2007 Accelerating the Complex Hessenberg QR Algorithm with the CSX600 Floating-Point Coprocessor Yusaku Yamamoto 1 Takafumi Miyata.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Performance Analysis Of Generics In Scientific Computing Laurentiu Dragan Stephen M. Watt Ontario Research Centre for Computer Algebra University of Western.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
1 Incorporating Iterative Refinement with Sparse Cholesky April 2007 Doron Pearl.
1 SciDAC TOPS PETSc Work SciDAC TOPS Developers Satish Balay Chris Buschelman Matt Knepley Barry Smith.
On the Use of Sparse Direct Solver in a Projection Method for Generalized Eigenvalue Problems Using Numerical Integration Takamitsu Watanabe and Yusaku.
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.
Parallel Solution of the Poisson Problem Using MPI
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.
Implementing Hypre- AMG in NIMROD via PETSc S. Vadlamani- Tech X S. Kruger- Tech X T. Manteuffel- CU APPM S. McCormick- CU APPM Funding: DE-FG02-07ER84730.
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.
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.
TI Information – Selective Disclosure Implementation of Linear Algebra Libraries for Embedded Architectures Using BLIS September 28, 2015 Devangi Parikh.
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.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
F. Fairag, H Tawfiq and M. Al-Shahrani Department of Math & Stat Department of Mathematics and Statistics, KFUPM. Nov 6, 2013 Preconditioning Technique.
What’s New for Epetra Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin.
Trilinos Overview and Future Plans Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a.
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.
Trilinos Software Engineering Technologies and Integration
RKPACK A numerical package for solving large eigenproblems
Presentation transcript:

An Overview of Belos and Anasazi October 16 th, 11-12am Heidi Thornquist Teri Barth Rich Lehoucq Mike Heroux Computational Mathematics and Algorithms 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  Solver design requirements  Belos and Anasazi  Current Status  Current Development  Teuchos  Arbitrary precision BLAS  Concluding remarks

Background  Several iterative linear solver / eigensolver libraries exist:  PETSc, SLAP, LINSOL, Aztec(OO), …  LOBPCG (hypre), ARPACK, …  None are written in C++  None of the linear solver libraries can efficiently deal with multiple right-hand sides  Current eigensolver libraries offer one algorithm for solving symmetric/non-symmetric eigenproblems

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 EpetraOperator.

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.

Some design requirements for Linear Solvers /Eigensolvers 1)Abstract interface to an operator-vector product (Op(A)v) and preconditioning (if necessary). 2)Ability to allow the user to enlist any linear algebra package for the elementary vector space operations essential to the algorithm 3)Ability to allow the user to define convergence of any algorithm (a.k.a. status testing). 4)Ability to allow the user to determine the verbosity level, formatting, and processor for the output. Generic programming

AlgorithmA( … ) while ( myStatusTest.GetStatus(…) != converged ) … % Compute operator-vector product myProblem.ApplyOp(NOTRANS,v,w);  = w.dot(v); … end myIO.print(something); return (solution); end Generic Algorithm Status Test Generic Problem Interface Generic Linear Algebra Interface IO Manager

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.

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. Interfaces are derived from these base classes to operator-vector products, status tests, and any arbitrary linear algebra library.  Includes block linear solvers (GMRES, CG, etc.) and eigensolvers (IRAM, etc.).  Release: Spring/Summer 2004

Why are Block Solvers Useful? (from an applications point of view)  Block Eigensolvers ( Op(A)X =  X ):  Block Linear Solvers ( Op(A)X = B ):  Reliably determine multiple and/or clustered eigenvalues.  Example applications: 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

Why are Block Solvers Useful? (from a computational point of view)  Remember: These are iterative solvers!  Solutions for block solvers are obtained through operator- multivector computations (Op(A)V).  However, single-vector iterative solvers use operator-vector computations (Op(A)v).  What’s the difference? BLAS Performance  Op(A)v is Level 1  Op(A)V is Level 2

Current Status (Trilinos Release 3.2d)  Belos:  Solvers: BlockCG and BlockGMRES  Interfaces are defined for Epetra and NOX/LOCA  BelosEpetraOperator allows for integration into other codes  Epetra interface accepts EpetraOperators, so can be used with ML, AztecOO, Ifpack, Belos, etc…  Block size is independent of number of right-hand sides  Anasazi:  Solver: Implicitly Restarted Arnoldi  Interfaces are defined for Epetra and NOX/LOCA  Can solve standard and generalized eigenproblems  Epetra interface accepts EpetraOperators, so can be used with Belos, AztecOO, etc…  Block size is independent of number of requested eigenvalues

Current Belos/Anasazi Development  LinearSolver / Eigensolver Class  LinearProblem / Eigenproblem Class  StatusTest Class  IOManager Class  Incorporate parameter lists ( developed in Teuchos ).  Replace current Belos/Anasazi abstract linear algebra classes with TSFCore abstract linear algebra classes.

Current Belos/Anasazi Development LinearSolver / Eigensolver Class  Provide an abstract interface to Belos/Anasazi solvers.  Methods:  Set Methods: SetProblem, SetParameters, SetStatusTester  Get Methods: GetProblem, GetParameters, GetStatusTester, currIteration  Solve Methods: Solve, Iterate  Auxilliary Method(s): Reset

Current Belos/Anasazi Development LinearProblem / Eigenproblem Class Belos  Allows preconditioning, scaling, etc. to be removed from the algorithm.  Methods:  Set Methods: SetOperator, SetLHS, SetRHS, SetL/RScale, SetL/RPrecond  Get Methods: GetOperator, GetLHS, GetRHS, GetL/RPrecond  Query Methods: IsL/RPrecond  Apply Methods: ApplyOperator Anasazi  Differentiates between standard and general eigenvalue problems.  Allows spectral transformations to be removed from the algorithm.  Methods:  Set Methods: SetInitVec, SetOperator, SetMatrixA, SetMatrixB  Get Methods: GetInitVec, GetOperator, GetMatrixA, GetMatrixB, GetEvals, GetEvecs, GetResids  Apply Methods: ApplyOperator, ApplyMatrixA, ApplyMatrixB  IP/Norm Methods: AInProd, BInProd, BMvNorm

Current Belos/Anasazi Development StatusTest Class  Similar to NOX / AztecOO.  Allows user to decide when solver is finished.  Multiple criterion can be logically connected.  Abstract base class methods:  StatusType CheckStatus( int currIteration, LinearProblem & myProblem );  StatusType CheckStatus( int currIteration, Eigenproblem & myProblem );  StatusType GetStatus() const;  ostream& Print( ostream& os ) const;  Derived classes  Maximum iterations/restarts, residual norm, combinations {AND,OR}, …

Current Belos/Anasazi Development IOManager Class  Allows user to control I/O processor, precision, and verbosity.  Methods:  Set Methods: void reset(Teuchos::ParameterList& myIOParams );  Query Methods: bool isPrintProc() const; bool isPrintLevel() const; bool isPrintProcLevel() const;  Output Methods: overload “<<“ operator using given precision.

Future Belos/Anasazi Algorithms Belos  CG/FCG  GMRES/FGMRES  BiCGSTAB Anasazi  LOBPCG  Restarted Preconditioned Eigensolver (RPE)  Generalized Davidson

Future Belos/Anasazi Features Belos  Preprocessing capabilities (CG)  User determined Krylov- subspace breakdown tolerances Anasazi  Preprocessing capabilties  User determined sorting  User determined Krylov- subspace breakdown tolerances

Belos / Anasazi Development (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?

Teuchos  Optional, lightweight utility package  Takes advantage of advanced features of C++:  Templates  Standard Template Library (STL)  Planned features:  Parameter list of arbitrary types (NOX)  Memory management package and error-handler (TSFCoreUtils)  Templated interfaces to BLAS, LAPACK, dense matrix (TPetra)  Command line and XML parsers, random number generators, and timers (TSF)

BLAS  Basic Linear Algebra Subroutines  Robust, high-performance dense vector-vector, matrix-vector, and matrix-matrix routines  Written in Fortran Fast and efficient Fortran is highly portable; however, the interface between it and C++ is platform-dependent  Templated C++ wrappers for the BLAS Fortran routines are created through autoconf.  Two main benefits of using a templated interface  Template Specialization: template specialization can be used to support the four native datatypes of existing Fortran BLAS code  General Implementation: a generic C++ implementation can be created to handle many arbitrary datatypes

Arbitrary Datatypes  Any datatype that defines zero, one, addition, subtraction, and multiplication can use nearly all BLAS functions  Some require square root or division  Example: ARPREC  arbitrary precision library that uses arrays of 64-bit floating-point numbers to represent high-precision floating-point numbers.  ARPREC values behave just like any other floating-point datatype, except the maximum working precision (in decimal digits) must be specified before any calculations are done mp::mp_init(200);  Illustrate the use of ARPREC with an example using Hilbert matrices.

Hilbert Matrices  A Hilbert matrix H N is a square N-by-N matrix such that:  Notoriously ill-conditioned  κ(H 3 )  524  κ(H 5 )   κ(H 10 )  x  κ(H 20 )  x  κ(H 100 )  x  Theoretically, Hilbert matrices are SPD

Cholesky Factorization and Hilbert Matrices  In practice, floating-point rounding error causes higher- order Hilbert matrices to no longer be positive definite  Cholesky factorization is often done to determine whether or not a given matrix is positive definite  As such, a Cholesky factorization will often fail on higher- order Hilbert matrices, even though such matrices “should” be positive definite PrecisionLargest N for which Cholesky Factorization is successful Single Precision8 Double Precision13 Arbitrary Precision (20)29 Arbitrary Precision (40)40 Arbitrary Precision (200)145 Arbitrary Precision (400)233*

Cholesky Factorization and Hilbert Matrices  In addition to providing a higher limit on N, using arbitrary precision reduces error.  By solving the linear system: where the vector b is constructed such that the true solution x is equal to a 1-vector we can look at the forward error.

Templated BLAS Conclusions  Adding a templated interface to the BLAS allows the use of arbitrary datatypes  This is useful in particular for the inclusion of arbitrary- precision arithmetic  Such arithmetic may be expensive, but the increased precision may be required for ill-conditioned problems  Arbitrary-precision arithmetic can be used in only the places where it is needed most in order to retain speed  Templated tools libraries are essential for the development of templated solver libraries.