SlideShare a Scribd company logo
1 of 18
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 1
Επισκόπηση παράλληλων μεθόδων επίλυσηςΕπισκόπηση παράλληλων μεθόδων επίλυσης
ΜΔΕ σεΜΔΕ σε ClustersClusters μεμε MPIMPI
Δρ. Παναγιώτης Αλεφραγκής
Τμ. Τηλεπικοινωνιακών Συστημάτων & Δικτύων
ΤΕΙ Δυτικής Ελλάδος
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 2
Computational Steps of PDE Solvers on Parallel
Processors
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 3
Cluster based PDE Solvers
●
Constraints
●
Distributed memory ( shared-nothing )“ ”
●
Access to data on remote machines through MPI
●
Architecture and network topology effects overall performance
●
Goals
●
Communication abstraction layer to hide communication
details within objects
●
Communication orchestration at a higher abstract leve
◦
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 4
PDE Parallelization Example
●
Step 1 :
●
Generate the finite element mesh and construct the dual (Geometrical)
graph of the finite element mesh.
●
In the dual graph, each node represent triangular element and edge
represent common triangle side between two triangles.
●
Apply a graph partitioning algorithm
●
Create nearly load balanced sub domains and to minimize the
interprocesser communications.
●
Multilevel recursive bisection algorithm can be used for graph
partition.
Step 2 :
●
Send the necessary mesh data and boundary data
●
the elementary matrices will be computed in parallel.
Step 3 :
●
A partial assembly of elementary matrices in the interior of each
subdomain will be done on each processor
●
triangles near the interface are marked to do the computations later.
●
require interporcessor communication.
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 5
Initial Mesh
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 6
Partioned Mesh for 8 PE
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 7
Parallel Sparse Matrix Distribution
•Each process locally owns a submatrix of contiguous global rows
•Each submatrix consists of diagonal and off-diagonal parts
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 8
Use of ghost nodes
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 9
Why is it worth manipulating the matrix?
●
No single data structure is appropriate for all problems
●
Blocked and diagonal formats provide significant
performance benefits
●
Achieving high performance still requires making most operations local
●
Matrix decomposition in contiguous chunks is simple
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 10
What is ParMETIS?
●
ParMETIS - Parallel Graph Partitioning and Fill-reducing
Matrix Ordering
●
MPI-based parallel library for
●
partitioning unstructured graphs and meshes
●
computing fill-reducing orderings of sparse matrices
●
Provides Algorithms for
●
Graph Partitioning
●
Mesh Partitioning
●
Graph Repartitioning
●
Partitioning Refinement
●
Matrix Reordering
●
Computes fill-reducing orderings of sparse matrices.
●
Uses a node-based nested dissection algorithm
●
Significantly outperform other popular reordering
algorithms.
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 11
Two-Dimensional Discretization
-1
-0.5
0
0.5
1
1.5
2
2.5
3
1
1.5
2
2.5
3
3.5
4
-3
-2
-1
0
1
2
x
y
u(x,y)
Approximate
Piecewise Linear
Representation
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 12
Discretization Concepts
x
T
Exact Temperature Distribution, T(x)
Finite Element Discretization
Linear Interpolation Model
(Four Elements)
Quadratic Interpolation Model
(Two Elements)
T1
T2
T2
T3 T3
T4 T4
T5
T1
T2
T3
T4 T5
Piecewise Linear Approximation
T
x
T1
T2
T3 T3
T4 T5
T
T1
T2
T3
T4 T5
Piecewise Quadratic Approximation
x
Temperature Continuous but with
Discontinuous Temperature Gradients
Temperature and Temperature Gradients
Continuous
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 13
PDE Parallelization
●
Step 4 :
●
Each PE selects a specified number equations to perform the
matrix solution techniques.
●
The selection of criteria is very important in order to ensure load
balance
●
identifying independenet set of nodes on the interface for each
sub-domain
●
Step 5 :
●
Identify the boundary nodes on every processor and apply
boundary conditions to obtain resultant nodal equations on every
processor.
Step 6 :
●
Every processes has a block matrix which corresponds to the
corresponding sub-domain.
●
Aplly the required computation method locally
●
Step 7 :
●
Present the final solution.
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 14
What is PETSc?
●
Toolkit for developing parallel, nontrivial PDE solvers
●
It is not
●
a black-box PDE solver
●
A silver bullet.
●
Portable to any parallel system supporting MPI, including:
●
Tightly coupled systems
●
Cray T3E, SGI Origin, IBM SP, HP 9000, Sub Enterprise
●
- Loosely coupled systems, such as networks of workstations
●
Compaq,HP, IBM, SGI, Sun, PCs running Linux or Windows
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 15
Δομή PETSc
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 16
Modern Parallel Programming on Clusters
●
PGAS - Partitioned global address space
●
Portions of the shared memory space may have an affinity for a
particular process
●
Unified Parallel C, Coarray Fortran, Titanium (current)
●
Chapel, X10 (next generation)
●
MPI3
●
Backwards compatible, code may be deprecated
●
Extension to collective operations
●
Generic fault tolerance support
●
Support for Remote Memory Access
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 17
Hybrid Cluster / Cloud Infrastructure
ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 18
Ευχαριστώ!Ευχαριστώ!

