Overview of Iterative Linear System Solver Packages

Total Page:16

File Type:pdf, Size:1020Kb

Overview of Iterative Linear System Solver Packages Overview of Iterative Linear System Solver Packages Victor Eijkhout July, 1998 Abstract Description and comparison of several packages for the iterative solu- tion of linear systems of equations. 1 1 Intro duction There are several freely available packages for the iterative solution of linear systems of equations, typically derived from partial di erential equation prob- lems. In this rep ort I will give a brief description of a numberofpackages, and giveaninventory of their features and de ning characteristics. The most imp ortant features of the packages are which iterative metho ds and preconditioners supply; the most relevant de ning characteristics are the interface they present to the user's data structures, and their implementation language. 2 2 Discussion Iterative metho ds are sub ject to several design decisions that a ect ease of use of the software and the resulting p erformance. In this section I will give a global discussion of the issues involved, and how certain p oints are addressed in the packages under review. 2.1 Preconditioners A go o d preconditioner is necessary for the convergence of iterative metho ds as the problem to b e solved b ecomes more dicult. Go o d preconditioners are hard to design, and this esp ecially holds true in the case of parallel pro cessing. Here is a short inventory of the various kinds of preconditioners found in the packages reviewed. 2.1.1 Ab out incomplete factorisation preconditioners Incomplete factorisations are among the most successful preconditioners devel- op ed for single-pro cessor computers. Unfortunately, since they are implicit in nature, they cannot immediately b e used on parallel architectures. Most pack- ages therefore concentrate on more parallel metho ds such as Blo ck Jacobi or AdditiveSchwarz. There are a few implementations of multicolour incomplete factorisations. Blo ckSolve95 is the only package catching breakdown of the ILU or IC fac- torisation. The manual outlines co de that successively shifts the diagonal until the factorisation succeeds. 2.1.2 Preconditioners for sequential pro cessing On sequential architectures, the BPKIT package provides sophisticated blo ck factorisations, and LASpack contains multigrid solvers. Most other packages supply the user with variants of ILU Incomplete LU or IC Incomplete Cholesky. 2.1.3 Preconditioners for parallel iterative metho ds These are the approaches towards parallel preconditioning taken in the packages under review here. Direct approximations of the inverse SPAI section 3.13 is the only pack- age that provides a direct approximation metho d to the inverse of the co ecient matrix. Since such an approximation is applied directly, using a matrix-vector pro duct, it is trivially parallel. The SPAI preconditioner is in addition also generated fully in parallel. Blo ck Jacobi Each pro cessor solves its own subsystem, and there is no commu- nication b etween the pro cessors. Since this strategy neglects the global/implicit prop erties of the linear system, only a limited improvement in the number 3 of iterations can result. On the other hand, this typ e of metho d is very parallel. All parallel preconditioner packages provide some form of Blo ck Jacobi metho d. AdditiveSchwarz As in the Blo ck Jacobi metho d, each pro cessor solves a lo cal subsystem. However, the lo cal system is now augmented to include b ordering variables, which b elong to other pro cessors. A certain amount of communicationisnow necessary, and the convergence improvement can bymuch higher. This metho d is available in Aztec 3.1, Petsc 3.10, ParPre 3.8, PSparselib 3.12. Multicolour factorisations It is p ossible to p erform global incomplete fac- torisation if the domain is not only split over the pro cessors, but is also augmented with a multicolour structure. Under the reasonable assumption that each pro cessor has variables of every colour, b oth the factorisation and the solution with a system thus ordered are parallel. The number of synchronisation p oints is equal to the numb er of colours. This is the metho d supplied in Blo ckSolve95 3.2; it is also available in ParPre 3.8. Blo ck factorisation It is p ossible to implement blo ck SSOR or ILU metho ds, with the subblo cks corresp onding to the lo cal systems with overlap, this gives the MultiplicativeSchwarz metho d. Such factorisations are neces- sarily more sequential than Blo ck Jacobi or AdditiveSchwarz metho ds, but they are also more accurate. With an appropriately chosen pro cessor ordering e.g., multicolour instead of sequential the solution time is only a small multiple times that of Blo ck Jacobi and AdditiveSchwarz metho ds. Such blo ck factorisations are available in Parpre 3.8; PSparselib 3.12 has the MultiplicativeSchwarz metho d, under the name `multicolour SOR'. Multilevel metho ds Petsc 3.10 and ParPre 3.8 are the only packages sup- plying variants of algebraic multigrid metho ds in parallel. Schur complement metho ds ParPre 3.8 and PSparselib 3.12 contain Schur complement domain decomp osition metho ds. 4 2.2 Data structure issues Every iterative metho d contains a matrix-vector pro duct and a preconditioner solve. Since these are inextricably tied to the data structures used for the matrix and the preconditioner and p ossibly even to the data structure used for vectors, p erhaps the most imp ortant design decision for an iterative metho ds package is the choice of the data structure. 2.2.1 The interface to user data The more complicated the data structure, the more urgent the question b ecomes of how the user is to supply the structures to the package. This question is particularly imp ortant in a parallel context. The packages reviewed here have taken the following list of approaches to this problem. Fully internal, not directly accessible, data structures basically ob ject ori- ented programming. This approach is taken in Petsc 3.10, ParPre 3.8, and Blo ckSolve 3.2. The data structures here are only accessible through function calls. This means that the package has to supply routines for constructing the struc- tures, for insp ecting them, and for applying them. Prescrib ed, user supplied, data structures. This approachistaken in Aztec 3.1; it is available in PCG 3.9. Here the user has to construct the data structures, but the package supplies the pro duct and solve routines. User supplied, arbitrary, data structures, with user supplied pro duct and solve routines. This approachisavailable in PCG 3.9 and Petsc 3.10; the ob ject-oriented package IML++ 3.5 can also b e considered to use this approach. User de ned data structures, not passed to the iterative metho d at all; pro duct and solve op erations are requested through a reverse communica- tion interface. This approachistaken in PIM 3.11; it is also available in PCG 3.9. 2.2.2 Parallel data layout There are several ways of partitioning a sparse matrix over multiple pro cessors. The scheme supp orted by all packages is partitioning by blo ckrows. Each pro cessor receives a contiguous series of rows of the matrix. This is the approach taken in Petsc 3.10; it is available in Blo ckSolve95 3.2. Under this approach a pro cessor can determine the ownership of anyvari- able, bykeeping a short list of rst and last rows of each pro cessor. 5 Each pro cessor receives an arbitrary set or rows. This is the approach taken in Aztec 3.1; it is available in Blo ckSolve95 3.2. Under this scheme, each pro cessor needs to maintain the mapping of its lo cal rows to the global numb ering. It is now no longer trivial to determine ownership of a variable. When a sparse matrix is distributed, the lo cal matrix on each pro cessor needs to have its column indices mapp ed from the global to the lo cal numb ering. Various packages o er supp ort for this renumb ering. 6 2.3 High p erformance computing Sparse matrix problems are notoriously low p erformers. Most of this is related to the fact that there is little or no data reuse, thereby preventing the use of BLAS kernels. See for example the tests on vector architectures in [4]. Other p erformance problems stem from parallel asp ects of the solution meth- o ds. Here are then a few of the approaches taken to alleviate p erformance prob- lems. 2.3.1 Quotient graph computation A matrix de nes a graph byintro ducing an edge i; j for every nonzero ele- ment a ij . A dense matrix in this manner de nes a graph in which eachnode is connected to every other no de. This is also called a `clique'. Sparse matrices, on the other hand, induce a graph where, no matter the numb er of no des, each no de is connected to only a small numb er of other no des. However, sparse matrices from problems with multiple physical variables will have dense subblo cks, for instance corresp onding to the variables on any given no de. It is p ossible to increase the eciency of linear algebra op erations by imp osing on the matrix the blo ck structure induced by these small dense 1 ik a kk a ki that subblo cks. For instance, the scalar multiplication/division a app ears in Gaussian elimination now b ecomes a matrix inversion and a matrix- matrix multiplication, in other words, BLAS3 kernels. Identifying cliques in the matrix graph, and deriving a quotient graph by `factoring them out', is the approach taken in the Blo ckSolve package; sec- tion 3.2.
Recommended publications
  • Recursive Approach in Sparse Matrix LU Factorization
    51 Recursive approach in sparse matrix LU factorization Jack Dongarra, Victor Eijkhout and the resulting matrix is often guaranteed to be positive Piotr Łuszczek∗ definite or close to it. However, when the linear sys- University of Tennessee, Department of Computer tem matrix is strongly unsymmetric or indefinite, as Science, Knoxville, TN 37996-3450, USA is the case with matrices originating from systems of Tel.: +865 974 8295; Fax: +865 974 8296 ordinary differential equations or the indefinite matri- ces arising from shift-invert techniques in eigenvalue methods, one has to revert to direct methods which are This paper describes a recursive method for the LU factoriza- the focus of this paper. tion of sparse matrices. The recursive formulation of com- In direct methods, Gaussian elimination with partial mon linear algebra codes has been proven very successful in pivoting is performed to find a solution of Eq. (1). Most dense matrix computations. An extension of the recursive commonly, the factored form of A is given by means technique for sparse matrices is presented. Performance re- L U P Q sults given here show that the recursive approach may per- of matrices , , and such that: form comparable to leading software packages for sparse ma- LU = PAQ, (2) trix factorization in terms of execution time, memory usage, and error estimates of the solution. where: – L is a lower triangular matrix with unitary diago- nal, 1. Introduction – U is an upper triangular matrix with arbitrary di- agonal, Typically, a system of linear equations has the form: – P and Q are row and column permutation matri- Ax = b, (1) ces, respectively (each row and column of these matrices contains single a non-zero entry which is A n n A ∈ n×n x where is by real matrix ( R ), and 1, and the following holds: PPT = QQT = I, b n b, x ∈ n and are -dimensional real vectors ( R ).
    [Show full text]
  • Abstract 1 Introduction
    Implementation in ScaLAPACK of Divide-and-Conquer Algorithms for Banded and Tridiagonal Linear Systems A. Cleary Department of Computer Science University of Tennessee J. Dongarra Department of Computer Science University of Tennessee Mathematical Sciences Section Oak Ridge National Laboratory Abstract Described hereare the design and implementation of a family of algorithms for a variety of classes of narrow ly banded linear systems. The classes of matrices include symmetric and positive de - nite, nonsymmetric but diagonal ly dominant, and general nonsymmetric; and, al l these types are addressed for both general band and tridiagonal matrices. The family of algorithms captures the general avor of existing divide-and-conquer algorithms for banded matrices in that they have three distinct phases, the rst and last of which arecompletely paral lel, and the second of which is the par- al lel bottleneck. The algorithms have been modi ed so that they have the desirable property that they are the same mathematical ly as existing factorizations Cholesky, Gaussian elimination of suitably reordered matrices. This approach represents a departure in the nonsymmetric case from existing methods, but has the practical bene ts of a smal ler and more easily hand led reduced system. All codes implement a block odd-even reduction for the reduced system that al lows the algorithm to scale far better than existing codes that use variants of sequential solution methods for the reduced system. A cross section of results is displayed that supports the predicted performance results for the algo- rithms. Comparison with existing dense-type methods shows that for areas of the problem parameter space with low bandwidth and/or high number of processors, the family of algorithms described here is superior.
    [Show full text]
  • Accelerating the LOBPCG Method on Gpus Using a Blocked Sparse Matrix Vector Product
    Accelerating the LOBPCG method on GPUs using a blocked Sparse Matrix Vector Product Hartwig Anzt and Stanimire Tomov and Jack Dongarra Innovative Computing Lab University of Tennessee Knoxville, USA Email: [email protected], [email protected], [email protected] Abstract— the computing power of today’s supercomputers, often accel- erated by coprocessors like graphics processing units (GPUs), This paper presents a heterogeneous CPU-GPU algorithm design and optimized implementation for an entire sparse iter- becomes challenging. ative eigensolver – the Locally Optimal Block Preconditioned Conjugate Gradient (LOBPCG) – starting from low-level GPU While there exist numerous efforts to adapt iterative lin- data structures and kernels to the higher-level algorithmic choices ear solvers like Krylov subspace methods to coprocessor and overall heterogeneous design. Most notably, the eigensolver technology, sparse eigensolvers have so far remained out- leverages the high-performance of a new GPU kernel developed side the main focus. A possible explanation is that many for the simultaneous multiplication of a sparse matrix and a of those combine sparse and dense linear algebra routines, set of vectors (SpMM). This is a building block that serves which makes porting them to accelerators more difficult. Aside as a backbone for not only block-Krylov, but also for other from the power method, algorithms based on the Krylov methods relying on blocking for acceleration in general. The subspace idea are among the most commonly used general heterogeneous LOBPCG developed here reveals the potential of eigensolvers [1]. When targeting symmetric positive definite this type of eigensolver by highly optimizing all of its components, eigenvalue problems, the recently developed Locally Optimal and can be viewed as a benchmark for other SpMM-dependent applications.
    [Show full text]
  • Comparison of Two Stationary Iterative Methods
    Comparison of Two Stationary Iterative Methods Oleksandra Osadcha Faculty of Applied Mathematics Silesian University of Technology Gliwice, Poland Email:[email protected] Abstract—This paper illustrates comparison of two stationary Some convergence result for the block Gauss-Seidel method iteration methods for solving systems of linear equations. The for problems where the feasible set is the Cartesian product of aim of the research is to analyze, which method is faster solve m closed convex sets, under the assumption that the sequence this equations and how many iteration required each method for solving. This paper present some ways to deal with this problem. generated by the method has limit points presented in.[5]. In [9] presented improving the modiefied Gauss-Seidel method Index Terms—comparison, analisys, stationary methods, for Z-matrices. In [11] presented the convergence Gauss-Seidel Jacobi method, Gauss-Seidel method iterative method, because matrix of linear system of equations is positive definite, but it does not afford a conclusion on the convergence of the Jacobi method. However, it also proved I. INTRODUCTION that Jacobi method also converges. Also these methods were present in [12], where described each The term ”iterative method” refers to a wide range of method. techniques that use successive approximations to obtain more This publication present comparison of Jacobi and Gauss- accurate solutions to a linear system at each step. In this publi- Seidel methods. These methods are used for solving systems cation we will cover two types of iterative methods. Stationary of linear equations. We analyze, how many iterations required methods are older, simpler to understand and implement, but each method and which method is faster.
    [Show full text]
  • Jacobi-Davidson, Gauss-Seidel and Successive Over-Relaxation For
    Applied Mathematics and Computational Intelligence Volume 6, 2017 [41-52] Jacobi‐Davidson, Gauss‐Seidel and Successive Over‐Relaxation for Solving Systems of Linear Equations Fatini Dalili Mohammed1,a and Mohd Rivaieb 1Department of Computer Sciences and Mathematics, Universiti Teknologi MARA (UiTM) Terengganu, Campus Kuala Terengganu, Malaysia ABSTRACT Linear systems are applied in many applications such as calculating variables, rates, budgets, making a prediction and others. Generally, there are two techniques of solving system of linear equation including direct methods and iterative methods. Some basic solution methods known as direct methods are ineffective in solving many equations in large systems due to slower computation. Due to inability of direct methods, iterative methods are practical to be used in large systems of linear equations as they do not need much storage. In this project, three indirect methods are used to solve large system of linear equations. The methods are Jacobi Davidson, Gauss‐Seidel and Successive Over‐ Relaxation (SOR) which are well known in the field of numerical analysis. The comparative results analysis of the three methods is considered. These three methods are compared based on number of iterations, CPU time and error. The numerical results show that Gauss‐Seidel method and SOR method with ω=1.25 are more efficient than others. This research allows researcher to appreciate the use of iterative techniques for solving systems of linear equations that is widely used in industrial applications. Keywords: system of linear equation, iterative method, Jacobi‐Davidson, Gauss‐Seidel, Successive Over‐Relaxation 1. INTRODUCTION Linear systems are important in our real life. They are applied in various applications such as in calculating variables, rates, budgets, making a prediction and others.
    [Show full text]
  • A Study on Comparison of Jacobi, Gauss-Seidel and Sor Methods For
    International Journal of Mathematics Trends and Technology (IJMTT) – Volume 56 Issue 4- April 2018 A Study on Comparison of Jacobi, Gauss- Seidel and Sor Methods for the Solution in System of Linear Equations #1 #2 #3 *4 Dr.S.Karunanithi , N.Gajalakshmi , M.Malarvizhi , M.Saileshwari #Assistant Professor ,* Research Scholar Thiruvalluvar University,Vellore PG & Research Department of Mathematics,Govt.Thirumagal Mills College,Gudiyattam,Vellore Dist,Tamilnadu,India-632602 Abstract — This paper presents three iterative methods for the solution of system of linear equations has been evaluated in this work. The result shows that the Successive Over-Relaxation method is more efficient than the other two iterative methods, number of iterations required to converge to an exact solution. This research will enable analyst to appreciate the use of iterative techniques for understanding the system of linear equations. Keywords — The system of linear equations, Iterative methods, Initial approximation, Jacobi method, Gauss- Seidel method, Successive Over- Relaxation method. 1. INTRODUCTION AND PRELIMINARIES Numerical analysis is the area of mathematics and computer science that creates, analyses, and implements algorithms for solving numerically the problems of continuous mathematics. Such problems originate generally from real-world applications of algebra, geometry and calculus, and they involve variables which vary continuously. These problems occur throughout the natural sciences, social science, engineering, medicine, and business. The solution of system of linear equations can be accomplished by a numerical method which falls in one of two categories: direct or iterative methods. We have so far discussed some direct methods for the solution of system of linear equations and we have seen that these methods yield the solution after an amount of computation that is known advance.
    [Show full text]
  • Chebyshev and Fourier Spectral Methods 2000
    Chebyshev and Fourier Spectral Methods Second Edition John P. Boyd University of Michigan Ann Arbor, Michigan 48109-2143 email: [email protected] http://www-personal.engin.umich.edu/jpboyd/ 2000 DOVER Publications, Inc. 31 East 2nd Street Mineola, New York 11501 1 Dedication To Marilyn, Ian, and Emma “A computation is a temptation that should be resisted as long as possible.” — J. P. Boyd, paraphrasing T. S. Eliot i Contents PREFACE x Acknowledgments xiv Errata and Extended-Bibliography xvi 1 Introduction 1 1.1 Series expansions .................................. 1 1.2 First Example .................................... 2 1.3 Comparison with finite element methods .................... 4 1.4 Comparisons with Finite Differences ....................... 6 1.5 Parallel Computers ................................. 9 1.6 Choice of basis functions .............................. 9 1.7 Boundary conditions ................................ 10 1.8 Non-Interpolating and Pseudospectral ...................... 12 1.9 Nonlinearity ..................................... 13 1.10 Time-dependent problems ............................. 15 1.11 FAQ: Frequently Asked Questions ........................ 16 1.12 The Chrysalis .................................... 17 2 Chebyshev & Fourier Series 19 2.1 Introduction ..................................... 19 2.2 Fourier series .................................... 20 2.3 Orders of Convergence ............................... 25 2.4 Convergence Order ................................. 27 2.5 Assumption of Equal Errors ...........................
    [Show full text]
  • Over-Scalapack.Pdf
    1 2 The Situation: Parallel scienti c applications are typically Overview of ScaLAPACK written from scratch, or manually adapted from sequen- tial programs Jack Dongarra using simple SPMD mo del in Fortran or C Computer Science Department UniversityofTennessee with explicit message passing primitives and Mathematical Sciences Section Which means Oak Ridge National Lab oratory similar comp onents are co ded over and over again, co des are dicult to develop and maintain http://w ww .ne tl ib. org /ut k/p e opl e/J ackDo ngarra.html debugging particularly unpleasant... dicult to reuse comp onents not really designed for long-term software solution 3 4 What should math software lo ok like? The NetSolve Client Many more p ossibilities than shared memory Virtual Software Library Multiplicityofinterfaces ! Ease of use Possible approaches { Minimum change to status quo Programming interfaces Message passing and ob ject oriented { Reusable templates { requires sophisticated user Cinterface FORTRAN interface { Problem solving environments Integrated systems a la Matlab, Mathematica use with heterogeneous platform Interactiveinterfaces { Computational server, like netlib/xnetlib f2c Non-graphic interfaces Some users want high p erf., access to details {MATLAB interface Others sacri ce sp eed to hide details { UNIX-Shell interface Not enough p enetration of libraries into hardest appli- Graphic interfaces cations on vector machines { TK/TCL interface Need to lo ok at applications and rethink mathematical software { HotJava Browser
    [Show full text]
  • A Geometric Theory for Preconditioned Inverse Iteration. III: a Short and Sharp Convergence Estimate for Generalized Eigenvalue Problems
    A geometric theory for preconditioned inverse iteration. III: A short and sharp convergence estimate for generalized eigenvalue problems. Andrew V. Knyazev Department of Mathematics, University of Colorado at Denver, P.O. Box 173364, Campus Box 170, Denver, CO 80217-3364 1 Klaus Neymeyr Mathematisches Institut der Universit¨atT¨ubingen,Auf der Morgenstelle 10, 72076 T¨ubingen,Germany 2 Abstract In two previous papers by Neymeyr: A geometric theory for preconditioned inverse iteration I: Extrema of the Rayleigh quotient, LAA 322: (1-3), 61-85, 2001, and A geometric theory for preconditioned inverse iteration II: Convergence estimates, LAA 322: (1-3), 87-104, 2001, a sharp, but cumbersome, convergence rate estimate was proved for a simple preconditioned eigensolver, which computes the smallest eigenvalue together with the corresponding eigenvector of a symmetric positive def- inite matrix, using a preconditioned gradient minimization of the Rayleigh quotient. In the present paper, we discover and prove a much shorter and more elegant, but still sharp in decisive quantities, convergence rate estimate of the same method that also holds for a generalized symmetric definite eigenvalue problem. The new estimate is simple enough to stimulate a search for a more straightforward proof technique that could be helpful to investigate such practically important method as the locally optimal block preconditioned conjugate gradient eigensolver. We demon- strate practical effectiveness of the latter for a model problem, where it compares favorably with two
    [Show full text]
  • 16 Preconditioning
    16 Preconditioning The general idea underlying any preconditioning procedure for iterative solvers is to modify the (ill-conditioned) system Ax = b in such a way that we obtain an equivalent system Aˆxˆ = bˆ for which the iterative method converges faster. A standard approach is to use a nonsingular matrix M, and rewrite the system as M −1Ax = M −1b. The preconditioner M needs to be chosen such that the matrix Aˆ = M −1A is better conditioned for the conjugate gradient method, or has better clustered eigenvalues for the GMRES method. 16.1 Preconditioned Conjugate Gradients We mentioned earlier that the number of iterations required for the conjugate gradient algorithm to converge is proportional to pκ(A). Thus, for poorly conditioned matrices, convergence will be very slow. Thus, clearly we will want to choose M such that κ(Aˆ) < κ(A). This should result in faster convergence. How do we find Aˆ, xˆ, and bˆ? In order to ensure symmetry and positive definiteness of Aˆ we let M −1 = LLT (44) with a nonsingular m × m matrix L. Then we can rewrite Ax = b ⇐⇒ M −1Ax = M −1b ⇐⇒ LT Ax = LT b ⇐⇒ LT AL L−1x = LT b . | {z } | {z } |{z} =Aˆ =xˆ =bˆ The symmetric positive definite matrix M is called splitting matrix or preconditioner, and it can easily be verified that Aˆ is symmetric positive definite, also. One could now formally write down the standard CG algorithm with the new “hat- ted” quantities. However, the algorithm is more efficient if the preconditioning is incorporated directly into the iteration. To see what this means we need to examine every single line in the CG algorithm.
    [Show full text]
  • Iterative Solution Methods and Their Rate of Convergence
    Uppsala University Graduate School in Mathematics and Computing Institute for Information Technology Numerical Linear Algebra FMB and MN1 Fall 2007 Mandatory Assignment 3a: Iterative solution methods and their rate of convergence Exercise 1 (Implementation tasks) Implement in Matlab the following iterative schemes: M1: the (pointwise) Jacobi method; M2: the second order Chebyshev iteration, described in Appendix A; M3: the unpreconditioned conjugate gradient (CG) method (see the lecture notes); M4: the Jacobi (diagonally) preconditioned CG method (see the lecture notes). For methods M3 and M4, you have to write your own Matlab code. For the numerical exper- iments you should use your implementation and not the available Matlab function pcg. The latter can be used to check the correctness of your implementation. Exercise 2 (Generation of test data) Generate four test matrices which have different properties: A: A=matgen disco(s,1); B: B=matgen disco(s,0.001); C: C=matgen anisot(s,1,1); D: D=matgen anisot(s,1,0.001); Here s determines the size of the problem, namely, the matrix size is n = 2s. Check the sparsity of the above matrices (spy). Compute the complete spectra of A, B, C, D (say, for s = 3) by using the Matlab function eig. Plot those and compare. Compute the condition numbers of these matrices. You are advised to repeat the experiment for a larger s to see how the condition number grows with the matrix size n. Exercise 3 (Numerical experiments and method comparisons) Test the four meth- ods M1, M2, M3, M4 on the matrices A, B, C, D.
    [Show full text]
  • Solving Linear Systems: Iterative Methods and Sparse Systems
    Solving Linear Systems: Iterative Methods and Sparse Systems COS 323 Last time • Linear system: Ax = b • Singular and ill-conditioned systems • Gaussian Elimination: A general purpose method – Naïve Gauss (no pivoting) – Gauss with partial and full pivoting – Asymptotic analysis: O(n3) • Triangular systems and LU decomposition • Special matrices and algorithms: – Symmetric positive definite: Cholesky decomposition – Tridiagonal matrices • Singularity detection and condition numbers Today: Methods for large and sparse systems • Rank-one updating with Sherman-Morrison • Iterative refinement • Fixed-point and stationary methods – Introduction – Iterative refinement as a stationary method – Gauss-Seidel and Jacobi methods – Successive over-relaxation (SOR) • Solving a system as an optimization problem • Representing sparse systems Problems with large systems • Gaussian elimination, LU decomposition (factoring step) take O(n3) • Expensive for big systems! • Can get by more easily with special matrices – Cholesky decomposition: for symmetric positive definite A; still O(n3) but halves storage and operations – Band-diagonal: O(n) storage and operations • What if A is big? (And not diagonal?) Special Example: Cyclic Tridiagonal • Interesting extension: cyclic tridiagonal • Could derive yet another special case algorithm, but there’s a better way Updating Inverse • Suppose we have some fast way of finding A-1 for some matrix A • Now A changes in a special way: A* = A + uvT for some n×1 vectors u and v • Goal: find a fast way of computing (A*)-1
    [Show full text]