1 / 17

An Overview of Belos and Anasazi Framework for Block Linear Solvers / Eigensolvers

An Overview of Belos and Anasazi Framework for Block Linear Solvers / Eigensolvers. Copper Mountain Conference on Iterative Methods Tuesday, March 30 th 2004 Mike Heroux Ulrich Hetmaniuk Rich Lehoucq Heidi Thornquist Computational Mathematics & Algorithms Sandia National Laboratories.

tyrone
Télécharger la présentation

An Overview of Belos and Anasazi Framework for Block Linear Solvers / Eigensolvers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Overview of Belos and AnasaziFramework for Block Linear Solvers / Eigensolvers Copper Mountain Conference on Iterative Methods Tuesday, March 30th 2004 Mike Heroux Ulrich Hetmaniuk Rich Lehoucq Heidi Thornquist Computational Mathematics & Algorithms Sandia National Laboratories 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. Outline • Background • AztecOO and ARPACK • SLEPc • Solver design requirements • Belos and Anasazi • Current Status • Future Development • Concluding remarks

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

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

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

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

  7. Linear/Eigensolver Software Design Generic programming Why not create a solver library that: • 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.) • 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.

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

  9. Benefits of Generic Programming • Generic programming techniques ease the implementation of complex algorithms. • Developing algorithms with generic programming techniques is easier on the developer, while still allowing them to build a flexible and powerful software package. • Generic programming techniques also allow the user to leverage their existing software investment.

  10. New Packages: Belos and Anasazi • Next generation linear solver (Belos) and eigensolver (Anasazi) libraries, written in templated C++. • Provide a generic interface to a collection of algorithms for solving 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 and eigensolvers. • Release Dates: • Internal (SNL): April 2004 • External (Public): October 2004

  11. Why are Block Solvers Useful? • Achieve better performance for operator-vector products. • Block Solvers ( in general ): • Block Eigensolvers ( Op(A)X = X ): • Block Linear Solvers ( Op(A)X = B ): • Reliably determine multiple and/or clustered eigenvalues. • Example applications: • Stability analysis / Modal 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

  12. Current Status • Belos • Solvers: BlockGMRES and BlockCG • Block size is independent of number of right-hand sides • BelosEpetraOperator allows for integration into other codes • Anasazi • Templated Solver: Block Krylov-Schur (Stewart, 2000) • Modal Analysis Solvers: Davidson’s Method, Jacobi-Davidson (Sleijpen and van der Vorst, 1996), and LOBPCG (Knyazev, 2000) • Block size is independent of number of requested eigenvalues • Can solve standard and generalized eigenproblems • Interfaces are defined for Epetra and NOX/LOCA • Epetra interface accepts EpetraOperators, so can be used with ML, AztecOO, Ifpack, Belos, etc…

  13. Current Linear Algebra Interface • MultiVector class • An abstract interface to define the linear algebra required by most linear solvers / eigensolvers : • clone methods • dot product • update methods • norms • initialize / randomize • LinearOperator class • An abstract interface to define the linear operator inferface required by most linear solvers /eigensolvers : • apply methods

  14. Current Solver Interface • IterativeSolver / Eigensolver class • Provide an abstract interface to Belos / Anasazi solvers • LinearProblem / Eigenproblem class • Removes the need for the algorithm to deal with preconditioning, scaling, spectral transformations, etc. • StatusTest class • Allows user to decide when the solver is finished by one or multiple, logically-connected criteria • Maximum iterations/restarts, residual norms, or “create-your-own” using the abstract base class • OutputManager class • Allows user to control output processor and verbosity.

  15. Belos BlockCG Example [ Include headers, construct matrix(A)/vector(b) in native linear algebra ] … Belos::MyLinOp<double> Amat( A ); Belos::MyMultiVec<double> rhs( b, numrhs ); Belos::MyMultiVec<double> soln( numrhs ); Belos::StatusTestMaxIters<double> test1( maxits ); Belos::StatusTestResNorm<double> test2( tol ); Belos::StatusTestCombo<double> My_Test( Belos::StatusTestCombo<double>::OR, test1, test2 ); Belos::LinearProblemManager<double> My_LP( &Amat, &soln, &rhs ); My_LP.SetBlockSize( block ); My_LP.SetStatusTest( My_Test ); Belos::OutputManager<double> My_OM( MyPID ); Belos::BlockCG<double> MyBlockCG(My_LP, My_OM); MyBlockCG.Iterate(); … [ Extract solution vector (x) and continue calculations ]

  16. Future Algorithms / Interface Structure • Belos • Solvers: CG/FCG, GMRES/FGMRES, BiCGSTAB, and TFQMR • Preprocessing capabilities (CG) • Anasazi • Templated Solvers: Davidson’s Method, Jacobi-Davidson, and LOBPCG • Preprocessing capabilities • Abstract sorting / spectral transformation interface. • Incorporate parameter lists • Abstract orthogonalization interface • User-determined breakdown tolerances • Support complex / extended-precision arithmetic

  17. Questions or Comments ? Thanks for your attention! Goodnight!

More Related