cs140-stencilmeshgraph

cs140-stencilmeshgraph - Computation on Computation meshes,...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Computation on Computation on meshes, meshes, sparse matrices, sparse matrices, and graphs and graphs Some slides are from David Culler, Jim Demmel, Bob Lucas, Horst Simon, Kathy Yelick, et al., UCB CS267
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Parallelizing Stencil Computations Parallelizing Stencil Computations Parallelism is simple Grid is a regular data structure Even decomposition across processors gives load balance Spatial locality limits communication cost Communicate only boundary values from neighboring patches Communication volume v = total # of boundary cells between patches
Background image of page 2
3 Two-dimensional block decomposition Two-dimensional block decomposition n mesh cells, p processors Each processor has a patch of n/p cells Block row (or block col) layout: v = 2 * p * sqrt(n) 2-dimensional block layout: v = 4 * sqrt(p) * sqrt(n)
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Ghost Nodes in Stencil Computations Ghost Nodes in Stencil Computations Comm cost = α * (#messages) + β * (total size of messages) Keep a ghost copy of neighbors’ boundary nodes Communicate every second iteration , not every iteration Reduces #messages, not total size of messages Costs extra memory and computation Can also use more than one layer of ghost nodes Gr e e n = my i nt e r i or node s Ye l l ow = ne i ghbor s ’ boundar y node s = my “ghos t node s ” Bl ue = my boundar y node s
Background image of page 4
5 Parallelism in Regular meshes Parallelism in Regular meshes Computing a Stencil on a regular mesh need to communicate mesh points near boundary to neighboring processors. Often done with ghost regions Surface-to-volume ratio keeps communication down, but Still may be problematic in practice Implemented using “ghost” regions. Adds memory overhead
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Irregular mesh: NASA Airfoil in 2D Irregular mesh: NASA Airfoil in 2D
Background image of page 6
7 Composite Mesh from a Mechanical Structure Composite Mesh from a Mechanical Structure
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Adaptive Mesh Refinement (AMR) Adaptive Mesh Refinement (AMR) Adaptive mesh around an explosion Refinement done by calculating errors
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

cs140-stencilmeshgraph - Computation on Computation meshes,...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online