Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interface for Eigenvalue Methods John Wu Lawrence Berkeley National Laboratory

Similar presentations


Presentation on theme: "Interface for Eigenvalue Methods John Wu Lawrence Berkeley National Laboratory"— Presentation transcript:

1 Interface for Eigenvalue Methods John Wu Lawrence Berkeley National Laboratory john.wu@nersc.gov kwu@lbl.gov

2 Outline Review eigenvalue methodsReview eigenvalue methods Examine existing schemesExamine existing schemes Explore possible alternativesExplore possible alternatives

3 Types of Eigenvalue Problems Standard: Ax = xStandard: Ax = x Generalized: Ax = BxGeneralized: Ax = Bx Polynomial: -Ax+ B 1 x+ 2 B 2 x+…=0Polynomial: -Ax+ B 1 x+ 2 B 2 x+…=0 Constrains: Cx=0Constrains: Cx=0

4 Types of Methods QR based methods (direct methods)QR based methods (direct methods) –Need to access the elements of the matrix –O(n 2 ) space complexity –O(n 3 ) time complexity Projection based methods (iterative)Projection based methods (iterative) –Access matrix through MATVEC –Problem dependent space and time need

5 Existing Software QR methods LAPACKLAPACK EISPACKEISPACK ScaLAPACKScaLAPACK PLAPACKPLAPACK Projection methods ARPACKARPACK LANSO, LASO, LANZ, LANCZOS …LANSO, LASO, LANZ, LANCZOS … Davidson method, JDQZ, …Davidson method, JDQZ, … RITZITRITZIT CG,CG,

6 Specifying an Eigenvalue Problem Matrices: A, B, A -1, (A-  B) -1 B, B -1 AMatrices: A, B, A -1, (A-  B) -1 B, B -1 A Type of eigenvalues: largest, smallest, around a center, in a rangeType of eigenvalues: largest, smallest, around a center, in a range Number of eigenvaluesNumber of eigenvalues Are eigenvectors needed as wellAre eigenvectors needed as well

7 Specifying an Eigenvalue Problem -- Computing Issues Representations of matrices, eigenvalues and eigenvectorsRepresentations of matrices, eigenvalues and eigenvectors Interface to MATVEC and preconditionerInterface to MATVEC and preconditioner Accuracy (reliability) requirementAccuracy (reliability) requirement Resource constrainsResource constrains Controlling parametersControlling parameters

8 netlib.org/lapack Case Study I -- LAPACK SSYEVX(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO) QR based methodQR based method Representing matrices as arrays (1-D)Representing matrices as arrays (1-D) User provide workspaceUser provide workspace User must set all optionsUser must set all options

9 ftp://ftp.caam.rice.edu/ pub/software/ARPACK Case Study II -- ARPACK DNAUPD(COMM, IDO, BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD, WORKL, LWORKL, INFO) Implicitly restarted Arnoldi methodImplicitly restarted Arnoldi method Reverse communication for MATVECReverse communication for MATVEC Arguments are arrays (1-D)Arguments are arrays (1-D) User provides workspaceUser provides workspace

10 lbl.gov/~kwu Case Study III -- TRLAN TRLAN(OP, INFO, NROW, MEV, EVAL, EVEC, LDE) thick-restart Lanczos methodthick-restart Lanczos method MATVEC (OP) has a prescribed interfaceMATVEC (OP) has a prescribed interface eigenvalues/eigenvectors are arrayseigenvalues/eigenvectors are arrays use Fortran 90 TYPE (INFO) to store controlling parametersuse Fortran 90 TYPE (INFO) to store controlling parameters

11 Case Study IV -- ARPACK++ #include “areig.h” Nconv = areig(EigValR, EigValI, EigVec, n, nnz, A, inrow, pcol, nev); Based on ARPACKBased on ARPACK Simple data structures for matrix, eigenvalues and eigenvectorsSimple data structures for matrix, eigenvalues and eigenvectors ftp://ftp.caam.rice.edu/ pub/software/ARPACK

12 Case Study V -- RogueWave #include #include DoubleEigDecomp eig(a); QR based methodsQR based methods Solution stored in eig objectSolution stored in eig object Eig.eigenValues() for eigenvaluesEig.eigenValues() for eigenvalues www.roguewave.com

13 Two Basic Strategies Eigenvalue function Closer to traditional librariesCloser to traditional libraries Explicit arguments for eigenvalue and eigenvectorExplicit arguments for eigenvalue and eigenvector May be an interface of a matrix classMay be an interface of a matrix class Decomposition class Computation is hiddenComputation is hidden Contains functions to output eigenvalues, etcContains functions to output eigenvalues, etc Decomposition is an objectDecomposition is an object

14 Basic Data Elements Eigenvalue function MatricesMatrices Eigenvalue and eigenvector are function argumentsEigenvalue and eigenvector are function arguments Controlling parameters are function argumentsControlling parameters are function arguments Decomposition class MatricesMatrices Eigenvalue and eigenvector stored internallyEigenvalue and eigenvector stored internally Controlling parameters set by member functionControlling parameters set by member function

15 Interaction With Other Components Eigenvalue function Reverse communication or function pointer or direct access to the matricesReverse communication or function pointer or direct access to the matrices Decomposition class Function pointer (functor) or direct access to matricesFunction pointer (functor) or direct access to matrices External functions must use prescribed interfaceExternal functions must use prescribed interface

16 Feature Comparison Eigenvalue Class always has a decompose function, but it may not be public

17 Relation With Equation Solvers Share the same basic elements: vector, multi-vector, matricesShare the same basic elements: vector, multi-vector, matrices Share the same external/user-supplied functions: MATVEC, preconditionerShare the same external/user-supplied functions: MATVEC, preconditioner Eigenvalue solver may use equation solverEigenvalue solver may use equation solver

18 Relation With Existing Software Existing matrix libraries may be used to specify basic data elementsExisting matrix libraries may be used to specify basic data elements Existing Fortran/C libraries may be used to perform the actual computationsExisting Fortran/C libraries may be used to perform the actual computations Should make it easy to interact with existing frameworks, e.G., POOMAShould make it easy to interact with existing frameworks, e.G., POOMA

19 Future Work Reviewing other OO eigenvalue softwareReviewing other OO eigenvalue software Concrete interface specificationConcrete interface specification Data structure of the basic elementsData structure of the basic elements Interface of MATVEC and preconditionerInterface of MATVEC and preconditioner


Download ppt "Interface for Eigenvalue Methods John Wu Lawrence Berkeley National Laboratory"

Similar presentations


Ads by Google