cs240a-denseGE

# cs240a-denseGE - CS 240A: Solving Ax = b in parallel CS...

This preview shows pages 1–8. Sign up to view the full content.

CS 240A: Solving Ax = b in parallel CS 240A: Solving Ax = b in parallel ° Dense A: Gaussian elimination with partial pivoting Same flavor as matrix * matrix, but more complicated ° Sparse A: Iterative methods – Conjugate gradient etc. Sparse matrix times dense vector ° Sparse A: Gaussian elimination – Cholesky, LU, etc. Graph algorithms ° Sparse A: Preconditioned iterative methods and multigrid Mixture of lots of things

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS267 Dense Linear Algebra I.2 Demmel Fa 2001 Dense Linear Algebra (Excerpts) James Demmel http://www.cs.berkeley.edu/~demmel/cs267_221001.ppt
CS267 Dense Linear Algebra I.3 Demmel Fa 2001 Motivation ° 3 Basic Linear Algebra Problems Linear Equations: Solve Ax=b for x Least Squares: Find x that minimizes Σ r i 2 where r=Ax-b Eigenvalues: Find λ and x where Ax = λ x Lots of variations depending on structure of A (eg symmetry) ° Why dense A, as opposed to sparse A? Aren’t “most” large matrices sparse? Dense algorithms easier to understand Some applications yields large dense matrices - Ax=b: Computational Electromagnetics - Ax = λ x: Quantum Chemistry Benchmarking - “How fast is your computer?” = “How fast can you solve dense Ax=b?” Large sparse matrix algorithms often yield smaller (but still large) dense problems

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS267 Dense Linear Algebra I.4 Demmel Fa 2001 Review of Gaussian Elimination (GE) for solving Ax=b ° Add multiples of each row to later rows to make A upper triangular ° Solve resulting triangular system Ux = c by substitution … for each column i … zero it out below the diagonal by adding multiples of row i to later rows for i = 1 to n-1 … for each row j below row i for j = i+1 to n … add a multiple of row i to row j for k = i to n A(j,k) = A(j,k) - (A(j,i)/A(i,i)) * A(i,k)
CS267 Dense Linear Algebra I.5 Demmel Fa 2001 Refine GE Algorithm (1) ° Initial Version ° Remove computation of constant A(j,i)/A(i,i) from inner loop … for each column i … zero it out below the diagonal by adding multiples of row i to later rows for i = 1 to n-1 … for each row j below row i for j = i+1 to n … add a multiple of row i to row j for k = i to n A(j,k) = A(j,k) - (A(j,i)/A(i,i)) * A(i,k) for i = 1 to n-1 for j = i+1 to n m = A(j,i)/A(i,i) for k = i to n A(j,k) = A(j,k) - m * A(i,k)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS267 Dense Linear Algebra I.6 Demmel Fa 2001 Refine GE Algorithm (2) ° Last version ° Don’t compute what we already know: zeros below diagonal in column i for i = 1 to n-1 for j = i+1 to n m = A(j,i)/A(i,i) for k = i +1 to n A(j,k) = A(j,k) - m * A(i,k) for i = 1 to n-1 for j = i+1 to n m = A(j,i)/A(i,i) for k = i to n A(j,k) = A(j,k) - m * A(i,k)
CS267 Dense Linear Algebra I.7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/27/2011 for the course CMPSC 240A taught by Professor Gilbert during the Fall '09 term at UCSB.

### Page1 / 24

cs240a-denseGE - CS 240A: Solving Ax = b in parallel CS...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online