Presentation is loading. Please wait.

Presentation is loading. Please wait.

MultiGrid.

Similar presentations


Presentation on theme: "MultiGrid."— Presentation transcript:

1 MultiGrid

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

3 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

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

5 Multigrid Hierarchy of Grids

6 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

7 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)

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

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

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

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

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

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

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

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

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

17 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

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

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

20 Parallelizing 1 - Gauss-Seidel
function GS_mix!

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

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

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

24 V-Cycles and W-Cycles

25 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 Error rate = norm(error)/norm(solution)


Download ppt "MultiGrid."

Similar presentations


Ads by Google