CS267 L24 Solving PDEs.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 24: Solving Linear Systems arising from PDEs - I James Demmel.

Slides:



Advertisements
Similar presentations
Parallel Jacobi Algorithm Steven Dong Applied Mathematics.
Advertisements

CSCI-455/552 Introduction to High Performance Computing Lecture 25.
1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
03/23/07CS267 Lecture 201 CS 267: Multigrid on Structured Grids Kathy Yelick
SOLVING THE DISCRETE POISSON EQUATION USING MULTIGRID ROY SROR ELIRAN COHEN.
Parallelizing stencil computations Based on slides from David Culler, Jim Demmel, Bob Lucas, Horst Simon, Kathy Yelick, et al., UCB CS267.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Numerical Algorithms Matrix multiplication
Ma221 - Multigrid DemmelFall 2004 Ma 221 – Fall 2004 Multigrid Overview James Demmel
1cs542g-term Notes  Assignment 1 will be out later today (look on the web)
1cs542g-term Notes  No extra class tomorrow.
03/09/2005CS267 Lecture 14 CS 267: Applications of Parallel Computers Solving Linear Systems arising from PDEs - I James Demmel
ECE669 L4: Parallel Applications February 10, 2004 ECE 669 Parallel Computer Architecture Lecture 4 Parallel Applications.
CS267 Poisson Demmel Fall 2002 CS 267 Applications of Parallel Computers Solving Linear Systems arising from PDEs - I James Demmel
Sparse Matrix Algorithms CS 524 – High-Performance Computing.
CS267 L12 Sources of Parallelism(3).1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 12: Sources of Parallelism and Locality (Part 3)
CS267 L24 Solving PDEs.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 24: Solving Linear Systems arising from PDEs - I James Demmel.
CS267 Poisson 2.1 Demmel Fall 2002 CS 267 Applications of Parallel Computers Solving Linear Systems arising from PDEs - II James Demmel
02/09/2005CS267 Lecture 71 CS 267 Sources of Parallelism and Locality in Simulation – Part 2 James Demmel
Avoiding Communication in Sparse Iterative Solvers Erin Carson Nick Knight CS294, Fall 2011.
CS267 L12 Sources of Parallelism(3).1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 12: Sources of Parallelism and Locality (Part 3)
02/28/2007CS267 Lecture 13 CS 267: Applications of Parallel Computers Structured Grids Kathy Yelick
3/1/2004CS267 Lecure 101 CS 267 Sources of Parallelism Kathy Yelick
03/09/06CS267 Lecture 16 CS 267: Applications of Parallel Computers Solving Linear Systems arising from PDEs - II James Demmel
04/13/2009CS267 Lecture 20 CS 267: Applications of Parallel Computers Lecture Structured Grids Horst D. Simon
High Performance Computing 1 Parallelization Strategies and Load Balancing Some material borrowed from lectures of J. Demmel, UC Berkeley.
CS 240A: Solving Ax = b in parallel °Dense A: Gaussian elimination with partial pivoting Same flavor as matrix * matrix, but more complicated °Sparse A:
CS267 L24 Solving PDEs.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 24: Solving Linear Systems arising from PDEs - I James Demmel.
CS267 L11 Sources of Parallelism(2).1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 11: Sources of Parallelism and Locality (Part 2)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
CS267 L25 Solving PDEs II.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 25: Solving Linear Systems arising from PDEs - II James Demmel.
CS240A: Conjugate Gradients and the Model Problem.
02/14/2007CS267 Lecture 91 CS 267 Sources of Parallelism and Locality in Simulation Kathy Yelick
Monica Garika Chandana Guduru. METHODS TO SOLVE LINEAR SYSTEMS Direct methods Gaussian elimination method LU method for factorization Simplex method of.
1 Sources of Parallelism and Locality in Simulation.
Conjugate gradients, sparse matrix-vector multiplication, graphs, and meshes Thanks to Aydin Buluc, Umit Catalyurek, Alan Edelman, and Kathy Yelick for.
L11: Sparse Linear Algebra on GPUs CS Sparse Linear Algebra 1 L11: Sparse Linear Algebra CS6235
02/14/2007CS267 Lecture 91 CS 267 Sources of Parallelism and Locality in Simulation – Part 2 Kathy Yelick
Scientific Computing Partial Differential Equations Poisson Equation.
Computation on meshes, sparse matrices, and graphs Some slides are from David Culler, Jim Demmel, Bob Lucas, Horst Simon, Kathy Yelick, et al., UCB CS267.
CS 219: Sparse Matrix Algorithms
Linear Systems Iterative Solutions CSE 541 Roger Crawfis.
L17: Introduction to “Irregular” Algorithms and MPI, cont. November 8, 2011.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
PARLab Parallel Boot Camp Sources of Parallelism and Locality in Simulation Jim Demmel EECS and Mathematics University of California, Berkeley.
02/07/2006CS267 Lecture 71 CS 267 Sources of Parallelism and Locality in Simulation – Part 2 James Demmel
Fall 2011Math 221 Multigrid James Demmel
CS 267 Sources of Parallelism and Locality in Simulation – Part 2
Parallel Solution of the Poisson Problem Using MPI
CS240A: Conjugate Gradients and the Model Problem.
CS 484. Iterative Methods n Gaussian elimination is considered to be a direct method to solve a system. n An indirect method produces a sequence of values.
Introduction to Scientific Computing II Overview Michael Bader.
Linear Systems Dinesh A.
CS267 L24 Solving PDEs.1 Demmel Sp 1999 Math Poisson’s Equation, Jacobi, Gauss-Seidel, SOR, FFT Plamen Koev
Optimizing 3D Multigrid to Be Comparable to the FFT Michael Maire and Kaushik Datta Note: Several diagrams were taken from Kathy Yelick’s CS267 lectures.
Numerical Algorithms Chapter 11.
Parallel Direct Methods for Sparse Linear Systems
Model Problem: Solving Poisson’s equation for temperature
Solving Linear Systems Ax=b
CS 267 Sources of Parallelism and Locality in Simulation – Part 2
Lecture 19 MA471 Fall 2003.
Computation on meshes, sparse matrices, and graphs
Computational meshes, matrices, conjugate gradients, and mesh partitioning Some slides are from David Culler, Jim Demmel, Bob Lucas, Horst Simon, Kathy.
CS 267 Sources of Parallelism and Locality in Simulation – Part 2
RECORD. RECORD Gaussian Elimination: derived system back-substitution.
Matrix Methods Summary
CS 267 Sources of Parallelism and Locality in Simulation – Part 2
James Demmel CS 267: Applications of Parallel Computers Solving Linear Systems arising from PDEs - I James Demmel.
James Demmel CS 267 Applications of Parallel Computers Lecture 12: Sources of Parallelism and Locality.
Presentation transcript:

