Download presentation
Presentation is loading. Please wait.
Published byColleen Dean Modified over 9 years ago
1
1 Incorporating Iterative Refinement with Sparse Cholesky April 2007 Doron Pearl
2
2 Robustness of Cholesky Recall the Cholesky algorithm – a lot of subtractions/additions cancellation and round-off errors accumulate Sparse Cholesky with Symbolic Factorization provides high performance – but what about accuracy and robustness?
3
3 Test case: IPM All IPMs implementations involve solving a system of linear equations (ADA T x=b) in each step. Usually in IPM when approaching the optimum the ADA T matrix becomes ill-conditioned.
4
4 Sparse Ax=b solvers Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More RobustLess Storage More Robust More General
5
5 Iterative Refinement A technique for improving a computed solution to a linear system Ax = b. r is constructed in higher precision. x 2 should be more accurate (why?) Algorithm 0. (Solve Ax 1 =b someway – LU/Chol) 1.Compute the residual r = b – Ax 1 2.Solve the correction d in Ad = r 3.Update the solution x 2 = x 1 + d
6
6 Iterative Refinement 1. L L T = chol(A) % Choleskey factorization (SINGLE) O(n 3 ) 2. x = L\(L T \b) % Back solve (SINGLE) O(n 2 ) 2. r = b – Ax % Residual (DOUBLE) O(n 2 ) 3. while ( || r || not small enough ) %stopping criteria 3.1 d = L\(L T \r) % Choleskey fct. on the residual (SINGLE) O(n 2 ) 3.2 x = x + d % new solution (DOUBLE) O(n 2 ) 3.3 r = b - Ax % new residual (DOUBLE) O(n 2 ) COST: (SINGLE) O(n 3 ) + #ITER * (DOUBLE) O(n 2 ) My implementation is available here: http://optlab.mcmaster.ca/~pearld/IterRef.cpp
7
7 Convergence rate of IR n=40, Cond. #: 3.2*10 6 0.00539512 0.00539584 0.00000103 0.00000000 n=60, Cond. #: 1.6*10 7 0.07641456 0.07512849 0.00126436 0.00002155 0.00000038 n=80 Cond#: 5*10 7 0.12418532 0.12296046 0.00121245 0.00001365 0.00000022 n=100, Cond#: 1.4*10 8 0.70543142 0.80596178 0.11470973 0.01616639 0.00227991 0.00032101 0.00004520 0.00000631 0.00000080
8
8 Convergence rate of IR N=250, Condition number: 1.9*10 9 4.58375704 1.664398 1.14157504 0.69412263 0.42573218 0.26168779 0.16020511 0.09874206 0.06026184 0.03725948 0.02276088 0.01405095 0.00857605 0.00526488 0.00324273 0.00198612 0.00121911 0.00074712 0.00045864 0.00028287 … 0.00000172 For N>350, Cond#= 1.6*10 11 : No convergence iteration ||Err|| 2
9
9 More Accurate Conventional Gaussian Elimination With extra precise iterative refinement
10
10 Conjugate Gradient in a nutshell Iterative method for solving Ax=b Minimizes the a quadratic function: f(x) = 1/2x T Ax-b T x+c Choose search direction that are conjugated to each other. In non-finite precision converges after n iterations. But to solve efficiently CG needs a good preconditioners – not available for the general case.
11
11 Conjugate Gradient One matrix-vector multiplication per iteration Two vector dot products per iteration Four n-vectors of working storage x 0 = 0, r 0 = b, p 0 = r 0 for k = 1, 2, 3,... α k = (r T k-1 r k-1 ) / (p T k-1 Ap k-1 ) step length x k = x k-1 + α k p k-1 approx solution r k = r k-1 – α k Ap k-1 residual β k = (r T k r k ) / (r T k-1 r k-1 ) improvement p k = r k + β k p k-1 search direction
12
12 Reference John R. Gilbert, University of California. Talk at "Sparse Matrix Days in MIT“ Exploiting the Performance of 32 bit Floating Point Arithmetic in Obtaining 64 bit Accuracy (2006); Julie Langou et. al, Innovative Computation Laboratory, Computer Science Department, University of Tennessee “The Future of LAPACK and ScaLAPACK” Jim Demmel, UC Berkeley.
13
13 Thank you for listening
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.