5d0 ri1i2i3 025d0 ri1 1i2i3 ri11i2i3

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: to understand from the code –  terse variable names –  SPMD-style programming details http://www.nas.nasa.gov/Software/NPB/ The NAS MG Benchmark Mathematically: use a 3D multigrid method to find an approximate solution to a discrete Poisson problem (∇2u = v) MG’s arrays V: input array U: hierarchical work arrays R: Overview of MG run timed portion initialize V output norms & timings MG’s Timed Portion repeat nit times resid resid norm2u3 rnm2 rnmu Configurations mg3p S: W: A: B: C: D: 3 23 6 43 2563 2563 5123 10243 (4 iterations) (40 iterations) (4 iterations) (20 iterations) (20 iterations) (50 iterations) Hierarchical Arrays level 0 level 1 level 2 (1:8,1:8) (1:4,1:4) (1:2,1:2) level 3 conceptually: dense indexing: (1:1,1:1) Requires a distinct conceptual distribution per level strided indexing: (1:8:1,1:8:1) (1:8:2,1:8:2) (1:8:4,1:8:4) (1:8:8,1:8:8) Admits a single conceptual distribution across levels Hierarchical Arrays level 0 level 1 level 2 (1:8,1:8) (1:4,1:4) (1:2,1:2) level 3 conceptually: dense indexing: (1:1,1:1) strided indexing: (1:8:1,1:8:1) (2:8:2,2:8:2) (4:8:4,4:8:4) (8:8:8,8:8:8) MG’s Guts (mg3P) resid psinv rprj3 interp resid psinv rprj3 interp resid psinv rprj3 interp psinv 27-point stencils = w1 = w2 = w3 = = w4 = + + Our First Stencil: resid(R, V, U) R V = R , - convolve( =...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online