More Related Content

Viewers also liked

Μη τετραγωνικά συστήματα
Μη τετραγωνικά συστήματαΜη τετραγωνικά συστήματα
Μη τετραγωνικά συστήματαManolis Vavalis
 
Εισαγωγή στον Γραμμικό Προγραμματισμό
Εισαγωγή στον Γραμμικό ΠρογραμματισμόΕισαγωγή στον Γραμμικό Προγραμματισμό
Εισαγωγή στον Γραμμικό ΠρογραμματισμόManolis Vavalis
 
17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος
17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος
17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματοςManolis Vavalis
 
19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους
19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους
19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις ΥπόχωρουςManolis Vavalis
 
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου ΙστούManolis Vavalis
 
Διάλεξη 27η - Προβολές και ελάχιστα τετράγωνα
Διάλεξη 27η - Προβολές και ελάχιστα τετράγωναΔιάλεξη 27η - Προβολές και ελάχιστα τετράγωνα
Διάλεξη 27η - Προβολές και ελάχιστα τετράγωναManolis Vavalis
 
3η διάλεξη - Γραμμικά συστήματα
3η διάλεξη - Γραμμικά συστήματα3η διάλεξη - Γραμμικά συστήματα
3η διάλεξη - Γραμμικά συστήματαManolis Vavalis
 
20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων
20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων
20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών ΧώρωνManolis Vavalis
 
28η και 29η Διάλεξη - Ορίζουσες
28η και 29η Διάλεξη - Ορίζουσες28η και 29η Διάλεξη - Ορίζουσες
28η και 29η Διάλεξη - ΟρίζουσεςManolis Vavalis
 

Viewers also liked (10)

Μη τετραγωνικά συστήματα
Μη τετραγωνικά συστήματαΜη τετραγωνικά συστήματα
Μη τετραγωνικά συστήματα
 
Εισαγωγή στον Γραμμικό Προγραμματισμό
Εισαγωγή στον Γραμμικό ΠρογραμματισμόΕισαγωγή στον Γραμμικό Προγραμματισμό
Εισαγωγή στον Γραμμικό Προγραμματισμό
 
17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος
17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος
17η Διάλεξη - Επίλυση μη-τετραγωνικού συστήματος
 
19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους
19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους
19η Διάλεξη - Επανάληψη & Εισαγωγή στου Θεμελειώδεις Υπόχωρους
 
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
2η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
 
Διάλεξη 27η - Προβολές και ελάχιστα τετράγωνα
Διάλεξη 27η - Προβολές και ελάχιστα τετράγωναΔιάλεξη 27η - Προβολές και ελάχιστα τετράγωνα
Διάλεξη 27η - Προβολές και ελάχιστα τετράγωνα
 
3η διάλεξη - Γραμμικά συστήματα
3η διάλεξη - Γραμμικά συστήματα3η διάλεξη - Γραμμικά συστήματα
3η διάλεξη - Γραμμικά συστήματα
 
20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων
20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων
20η Διάλεξη - Βάσεις και Διαστάσεις Θεμελιωδών Χώρων
 
28η και 29η Διάλεξη - Ορίζουσες
28η και 29η Διάλεξη - Ορίζουσες28η και 29η Διάλεξη - Ορίζουσες
28η και 29η Διάλεξη - Ορίζουσες
 
1ο κεφάλαιο
1ο κεφάλαιο1ο κεφάλαιο
1ο κεφάλαιο
 

