Cache-Optimal Parallel Solution of PDEs Ch. Zenger Informatik V, TU München Finite Element Solution of PDEs Christoph Zenger Nadine Dieminger, Frank Günther, Wolfgang Herder, Andreas Krahnke, MiriamMehl, Tobias Neckel, Markus Pögl, Markus Langlotz, Tobias Weinzierl Institut für Informatik TU München
50
Embed
Cache-Optimal Parallel Solution of PDEs Ch. Zenger Informatik V, TU München Finite Element Solution of PDEs Christoph Zenger Nadine Dieminger, Frank Günther,
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Finite Element Solution of PDEs
Christoph ZengerNadine Dieminger, Frank Günther, Wolfgang Herder,
Andreas Krahnke, MiriamMehl, Tobias Neckel, Markus Pögl, Markus Langlotz, Tobias Weinzierl
Institut für Informatik TU München
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Problem:Numerical solution of partial differential equationsby the finite element method
Numerical kernel: Computation of the product:discrete operator A · approx. solution u
Desired properties:
•Multilevel scheme•adaptive•efficient on modern computer architectures•Parallel with good load balance•Complex geometries
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Concepts:
Hierarchical structures
• Informatics: Stacks and trees
• Geometry: space trees • Numerics: Hierarchical bases and generating systems
• Mathematics: Space filling curves
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Informatics Stack Binary tree
1
2
3
1
2
3
4
5
6
10
54
6
7
9
8 11
13
151412
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Ternary tree
1
2
3 54
6
7 98
10
11 1312
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Geometry:
quadtree ternary space tree
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Dimension recursive constructionternary space tree:
d steps in d dimensions instead of one
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Hierarcal structures in Numerics
Hierarchical basis and generating system
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Ternary hierarchical basis
ternary generating system
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Mathematics: Space filling curves
Basic template (Hilbert):
Recursive construction:
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Peano curve (dimension recursive):
Basic template:
Recursive construction:
Works for arbitrary dimension
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Space-Trees and Element-Oriented Operator Evaluation
21,,1,1,,1
,
4
h
uuuuuu jijijijiji
jihh
i,ji+1,j
i,j-1
i-1,j
i,j+1
11 -4 1
1
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Space-Trees and Element-Oriented Operator Evaluation
2
,1,,1
,21
21
h
uuuu
jijiji
jihh
i,ji+1,j
i,j-1
i-1,j
i,j+1
½ -1 ½
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Space-Trees and Element-Oriented Operator Evaluation
2
,1,,1
,21
21
h
uuuu
jijiji
jihh
i,ji+1,j
i,j-1
i-1,j
i,j+1
-1 ½½
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Space-Trees and Element-Oriented Operator Evaluation
2
,1,,1
,21
21
h
uuuu
jijiji
jihh
i,ji+1,j
i,j-1
i-1,j
i,j+1
½ -1 ½
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Space-Trees and Element-Oriented Operator Evaluation
2
,1,,1
,21
21
h
uuuu
jijiji
jihh
i,ji+1,j
i,j-1
i-1,j
i,j+1
½½ -1
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Concept of stacks:
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Space-Trees and Space-Filling Curves
• ordering of cells along the Peano-curve• line-stacks with alternating linear (locally
deterministic) processing order
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Adaptive Space-Trees and Space-Filling Curves
• adaptive grids, generating systems hiding of points on different levels
• additional colours, point stacks 8 stacks (independent of refinement depth)
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Locality
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
Locality:
Length of a cache line : m bytesLength of solution vector: s bytesMinimal number of cache misses: nmin = s/m.Actual number of cache misses: n = 1.1*nmin.
Memory efficiency
Essentially only solution data are storedDefinition of domain and refinement structure:only 2 bits per degree of freedom!( unknowns on a PC for Laplace equation)1010
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
3D-Poisson-equation on a cube
xu
xu
,0
,,1
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München
More complicated Domains
Cache-Optimal Parallel Solution of PDEsCh. Zenger Informatik V, TU München