ΕΡΓΟ ΘΑΛΗΣ (MIS 379416) – 19/07/2013 – Παν. Αλεφραγκής - Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε Clusters με MPI Systems 1
Επισκόπηση παράλληλων μεθόδων επίλυσης Επισκόπηση παράλληλων μεθόδων επίλυσης ΜΔΕ σε ΜΔΕ σε Clusters Clusters με με 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
Init ial 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
00.5
11.5
22.5
3
11.5
2
2.5
3
3.5
4-3
-2
-1
0
1
2
xy
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 T4T5
T1
T2
T3T4 T5
Piecewise Linear Approximation
T
x
T1
T2T3 T3
T4 T5
T
T1
T2
T3T4 T5
Piecewise Quadratic Approximation
x
Temperature Continuous but with Discontinuous Temperature Gradients
Temperature and Temperature GradientsContinuous
ΕΡΓΟ ΘΑΛΗΣ (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
Ευχαριστώ!Ευχαριστώ!
Top Related