επισκόπηση παράλληλων μεθόδων επίλυσης μδε σε Clusters με mpi

  • 1. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 1 Επισκόπηση παράλληλων μεθόδων επίλυσηςΕπισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σεΜΔΕ σε ClustersClusters μεμε MPIMPI Δρ. Παναγιώτης Αλεφραγκής Τμ. Τηλεπικοινωνιακών Συστημάτων & Δικτύων ΤΕΙ Δυτικής Ελλάδος
  • 2. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 2 Computational Steps of PDE Solvers on Parallel Processors
  • 3. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 3 Cluster based PDE Solvers ● Constraints ● Distributed memory ( shared-nothing )“ ” ● Access to data on remote machines through MPI ● Architecture and network topology effects overall performance ● Goals ● Communication abstraction layer to hide communication details within objects ● Communication orchestration at a higher abstract leve ◦
  • 4. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 4 PDE Parallelization Example ● Step 1 : ● Generate the finite element mesh and construct the dual (Geometrical) graph of the finite element mesh. ● In the dual graph, each node represent triangular element and edge represent common triangle side between two triangles. ● Apply a graph partitioning algorithm ● Create nearly load balanced sub domains and to minimize the interprocesser communications. ● Multilevel recursive bisection algorithm can be used for graph partition. Step 2 : ● Send the necessary mesh data and boundary data ● the elementary matrices will be computed in parallel. Step 3 : ● A partial assembly of elementary matrices in the interior of each subdomain will be done on each processor ● triangles near the interface are marked to do the computations later. ● require interporcessor communication.
  • 5. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 5 Initial Mesh
  • 6. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 6 Partioned Mesh for 8 PE
  • 7. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 7 Parallel Sparse Matrix Distribution •Each process locally owns a submatrix of contiguous global rows •Each submatrix consists of diagonal and off-diagonal parts
  • 8. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 8 Use of ghost nodes
  • 9. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 9 Why is it worth manipulating the matrix? ● No single data structure is appropriate for all problems ● Blocked and diagonal formats provide significant performance benefits ● Achieving high performance still requires making most operations local ● Matrix decomposition in contiguous chunks is simple
  • 10. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 10 What is ParMETIS? ● ParMETIS - Parallel Graph Partitioning and Fill-reducing Matrix Ordering ● MPI-based parallel library for ● partitioning unstructured graphs and meshes ● computing fill-reducing orderings of sparse matrices ● Provides Algorithms for ● Graph Partitioning ● Mesh Partitioning ● Graph Repartitioning ● Partitioning Refinement ● Matrix Reordering ● Computes fill-reducing orderings of sparse matrices. ● Uses a node-based nested dissection algorithm ● Significantly outperform other popular reordering algorithms.
  • 11. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 11 Two-Dimensional Discretization -1 -0.5 0 0.5 1 1.5 2 2.5 3 1 1.5 2 2.5 3 3.5 4 -3 -2 -1 0 1 2 x y u(x,y) Approximate Piecewise Linear Representation
  • 12. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 12 Discretization Concepts x T Exact Temperature Distribution, T(x) Finite Element Discretization Linear Interpolation Model (Four Elements) Quadratic Interpolation Model (Two Elements) T1 T2 T2 T3 T3 T4 T4 T5 T1 T2 T3 T4 T5 Piecewise Linear Approximation T x T1 T2 T3 T3 T4 T5 T T1 T2 T3 T4 T5 Piecewise Quadratic Approximation x Temperature Continuous but with Discontinuous Temperature Gradients Temperature and Temperature Gradients Continuous
  • 13. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 13 PDE Parallelization ● Step 4 : ● Each PE selects a specified number equations to perform the matrix solution techniques. ● The selection of criteria is very important in order to ensure load balance ● identifying independenet set of nodes on the interface for each sub-domain ● Step 5 : ● Identify the boundary nodes on every processor and apply boundary conditions to obtain resultant nodal equations on every processor. Step 6 : ● Every processes has a block matrix which corresponds to the corresponding sub-domain. ● Aplly the required computation method locally ● Step 7 : ● Present the final solution.
  • 14. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 14 What is PETSc? ● Toolkit for developing parallel, nontrivial PDE solvers ● It is not ● a black-box PDE solver ● A silver bullet. ● Portable to any parallel system supporting MPI, including: ● Tightly coupled systems ● Cray T3E, SGI Origin, IBM SP, HP 9000, Sub Enterprise ● - Loosely coupled systems, such as networks of workstations ● Compaq,HP, IBM, SGI, Sun, PCs running Linux or Windows
  • 15. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 15 Δομή PETSc
  • 16. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 16 Modern Parallel Programming on Clusters ● PGAS - Partitioned global address space ● Portions of the shared memory space may have an affinity for a particular process ● Unified Parallel C, Coarray Fortran, Titanium (current) ● Chapel, X10 (next generation) ● MPI3 ● Backwards compatible, code may be deprecated ● Extension to collective operations ● Generic fault tolerance support ● Support for Remote Memory Access
  • 17. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 17 Hybrid Cluster / Cloud Infrastructure
  • 18. ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 18 Ευχαριστώ!Ευχαριστώ!

Editor's Notes

  1. IST-2001-34379 - AMDREL - WP6 - 03 June 2005 - Demo, INTRACOM SA. Consortium Confidential