CS267 L24 Solving PDEs.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 24: Solving Linear Systems arising from PDEs - I James Demmel

CS267 L24 Solving PDEs.2 Demmel Sp 1999 Outline °Review Poisson equation °Overview of Methods for Poisson Equation °Jacobi’s method °Red-Black SOR method °Conjugate Gradients °FFT °Multigrid

CS267 L24 Solving PDEs.3 Demmel Sp 1999 Poisson’s equation arises in many models °Heat flow: Temperature(position, time) °Diffusion: Concentration(position, time) °Electrostatic or Gravitational Potential: Potential(position) °Fluid flow: Velocity,Pressure,Density(position,time) °Quantum mechanics: Wave-function(position,time) °Elasticity: Stress,Strain(position,time)

CS267 L24 Solving PDEs.4 Demmel Sp 1999 Relation of Poisson’s equation to Gravity, Electrostatics °Force on particle at (x,y,z) due to particle at 0 is -(x,y,z)/r^3, where r = sqrt(x +y +z ) °Force is also gradient of potential V = -1/r = -(d/dx V, d/dy V, d/dz V) = -grad V °V satisfies Poisson’s equation (try it!) 222

CS267 L24 Solving PDEs.5 Demmel Sp 1999 Poisson’s equation in 1D T = 2 Graph and “stencil”

CS267 L24 Solving PDEs.6 Demmel Sp D Poisson’s equation °Similar to the 1D case, but the matrix T is now °3D is analogous T = 4 Graph and “stencil”

CS267 L24 Solving PDEs.7 Demmel Sp 1999 Algorithms for 2D Poisson Equation with N unknowns AlgorithmSerialPRAMMemory #Procs °Dense LUN 3 NN 2 N 2 °Band LUN 2 NN 3/2 N °JacobiN 2 NNN °Explicit Inv.N log NNN °Conj.Grad.N 3/2 N 1/2 *log NNN °RB SORN 3/2 N 1/2 NN °Sparse LUN 3/2 N 1/2 N*log NN °FFTN*log Nlog NNN °MultigridNlog 2 NNN °Lower boundNlog NN PRAM is an idealized parallel model with zero cost communication (see next slide for explanation) 222

CS267 L24 Solving PDEs.8 Demmel Sp 1999 Short explanations of algorithms on previous slide °Sorted in two orders (roughly): from slowest to fastest on sequential machines from most general (works on any matrix) to most specialized (works on matrices “like” T) °Dense LU: Gaussian elimination; works on any N-by-N matrix °Band LU: exploit fact that T is nonzero only on sqrt(N) diagonals nearest main diagonal, so faster °Jacobi: essentially does matrix-vector multiply by T in inner loop of iterative algorithm °Explicit Inverse: assume we want to solve many systems with T, so we can precompute and store inv(T) “for free”, and just multiply by it It’s still expensive! °Conjugate Gradients: uses matrix-vector multiplication, like Jacobi, but exploits mathematical properies of T that Jacobi does not °Red-Black SOR (Successive Overrelaxation): Variation of Jacobi that exploits yet different mathematical properties of T Used in Multigrid °Sparse LU: Gaussian elimination exploiting particular zero structure of T °FFT (Fast Fourier Transform): works only on matrices very like T °Multigrid: also works on matrices like T, that come from elliptic PDEs °Lower Bound: serial (time to print answer); parallel (time to combine N inputs) °Details in class notes and

CS267 L24 Solving PDEs.9 Demmel Sp 1999 Comments on practical meshes °Regular 1D, 2D, 3D meshes Important as building blocks for more complicated meshes We will discuss these first °Practical meshes are often irregular Composite meshes, consisting of multiple “bent” regular meshes joined at edges Unstructured meshes, with arbitrary mesh points and connectivities Adaptive meshes, which change resolution during solution process to put computational effort where needed °We will talk about some methods on unstructured meshes; lots of open problems

CS267 L24 Solving PDEs.10 Demmel Sp 1999 Composite mesh from a mechanical structure

CS267 L24 Solving PDEs.11 Demmel Sp 1999 Converting the mesh to a matrix

CS267 L24 Solving PDEs.12 Demmel Sp 1999 Irregular mesh: NASA Airfoil in 2D (direct solution)

CS267 L24 Solving PDEs.13 Demmel Sp 1999 Irregular mesh: Tapered Tube (multigrid)

CS267 L24 Solving PDEs.14 Demmel Sp 1999 Adaptive Mesh Refinement (AMR) °Adaptive mesh around an explosion °John Bell and Phil Colella at LBL (see class web page for URL) °Goal of Titanium is to make these algorithms easier to implement in parallel