® Backward Error Analysis and Numerical Software Sven Hammarling NAG Ltd, Oxford

Slides:



Advertisements
Similar presentations
Statistical Modeling of Feedback Data in an Automatic Tuning System Richard Vuduc, James Demmel (U.C. Berkeley, EECS) Jeff.
Advertisements

Computational Physics Linear Algebra Dr. Guy Tel-Zur Sunset in Caruaru by Jaime JaimeJunior. publicdomainpictures.netVersion , 14:00.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Solving Linear Systems (Numerical Recipes, Chap 2)
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
Chapter 2, Linear Systems, Mainly LU Decomposition.
1 On The Use Of MA47 Solution Procedure In The Finite Element Steady State Heat Analysis Ana Žiberna and Dubravka Mijuca Faculty of Mathematics Department.
1cs542g-term Notes  Assignment 1 will be out later today (look on the web)
1cs542g-term Notes  Assignment 1 is out (questions?)
Symmetric Eigensolvers in Sca/LAPACK Osni Marques
Symmetric Definite Generalized Eigenproblem
LAPACK HTML version LAPACK = Linear Algebra PACKage ~ LINPACK + EISPACK
Parallel & Cluster Computing Linear Algebra Henry Neeman, Director OU Supercomputing Center for Education & Research University of Oklahoma SC08 Education.
1 An Introduction to the Quality of Computed Solutions Sven Hammarling NAG Ltd, Oxford
STRATEGIES INVOLVED IN REMOTE COMPUTATION
Antonio M. Vidal Jesús Peinado
MUMPS A Multifrontal Massively Parallel Solver IMPLEMENTATION Distributed multifrontal.
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Numerical Linear Algebra IKI Course outline Review linear algebra Square linear systems Least Square Problems Eigen Problems Text: Applied Numerical.
Supercomputing in Plain English Grab Bag: Scientific Libraries, I/O Libraries, Visualization PRESENTERNAME PRESENTERTITLE PRESENTERDEPARTMENT PRESENTERINSTITUTION.
CS 591x – Cluster Computing and Programming Parallel Computers Parallel Libraries.
Tuning Libraries to Effectively Exploit Memory Prof. Misha Kilmer Emily Reid Stacey Ecott.
1 Intel Mathematics Kernel Library (MKL) Quickstart COLA Lab, Department of Mathematics, Nat’l Taiwan University 2010/05/11.
1 Jack Dongarra University of Tennesseehttp://
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
Supercomputing in Plain English Grab Bag: Scientific Libraries, I/O Libraries, Visualization Henry Neeman, Director OU Supercomputing Center for Education.
Parallel & Cluster Computing Grab Bag Henry Neeman, Director OU Supercomputing Center for Education & Research University of Oklahoma SC08 Education Program’s.
1 Using the PETSc Parallel Software library in Developing MPP Software for Calculating Exact Cumulative Reaction Probabilities for Large Systems (M. Minkoff.
1 “How Can We Address the Needs and Solve the Problems in HPC Benchmarking?” Jack Dongarra Innovative Computing Laboratory University of Tennesseehttp://
Supercomputing in Plain English Scientific Libraries and I/O Libraries National Computational Science Institute Intermediate Parallel Programming & Cluster.
Using Partitioning in the Numerical Treatment of ODE Systems with Applications to Atmospheric Modelling Zahari Zlatev National Environmental Research Institute.
Progress report on the alignment of the tracking system A. Bonissent D. Fouchez A.Tilquin CPPM Marseille Mechanical constraints from optical measurement.
Supercomputing and Science An Introduction to High Performance Computing Part VII: Scientific Computing Henry Neeman, Director OU Supercomputing Center.
Supercomputing in Plain English Supercomputing in Plain English Grab Bag Henry Neeman Director OU Supercomputing Center for Education & Research December.
PDCS 2007 November 20, 2007 Accelerating the Complex Hessenberg QR Algorithm with the CSX600 Floating-Point Coprocessor Yusaku Yamamoto 1 Takafumi Miyata.
Supercomputing in Plain English Part IX: Grab Bag Henry Neeman, Director OU Supercomputing Center for Education & Research University of Oklahoma Wednesday.
Programming assignment #2 Solving a parabolic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Accelerating the Singular Value Decomposition of Rectangular Matrices with the CSX600 and the Integrable SVD September 7, 2007 PaCT-2007, Pereslavl-Zalessky.
Presented by The Lapack for Clusters (LFC) Project Piotr Luszczek The MathWorks, Inc.
Numerical Libraries Project Microsoft Incubation Group Mary Beth Hribar Microsoft Corporation CSCAPES Workshop June 10, 2008 Copyright Microsoft Corporation,
On the Use of Sparse Direct Solver in a Projection Method for Generalized Eigenvalue Problems Using Numerical Integration Takamitsu Watanabe and Yusaku.
Supercomputing in Plain English An Introduction to High Performance Computing Part VII:Grab Bag Henry Neeman, Director OU Supercomputing Center for Education.
Parallel Programming & Cluster Computing Grab Bag: Scientific Libraries, I/O Libraries, Visualization Henry Neeman, Director OU Supercomputing Center for.
Parallel & Cluster Computing 2005 Scientific Libraries Paul Gray, University of Northern Iowa David Joiner, Kean University Tom Murphy, Contra Costa College.
Lecture 4 Sparse Factorization: Data-flow Organization
Introduction to GAMS, Netlib, Numerical Recipes CS 3414.
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 07 Chapter 7: Eigenvalues, Eigenvectors.
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.
Direct Methods for Sparse Linear Systems Lecture 4 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen.
Chapter 9 Gauss Elimination The Islamic University of Gaza
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA
Announcements Read Chapters 11 and 12 (sections 12.1 to 12.3)
1 Chapter 7 Numerical Methods for the Solution of Systems of Equations.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Toward an Automatically Tuned Dense Symmetric Eigensolver for Shared Memory Machines Yusaku Yamamoto Dept. of Computational Science & Engineering Nagoya.
Parallel Programming & Cluster Computing Grab Bag: Scientific Libraries, I/O Libraries, Visualization Henry Neeman, University of Oklahoma Charlie Peck,
Performance of BLAS-3 Based Tridiagonalization Algorithms on Modern SMP Machines Yusaku Yamamoto Dept. of Computational Science & Engineering Nagoya University.
Parallel Programming & Cluster Computing Linear Algebra Henry Neeman, University of Oklahoma Paul Gray, University of Northern Iowa SC08 Education Program’s.
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Singular Value Decomposition and Numerical Rank. The SVD was established for real square matrices in the 1870’s by Beltrami & Jordan for complex square.
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA Shirley Moore CPS5401 Fall 2013 svmoore.pbworks.com November 12, 2012.
On Computing Multiple Eigenvalues, the Jordan Structure and their Sensitivity Zhonggang Zeng Northeastern Illinois University Sixth International Workshop.
Intro to Scientific Libraries Intro to Scientific Libraries Blue Waters Undergraduate Petascale Education Program May 29 – June
Progress Report—11/13 宗慶. Problem Statement Find kernels of large and sparse linear systems over GF(2)
A survey of Exascale Linear Algebra Libraries for Data Assimilation
Chapter 2, Linear Systems, Mainly LU Decomposition
Linear Systems, Mainly LU Decomposition
Parallel Programming & Cluster Computing Grab Bag
CHAPTER OBJECTIVES The primary objective of this chapter is to show how to compute the matrix inverse and to illustrate how it can be.
Presentation transcript:

® Backward Error Analysis and Numerical Software Sven Hammarling NAG Ltd, Oxford

Plan of Talk Introduction –Stability –Error analysis –Condition The Basic Linear Algebra Subprograms (BLAS) LAPACK: state of the art Linear Algebra PACKage ScaLAPACK: distributed memory version of LAPACK (Scalable LAPACK) Other Aspects Summary

Stability The stability of a method for solving a problem is concerned with the sensitivity of the method to (rounding) errors in the solution process A method that guarantees as accurate a solution as the data warrants is said to be stable, otherwise the method is unstable

Example - Sample Variance

Error Analysis Error analysis is concerned with establishing whether or not an algorithm is stable for the problem in hand A forward error analysis is concerned with how close the computed solution is to the exact solution A backward error analysis is concerned with how well the computed solution satisfies the problem to be solved

Example

Example (cont’d)

Componentwise and Normwise

Condition The condition of a problem is concerned with the sensitivity of the problem to perturbations in the data A problem is ill-conditioned if small changes in the data cause relatively large changes in the solution. Otherwise a problem is well- conditioned

® Example

Condition Number for Linear Equations

Condition and Error Analysis

Example

Backward Error as Perturbations in the Data

Backward Error as … (cont’d)

Example

Backward Error Analysis

Backward Error and Perturbation Analysis

The Purpose of Error Analysis “The clear identification of the factors determining the stability of an algorithm soon led to the development of better algorithms. The proper understanding of inverse iteration for eigenvectors and the development of the QR algorithm by Francis are the crowning achievements of this line of research. “For me, then, the primary purpose of the rounding error analysis was insight.” Wilkinson, 1986 Bulletin of the IMA, Vol 22, p197

LAPACK and Error Bounds “In Addition to providing faster routines than previously available, LAPACK provides more comprehensive and better error bounds. Our goal is to provide error bounds for most quantities computed by LAPACK.” LAPACK Users’ Guide, Chapter 4 – Accuracy and Stability

The BLAS, LAPACK and ScaLAPACK

The Three Levels of BLAS The Level 1 BLAS are concerned with scalar and vector operations, such as the Level 2 BLAS with matrix-vector operations such as and the Level 3 BLAS with matrix-matrix operations such as

Why Higher Level BLAS? Registers L1 Cache L2 Cache Local Memory Remote Memory Secondary Memory BLASMem RefsOpsRatio Level 1 Level 2 Level 3 3 : 2 1 : 2 2 : n 2n2n 2n22n2 2n32n3 3n3n n2n2 4n24n2 The so called ‘surface to volume’ effect

BLAS for Performance Level 3 BLAS Level 2 BLAS Level 1 BLAS

Publication of the Specifications of the BLAS [1] C L. Lawson, R. J. Hanson, D. Kincaid, and F. T. Krogh. Basic Linear Algebra Subprograms for FORTRAN usage. ACM Trans. Math. Software, 5: , [2] J. J. Dongarra, J. Du Croz, S. Hammarling, and R. J. Hanson. An extended set of FORTRAN Basic Linear Algebra Subprograms. ACM Trans. Math. Software, 14:1-32, 399, (Algorithm 656). [3] J. J. Dongarra, J. Du Croz, I. S. Duff, and S. Hammarling. A set of Level 3 Basic Linear Algebra Subprograms. ACM Trans. Math. Software, 16:1-28, (Algorithm 679).

LAPACK Systems of linear equations Linear least squares problems Eigenvalue and singular value problems, including generalized problems Matrix factorizations Condition and error estimates The BLAS as a portability layer Linear Algebra PACKage for high-performance computers Dense and banded linear algebra for Shared Memory

Benefits of LAPACK Comprehensive and consistent set of routines for dense and banded linear algebra Efficient on a wide range of modern computers Additional functionality compared to previous packages Improved numerical algorithms Error and sensitivity estimates Portability layer between users applications and the machines

LAPACK Users’ Guide E. Anderson, Z. Bai, C. Bischof S. Blackford, J. Demmel, J. Dongarra J. Du Croz, A. Greenbaum, S. Hammarling A. McKenney, D. Sorensen SIAM, 1999 (3rd Edition) Proceeds to SIAM student travel fund L A P A C K L -A P -A C -K L A P A -C -K L -A P -A -C K L A -P -A C K L -A -P A C -K

1/4 1/L 1/L 1/L 1/L 1/A -1/A 1/A -1/A 1/P 1/P -1/P -1/P 1/A -1/A -1/A 1/A 1/C 1/C -1/C -1/C 1/K -1/K -1/K 1/K

Performance Improvements Efficiency in LAPACK has been principally achieved by restructuring algorithms so that as much computation as possible is performed by calls to: Level 3 and Level 2 BLAS In order to exploit the Level 3 BLAS we needed: BLOCK-PARTITIONED ALGORITHMS a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 A 11 A 12 A 13 A 21 A 22 A 23 A 31 A 32 A 33

Error Bounds in LAPACK The Users’ Guide gives details of error bounds and code fragments to compute those bounds. In many cases the routines return the bounds directly

Error Bounds in LAPACK: Example 1

Error Bounds in LAPACK: Example 2

Error Bounds in LAPACK: Example 2 (cont’d) Asymptotic error bounds for nonsymmetric eigenproblem See Golub and Van Loan – Matrix Computations

Error Bounds in LAPACK: Example 2 (cont’d) EPSMCH = DLAMCH(‘E’) DO 10 I = 1, N EERRBD(I) = EPSMCH*ABNRM/RCONDE(I) VERRBD(I) = EPSMCH*ABNRM/RCONDV(I) 10 CONTINUE EPSMCH is the machine precision

Availability of LAPACK LAPACK is freely available via netlib: Much of LAPACK is included in the NAG Fortran 77 Library and is the basis of the dense linear algebra in the NAG Fortran 90 Library Tuned versions of some LAPACK routines are in the NAG Fortran SMP Library

LAPACK - Summary LAPACK success from HP-48G to Cray T-90 Portable Fortran 77 (+BLAS), 766K lines (354K library, 412K testing and timing) PCs, workstations, vector machines, and shared memory computers Initial release February 29th, 1992 Now on the 3 rd release Linear systems, least squares, eigenproblems C, Java and Fortran 95 interfaces

ScaLAPACK Scalability, performance and portability Interfaces to stay as close to LAPACK as possible Use LAPACK algorithms wherever possible Principal additional consideration is the data distribution The PBLAS (BLAS + BLACS) as a portabilility layer Scalable Linear Algebra PACKage Aim: To port LAPACK to distributed memory environments As with LAPACK, ScaLAPACK is freely available: Most of ScaLAPACK included in NAG Parallel Library

ScaLAPACK Structure ScaLAPACK BLAS LAPACK BLACS PVM/MPI/... PBLAS Global Local

ScaLAPACK Summary Follow on to LAPACK - Designed for MPP’s Object based design Portability across wide range of architectures –will work on a heterogeneous platform Software, examples, prebuilt libraries available from netlib Users’ Guide, including CD available from SIAM Continuing development HPF interface to some driver routines available

Hierarchy of Building Blocks Users Applications Packages (Sca)LAPACK (P)BLAS Machines

Developments Since Wilkinson More problems solved, tighter bounds More emphasis on componentwise results – particularly for sparse and structured problems Use of standard precision iterative refinement Importance of scaling Iterative methods Importance of non-normality and pseudospectra

Diagonal Matrix Example

Backward Errors in Other Areas For references to other areas see: Higham, Accuracy and Stability of Numerical Algorithms, Sections 1.20 & Examples: –ODEs –Chaotic behaviour of iterations

What to do if Software does not Provide Estimates? Run the problem with perturbed data Better still, use a software tool such as PRECISE which allows you to perform a stochastic analysis Put pressure on developers to provide estimates

PRECISE Provides a module for statistical backward error analysis Provides a module for sensitivity analysis index.html

Quality of Reliable Software

References [1] E. Anderson, Z. Bai, C. H. Bischof, J. Demmel, J. J. Dongarra, J. Du Croz, A. Greenbaum, S. Hammarling, A. McKenney, S. Blackford & D. C. Sorensen. LAPACK Users’ Guide, 3 rd Edition, SIAM, [2] F. Chaitin-Chatelin & V. Frayssé. Lectures on Finite Precision Computations, SIAM, [3] G. H. Golub & C. F. Van Loan. Matrix Computations, 3 rd Edition, The Johns Hopkins University Press, [4] N. J. Higham. Accuracy and Stability of Numerical Algorithms, SIAM, 1996.

® Closing Remarks LAPACK and ScaLAPACK provide efficient and reliable portable software for numerical linear algebra Emphasis has been placed on error and condition (sensitivity) estimates Research and development is ongoing Available via the NAG Libraries Expect error estimates from numerical software Use software tools