MultiGrid.

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing An Adaptive Numerical Method for Multi- Scale Problems Arising in Phase-field Modelling Peter.
Advertisements

Mutigrid Methods for Solving Differential Equations Ferien Akademie 05 – Veselin Dikov.
Computational Methods II (Elliptic)
Computational Modeling for Engineering MECN 6040
Improvement of a multigrid solver for 3D EM diffusion Research proposal final thesis Applied Mathematics, specialism CSE (Computational Science and Engineering)
1 Iterative Solvers for Linear Systems of Equations Presented by: Kaveh Rahnema Supervisor: Dr. Stefan Zimmer
1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
CS 290H 7 November Introduction to multigrid methods
SOLVING THE DISCRETE POISSON EQUATION USING MULTIGRID ROY SROR ELIRAN COHEN.
CSCI-455/552 Introduction to High Performance Computing Lecture 26.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
Geometric (Classical) MultiGrid. Hierarchy of graphs Apply grids in all scales: 2x2, 4x4, …, n 1/2 xn 1/2 Coarsening Interpolate and relax Solve the large.
Image Reconstruction Group 6 Zoran Golic. Overview Problem Multigrid-Algorithm Results Aspects worth mentioning.
Ma221 - Multigrid DemmelFall 2004 Ma 221 – Fall 2004 Multigrid Overview James Demmel
Algebraic MultiGrid. Algebraic MultiGrid – AMG (Brandt 1982)  General structure  Choose a subset of variables: the C-points such that every variable.
Geometric MultiGrid Mehod
1 Systems of Linear Equations Iterative Methods. 2 B. Iterative Methods 1.Jacobi method and Gauss Seidel 2.Relaxation method for iterative methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 20 Solution of Linear System of Equations - Iterative Methods.
Geometric (Classical) MultiGrid. Linear scalar elliptic PDE (Brandt ~1971)  1 dimension Poisson equation  Discretize the continuum x0x0 x1x1 x2x2 xixi.
Easy Optimization Problems, Relaxation, Local Processing for a single variable.
1 Numerical Integration of Partial Differential Equations (PDEs)
Multigrid for Nonlinear Problems Ferien-Akademie 2005, Sarntal, Christoph Scheit FAS, Newton-MG, Multilevel Nonlinear Method.
Improving Coarsening and Interpolation for Algebraic Multigrid Jeff Butler Hans De Sterck Department of Applied Mathematics (In Collaboration with Ulrike.
Matthew Fischels Aerospace Engineering Department Major Professor : Dr. R. Ganesh Rajagopalan REDUCING RUNTIME OF WIND TURBINE SIMULATION Los Alamos National.
Introduction to Scientific Computing II From Gaussian Elimination to Multigrid – A Recapitulation Dr. Miriam Mehl.
1 Computational Methods II (Elliptic) Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal Pulau.
Administrivia: May 20, 2013 Course project progress reports due Wednesday. Reading in Multigrid Tutorial: Chapters 3-4: Multigrid cycles and implementation.
Elliptic PDEs and the Finite Difference Method
Multigrid Computation for Variational Image Segmentation Problems: Multigrid approach  Rosa Maria Spitaleri Istituto per le Applicazioni del Calcolo-CNR.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Domain Decomposition in High-Level Parallelizaton of PDE codes Xing Cai University of Oslo.
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl Institut für Informatik Scientific Computing In Computer Science.
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl.
High Performance Computing 1 Multigrid Some material from lectures of J. Demmel, UC Berkeley Dept of CS.
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
Introduction to Scientific Computing II
Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
1 Solving the algebraic equations A x = B =. 2 Direct solution x = A -1 B = = Applicable only to small problems For the vertical in the spectral technique.
Elliptic PDEs and Solvers
The Application of the Multigrid Method in a Nonhydrostatic Atmospheric Model Shu-hua Chen MMM/NCAR.
University of Colorado
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.
Substitution Method: Solve the linear system. Y = 3x + 2 Equation 1 x + 2y=11 Equation 2.
Equations of Lines and operations Practice
Programming assignment #1. Solutions and Discussion
Scientific Computing Lab
بسم الله الرحمن الرحيم.
Scientific Computing Lab
Partial Differential Equations and Iterative Solvers
Introduction to Multigrid Method
Remo Minero Eindhoven University of Technology 16th November 2005
Introduction to Scientific Computing II
Pressure Poisson Equation
Scientific Computing Lab
Numerical Algorithms • Parallelizing matrix multiplication
Stencil Quiz questions
CS 252 Project Presentation
Introduction to Scientific Computing II
Stencil Quiz questions
Linear Equations in One Variable
Numerical Analysis Lecture13.
Problems with Gauss-Seidel
Finite Difference Method for Poisson Equation
Numerical Linear Algebra
Numerical Methods on Partial Differential Equation
University of Virginia
Stencil Pattern ITCS 4/5145 Parallel computing, UNC-Charlotte, B. Wilkinson Oct 14, 2014 slides6b.ppt 1.
Stencil Pattern ITCS 4/5145 Parallel computing, UNC-Charlotte, B. Wilkinson StencilPattern.ppt Oct 14,
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Presentation transcript:

MultiGrid

Project Goal Parallelize and make Multigrid faster than before (with similar level of accuracy) SharedArray, 4 procs

Motivation – Gauss Seidel Solving PDE with Finite Difference discretization Gauss-Seidel iteration – uses nearby points to update Solving Ax = b, using It kills high frequency errors really fast, but really slow afterwards

1D Error FAST (killing high-freq error) SLOW (killing low-freq error)

Multigrid Hierarchy of Grids

Multigrid – Going Down (To coarsest grid) Sending Residual(Estimated error) recursively to coarser grid Residual r = b – Ax = Au - Ax, where u is true solution for Au = b Solve Residual equation, Obtain Error correction term solve Ax’ = r and then u = x+x’ (x’ corrects x when going up) Restriction function

Multigrid – Going Up (To original grid) At bottom level(coarsest grid), we could solve the residual equation exactly (There is only one point in coarsest grid!!) Sending Error correction term recursively up to finer grids, until we reach initial grid Prolongation(Linear Interpolation)

1D Multigrid - Initialization FAST (killing high-freq error)

1D Error : Points we’re using : Points we’re not using FAST (1 point – exactly solve) Level 1

1D Error : Points we’re using : Points we’re not using FAST (1 point – exactly solve) Level 1

1D Error : Points we’re using : Points we’re not using FAST (high-freq due to center point) Level 2

1D Error : Points we’re using : Points we’re not using FAST (high-freq due to center point) Level 2

1D Error : Points we’re using : Points we’re not using FAST (high-freq errors) Level 3

1D Error : Points we’re using : Points we’re not using FAST (high-freq errors) Level 3

1D Error : Points we’re using : Points we’re not using FAST (high-freq errors) Level 4 (Original)

1D Error : Points we’re using : Points we’re not using FAST (high-freq errors) Level 4 (Original)

Multigrid O(N) computational cost, N = number of grid points Known as one of the fastest solvers Multigrid.jl, AMG.jl, existing julia packages for Multigrid

Parallelizing 1 - Gauss-Seidel WORKER 1 WORKER 2 WORKER 3 WORKER 4

Parallelizing 1 - Gauss-Seidel WORKER 1 WORKER 2 WORKER 3 WORKER 4

Parallelizing 1 - Gauss-Seidel function GS_mix!

Parallelizing 1 - Gauss-Seidel GS gets almost 2 times faster than before Gets faster and faster with large N Even more accurate!

Parallelizing 2 – Restriction/Prolongation Parallelizing Restriction and Prolongation functions Restriction stencil : Prolongation : (Linear interpolation)

Parallelizing 2 – Restriction/Prolongation Again, divide domain into 4 regions Sending Residuals/Interpolate separately Parallelized version beats normal version after level 12 grid (~17000000 points)

V-Cycles and W-Cycles

Parallelizing - Around 1.5 times faster Normal V-cycle Level 10 2.4sec Error rate 0.016 3.6sec Error rate 0.026 W-cycle Level 12 192sec Error rate 6.9E-5 306sec Error rate 0.0001 Error rate = norm(error)/norm(solution)