on evaluating computational cost and approximation error
play

On evaluating computational cost and approximation error in linear - PowerPoint PPT Presentation

On evaluating computational cost and approximation error in linear algebraic iterative solvers Jrg Liesen Technical University of Berlin and Zden ek Strako Charles University in Prague http://www.karlin.mff.cuni.cz/strakos FoCM,


  1. On evaluating computational cost and approximation error in linear algebraic iterative solvers Jörg Liesen Technical University of Berlin and Zdenˇ ek Strakoš Charles University in Prague http://www.karlin.mff.cuni.cz/˜strakos FoCM, Budapest, July 2011

  2. Main points ● In iterative methods applied to linear algebraic problems, computational cost of finding sufficiently accurate approximation to the exact solution heavily depends on the particular data. ● Any evaluation of cost in iterative computations must take into account effects of rounding errors. ● In mathematical modeling of real world phenomena, the accuracy of the computed approximation must be related to the underlying mathematical model, i.e., its evaluation can not be restricted to algebra. Z. Strakoš 2

  3. HPD, x 0 , r 0 , p 0 = r 0 Conjugate Gradients: A � x − x n � A = u ∈ x 0 + K n ( A,r 0 ) � x − u � A min K n ( A, r 0 ) ≡ span { r 0 , Ar 0 , · · · , A n − 1 r 0 } For n = 1 , 2 , . . . γ n − 1 = ( r n − 1 , r n − 1 ) / ( p n − 1 , Ap n − 1 ) x n = x n − 1 + γ n − 1 p n − 1 r n = r n − 1 − γ n − 1 Ap n − 1 δ n = ( r n , r n ) / ( r n − 1 , r n − 1 ) p n = r n + δ n p n − 1 . Hestenes and Stiefel (1952) Z. Strakoš 3

  4. CG and Gauss-Christoffel quadrature � U n � − 1 ( λ ) − 1 dω ( λ ) � ω ( n ) θ ( n ) � = + R n ( f ) i i L i =1 � x − x 0 � 2 n -th Gauss quadrature + � x − x n � 2 A A = � r 0 � 2 � r 0 � 2 n − 1 � γ j � r j � 2 j =0 CG : model reduction matching 2 n moments Golub, Meurant, Reichel, Boley, Gutknecht, Saylor, Smolarski, ......... , Meurant and S (2006), Golub and Meurant (2010), S and Tichý (2011) Z. Strakoš 4

  5. Outline 1. Linear bounds for the nonlinear method? 2. Do we know how to evaluate the computational error? 5 Z. Strakoš

  6. Thanks André Gaul, Jan Papež, Tomáš Gergelits. Z. Strakoš 6

  7. 1 Linear bounds for the nonlinear method? � A 1 / 2 p ( A )( x − x 0 ) � � x − x n � A = min p (0)=1 deg( p ) ≤ n � Y p (Λ) Y ∗ A 1 / 2 ( x − x 0 ) � = min p (0)=1 deg( p ) ≤ n � � ≤ min 1 ≤ j ≤ N | p ( λ j ) | max � x − x 0 � A p (0)=1 deg( p ) ≤ n Using the shifted Chebyshev polynomials on the interval [ λ 1 , λ N ] , � n �� κ ( A ) − 1 � x − x n � A ≤ 2 � x − x 0 � A . � κ ( A ) + 1 7 Z. Strakoš

  8. 1 Linear bounds for the nonlinear method? This bound should not be used in connection with the behaviour of CG unless κ ( A ) = λ N /λ 1 is really small or unless the (very special) distribution of eigenvalues makes it relevant. In particular, one should be very careful while using it as a part of a composite bound in the presence of the large outlying eigenvalues � � T n − s ( λ j ) | � � min 1 ≤ j ≤ N | q s ( λ j ) p ( λ j ) | max ≤ 1 ≤ j ≤ N | q s ( λ j ) | max � � T n − s (0) p (0)=1 � � deg( p ) ≤ n − s � � T n − s ( λ j ) � � < max � . � � T n − s (0) 1 ≤ j ≤ N − s � Meinardus (Chebyshev polynomial) bound on the interval [ λ 1 , λ N − s ] is then valid after s initial steps. Z. Strakoš 8

  9. q s ( λ ) 1 The polynomial has desired roots 5 4 3 2 1 0 −1 −2 −3 T 4 (x) −4 T 5 (x) −5 0 10 20 30 40 50 60 70 80 90 The Chebyshev polynomials T 4 ( λ ) , T 5 ( λ ) , and the polynomial q 1 ( λ ) , q 1 (0) = 1 having the single root at the large outlying eigenvalue. Z. Strakoš 9

  10. 1 Quote (2009, ... ): the desired accuracy ǫ Theorem. After � � � ln(2 /ǫ ) λ N − s k = s + 2 λ 1 iteration steps the CG will produce the approximate solution x n satisfying � x − x n � A ≤ ǫ � x − x 0 � A . This recently republished and used statement is in finite precision arithmetic not true at all. Z. Strakoš 10

  11. 1 Mathematical model of FP CG CG in finite precision arithmetic can be seen as the exact arithmetic CG for the problem with the slightly modified distribution function with larger support, i.e., with single eigenvalues replaced by tight clusters. Paige (1971 -80), Greenbaum (1989), Parlett (1990), S (1991), Greenbaum and S (1992), Notay (1993), ... , Druskin, Knizhnermann, Zemke, Wülling, Meurant, ... Recent review and update in Meurant and S, Acta Numerica (2006). Fundamental consequence: In FP computations, the composite convergence bounds eliminating in exact arithmetic large outlying eigenvalues at the cost of one iteration per eigenvalue do not, in general, work. Z. Strakoš 11

  12. 1 Axelsson (1976), quote Jennings (1977) p. 72: ... it may be inferred that rounding errors ... affects the convergence rate when large outlying eigenvalues are present. Z. Strakoš 12

  13. 1 The composite bounds completely fail 5 0 10 10 0 10 −5 10 −5 10 −10 10 −10 10 −15 −15 10 10 50 100 150 200 50 100 150 200 Composite bounds with varying number of outliers (left) and the failure of the composed bounds in FP CG (right), Gergelits (2011). Z. Strakoš 13

  14. 2 PDE discretization and matrix computations − ∆ u = 16 η 1 η 2 (1 − η 1 )(1 − η 2 ) on the unit square with zero Dirichlet boundary conditions. Galerkin finite element method (FEM) discretization with linear basis functions on a regular triangular grid with the mesh size h = 1 / ( m + 1) , where m is the number of inner nodes in each direction. Discrete solution N � u h = ζ j φ j ( η 1 , η 2 ) . j =1 Up to a small inaccuracy proportional to machine precision, h ) � 2 = �∇ ( u − u h ) � 2 + �∇ ( u h − u ( n ) �∇ ( u − u ( n ) h ) � 2 = �∇ ( u − u h ) � 2 + � x − x n � 2 A . Z. Strakoš 14

  15. 2 Solution and the discretization error Discretisation error u−u h −4 Exact solution u of the PDE x 10 3 0.9 0.8 0.7 2 0.6 0.5 0.4 1 0.3 0.2 0.1 0 0 0 0.2 0 0.4 1 0.2 0.8 0.4 0.6 1 0.6 0.8 0.8 0.4 0.6 0.6 0.2 1 0.8 0.4 0 0.2 1 0 Exact solution u of the Poisson model problem (left) and the MATLAB trisurf plot of the discretization error u − u h (right). Z. Strakoš 15

  16. 2 Algebraic and total errors CG with c=1 and α =3 CG with c=1 and α =3 Algebraic error u h −u h Total error u−u −4 −4 h x 10 x 10 10 6 8 4 6 2 4 0 2 −2 0 −4 −2 −4 −6 0 0 0.2 0.2 0.4 1 0.4 1 0.8 0.8 0.6 0.6 0.6 0.6 0.8 0.4 0.8 0.4 0.2 0.2 1 0 1 0 Algebraic error u h − u ( n ) (left) and the MATLAB trisurf plot of the total h error u − u ( n ) (right) h �∇ ( u − u ( n ) h ) � 2 �∇ ( u − u h ) � 2 � x − x n � 2 = + A = 5 . 8444 e − 03 + 1 . 4503 e − 05 . Z. Strakoš 16

  17. 2 Algebraic and total errors CG with c=0.5 and α =3 CG with c=0.5 and α =3 Total error u−u Algebraic error u h −u h −4 −5 x 10 h x 10 8 3 6 4 2 2 0 −2 1 −4 −6 0 0 0 0.2 0.2 0.4 1 0.4 1 0.8 0.6 0.8 0.6 0.6 0.6 0.8 0.4 0.8 0.4 0.2 1 0.2 0 1 0 Algebraic error u h − u ( n ) (left) and the MATLAB trisurf plot of the total h error u − u ( n ) (right) h �∇ ( u − u ( n ) h ) � 2 �∇ ( u − u h ) � 2 � x − x n � 2 = + A = 5 . 8444 e − 03 + 5 . 6043 e − 07 . Z. Strakoš 17

  18. 2 One can see 1D analogy −3 Errors with the algebraic normwise backward error 6.6554e−017 x 10 −3 Errors with the algebraic normwise backward error 0.0020031 3 x 10 10 alg.error alg.error tot. error 2.5 tot. error 8 2 6 1.5 4 1 2 0.5 0 0 −2 −0.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 The discretization error (left), the algebraic and the total error (right), Papež (2011). Z. Strakoš 18

  19. Challenges ● Using a formula from literature requires understanding of the whole context. Rounding errors can not be ignored. ● Numerical PDE: Matrix computations do not provide exact results. Verification in scientific and engineering computing should take this into account. Whenever possible, one should aim at the local distribution of the total error. Norms can hide important things. ● Algebra: Error should be evaluated in the function space. The backward error analysis and perturbation theory seems not sufficient. ● Both: Local distribution of the discretization and the algebraic errors can be very different. The algebraic computation can not be considered a black box part of the whole solution process. It must be integrated (from both sides) into it. Liesen and S (2011), Liesen and S (201X) Z. Strakoš 19

  20. Thank you for your kind patience Z. Strakoš 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend