CS 290H Lecture 9 Left-looking LU with partial pivoting Read “A supernodal approach to sparse partial pivoting” (course reader #4), sections 1 through.

Slides:



Advertisements
Similar presentations
Fill Reduction Algorithm Using Diagonal Markowitz Scheme with Local Symmetrization Patrick Amestoy ENSEEIHT-IRIT, France Xiaoye S. Li Esmond Ng Lawrence.
Advertisements

1 Counting Perfect Matchings of a Graph It is hard in general to count the number of perfect matchings in a graph. But for planar graphs it can be done.
Lecture 3 Sparse Direct Method: Combinatorics Xiaoye Sherry Li Lawrence Berkeley National Laboratory, USA crd-legacy.lbl.gov/~xiaoye/G2S3/
ECE 552 Numerical Circuit Analysis Chapter Four SPARSE MATRIX SOLUTION TECHNIQUES Copyright © I. Hajj 2012 All rights reserved.
CS 240A: Solving Ax = b in parallel Dense A: Gaussian elimination with partial pivoting (LU) Same flavor as matrix * matrix, but more complicated Sparse.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Sparse Matrices in Matlab John R. Gilbert Xerox Palo Alto Research Center with Cleve Moler (MathWorks) and Rob Schreiber (HP Labs)
Linear Systems Pivoting in Gaussian Elim. CSE 541 Roger Crawfis.
Symmetric Minimum Priority Ordering for Sparse Unsymmetric Factorization Patrick Amestoy ENSEEIHT-IRIT (Toulouse) Sherry Li LBNL/NERSC (Berkeley) Esmond.
1cs542g-term Notes  Assignment 1 is out (due October 5)  Matrix storage: usually column-major.
1cs542g-term Sparse matrix data structure  Typically either Compressed Sparse Row (CSR) or Compressed Sparse Column (CSC) Informally “ia-ja” format.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
CS 290H: Sparse Matrix Algorithms
1cs542g-term Notes  Note that r 2 log(r) is NaN at r=0: instead smoothly extend to be 0 at r=0  Schedule a make-up lecture?
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations.
COMP171 Depth-First Search.
1 Bipartite Matching Lecture 3: Jan Bipartite Matching A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that.
CS 240A: Solving Ax = b in parallel °Dense A: Gaussian elimination with partial pivoting Same flavor as matrix * matrix, but more complicated °Sparse A:
Graph Algorithms in Numerical Linear Algebra: Past, Present, and Future John R. Gilbert MIT and UC Santa Barbara September 28, 2002.
Sparse Matrix Methods Day 1: Overview Day 2: Direct methods Nonsymmetric systems Graph theoretic tools Sparse LU with partial pivoting Supernodal factorization.
Alyce Brady CS 510: Computer Algorithms Depth-First Graph Traversal Algorithm.
Sparse Matrix Methods Day 1: Overview Matlab and examples Data structures Ax=b Sparse matrices and graphs Fill-reducing matrix permutations Matching and.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 4 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
The Evolution of a Sparse Partial Pivoting Algorithm John R. Gilbert with: Tim Davis, Jim Demmel, Stan Eisenstat, Laura Grigori, Stefan Larimore, Sherry.
Depth-First Search Lecture 24 COMP171 Fall Graph / Slide 2 Depth-First Search (DFS) * DFS is another popular graph search strategy n Idea is similar.
CS 290H Lecture 17 Dulmage-Mendelsohn Theory
CS 290H Lecture 12 Column intersection graphs, Ordering for sparsity in LU with partial pivoting Read “Computing the block triangular form of a sparse.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Scalabilities Issues in Sparse Factorization and Triangular Solution Sherry Li Lawrence Berkeley National Laboratory Sparse Days, CERFACS, June 23-24,
Computer Science 112 Fundamentals of Programming II Graph Algorithms.
TECHNIQUES ALGORITHMS AND SOFTWARE FOR THE DIRECT SOLUTION OF LARGE SPARSE LINEAR EQUATIONS.
Introduction to Numerical Analysis I MATH/CMPSC 455 PA=LU.
Symbolic sparse Gaussian elimination: A = LU
Lecture 5 Parallel Sparse Factorization, Triangular Solution
The Landscape of Sparse Ax=b Solvers Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More RobustLess Storage More Robust More.
CS 290H Lecture 5 Elimination trees Read GLN section 6.6 (next time I’ll assign 6.5 and 6.7) Homework 1 due Thursday 14 Oct by 3pm turnin file1.
CS 219: Sparse Matrix Algorithms
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Introduction to Graph Theory Lecture 16: Graph Searching Algorithms.
Lecture 4 Sparse Factorization: Data-flow Organization
Data Structures CSCI 132, Spring 2014 Lecture 38 Graphs
Direct Methods for Sparse Linear Systems Lecture 4 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen.
Department of Electronic Engineering, Tsinghua University Nano-scale Integrated Circuit and System Lab. Performance Analysis of Parallel Sparse LU Factorization.
Administrivia: October 5, 2009 Homework 1 due Wednesday Reading in Davis: Skim section 6.1 (the fill bounds will make more sense next week) Read section.
CS 61B Data Structures and Programming Methodology Aug 5, 2008 David Sun.
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Graphs. Graphs Similar to the graphs you’ve known since the 5 th grade: line graphs, bar graphs, etc., but more general. Those mathematical graphs are.
CS 290H Administrivia: May 14, 2008 Course project progress reports due next Wed 21 May. Reading in Saad (second edition): Sections
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
Properties and Applications of Depth-First Search Trees and Forests
CS 290H Lecture 15 GESP concluded Final presentations for survey projects next Tue and Thu 20-minute talk with at least 5 min for questions and discussion.
Linear Systems Dinesh A.
Symmetric-pattern multifrontal factorization T(A) G(A)
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
Solution of Sparse Linear Systems Numerical Simulation CSE245 Thanks to: Kin Sou, Deepak Ramaswamy, Michal Rewienski, Jacob White, Shihhsien Kuo and Karen.
Conjugate gradient iteration One matrix-vector multiplication per iteration Two vector dot products per iteration Four n-vectors of working storage x 0.
PC-Trees Based on a paper by Hsu and McConnell. Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional.
Breadth-First Search (BFS)
Lecture 3 Sparse Direct Method: Combinatorics
Direct Methods for Sparse Linear Systems
Spring Dr. Jehad Al Dallal
CS 290N / 219: Sparse Matrix Algorithms
Solving Linear Systems Ax=b
CS 290H Administrivia: April 16, 2008
The Landscape of Sparse Ax=b Solvers
Programming #4 Computer Problems
CS 290H Lecture 3 Fill: bounds and heuristics
Read GLN sections 6.1 through 6.4.
Nonsymmetric Gaussian elimination
Presentation transcript:

CS 290H Lecture 9 Left-looking LU with partial pivoting Read “A supernodal approach to sparse partial pivoting” (course reader #4), sections 1 through 4 except 2.3. Final project: Either an algorithms experiment, or an application experiment, or a survey paper and talk Experiments can be solo or group; surveys are solo Suggested term projects on course web site Choose a project this week – me or come talk about it Course grade will be 2/3 on homework, 1/3 on project

Directed Graph A is square, unsymmetric, nonzero diagonal Edges from rows to columns Symmetric permutations PAP T AG(A)

Depth-first search and postorder dfs (starting vertices) marked(1 : n) = false; p = 1; for each starting vertex v do visit(v); visit (v) if marked(v) then return; marked(v) = true; for each edge (v, w) do visit(w); postorder(v) = p; p = p + 1; When G is acyclic, postorder(v) > postorder(w) for every edge (v, w)

Sparse Triangular Solve = G(L T ) Lxb 1.Symbolic: –Predict structure of x by depth-first search from nonzeros of b 2.Numeric: –Compute values of x in topological order Time = O(flops)

Sparse-sparse triangular solve: x = L \ b Column oriented: dfs in G(L T ) to predict nonzeros of x; x(1:n) = b(1:n); for j = nonzero indices of x in topological order x(j) = x(j) / L(j, j); x(j+1:n) = x(j+1:n) – L(j+1:n, j) * x(j); end; Depth-first search calls “visit” once per flop Runs in O(flops) time even if it’s less than nnz(L) or n … Except for one-time O(n) SPA setup

Depth-first search and postorder dfs (starting vertices) marked(1 : n) = false; p = 1; for each starting vertex v do if not marked(v) then visit(v); visit (v) marked(v) = true; for each edge (v, w) do if not marked(w) then visit(w); postorder(v) = p; p = p + 1; When G is acyclic, postorder(v) > postorder(w) for every edge (v, w)

Structure prediction for sparse solve Given the nonzero structure of b, what is the structure of x? A G(A) xb =  Vertices of G(A) from which there is a path to a vertex of b.

Nonsymmetric Gaussian elimination A = LU: does not always exist, can be unstable PA = LU: Partial pivoting At each elimination step, pivot on largest-magnitude element in column “GEPP” is the standard algorithm for dense nonsymmetric systems PAQ = LU: Complete pivoting Pivot on largest-magnitude element in the entire uneliminated matrix Expensive to search for the pivot No freedom to reorder for sparsity Hardly ever used in practice Conflict between permuting for sparsity and for numerics Lots of different approaches to this tradeoff; we’ll look at a few

+ Symbolic sparse Gaussian elimination: A = LU Add fill edge a -> b if there is a path from a to b through lower-numbered vertices. But this doesn’t work with numerical pivoting! AG (A) L+U

Nonsymmetric Ax = b: Gaussian elimination with partial pivoting PA = LU Sparse, nonsymmetric A Rows permuted by partial pivoting Columns may be preordered for sparsity = x P

Modular Left-looking LU Alternatives: Right-looking Markowitz [Duff, Reid,...] Unsymmetric multifrontal [Davis,...] Symmetric-pattern methods [Amestoy, Duff,...] Complications: Pivoting => Interleave symbolic and numeric phases 1.Preorder Columns 2.Symbolic Analysis 3.Numeric and Symbolic Factorization 4.Triangular Solves Lack of symmetry => Lots of issues...

Symmetric A implies G + (A) is chordal, with lots of structure and elegant theory For unsymmetric A, things are not as nice No known way to compute G + (A) faster than Gaussian elimination No fast way to recognize perfect elimination graphs No theory of approximately optimal orderings Directed analogs of elimination tree: Smaller graphs that preserve path structure

Left-looking Column LU Factorization for column j = 1 to n do solve pivot: swap u jj and an elt of l j scale: l j = l j / u jj Column j of A becomes column j of L and U L 0 L I ( ) ujljujlj = a j for u j, l j L L U A j