Parallel Programming
Department of Computer Engineering Sharif University of Technology e-mail: azad@sharif.edu
Instructor
Programming Instructor PanteA Zardoshti Department of Computer - - PowerPoint PPT Presentation
Parallel Programming Instructor PanteA Zardoshti Department of Computer Engineering Sharif University of Technology e-mail: azad@sharif.edu Object Learn how to program numberical methods 2 Computational Mathematics, OpenMP , Sharif
Department of Computer Engineering Sharif University of Technology e-mail: azad@sharif.edu
Instructor
Computational Mathematics, OpenMP , Sharif University Fall 2015 2
Learn how to program numberical methods Object
3
Single CPU Performance
Computational Mathematics, OpenMP , Sharif University Fall 2015
3
Single CPU Performance
Computational Mathematics, OpenMP , Sharif University Fall 2015
3
Single CPU Performance
Computational Mathematics, OpenMP , Sharif University Fall 2015
4
Memory Wall
Process cessor-Memo Memory ry Perfor formanc ance e Gap Growi wing
Source:Intel
Computational Mathematics, OpenMP , Sharif University Fall 2015
5
Power Wall
Source: Hennessy and Patterson, Computer Architecture: A Quantitative Approach, 4th edition, 2006
Computational Mathematics, OpenMP , Sharif University Fall 2015
6
computation:
What is Serial Computing?
Computational Mathematics, OpenMP , Sharif University Fall 2015
6
computation:
(CPU);
What is Serial Computing?
CPU
Computational Mathematics, OpenMP , Sharif University Fall 2015
6
computation:
(CPU);
What is Serial Computing?
CPU
Problem
Computational Mathematics, OpenMP , Sharif University Fall 2015
6
computation:
(CPU);
What is Serial Computing?
CPU
Computational Mathematics, OpenMP , Sharif University Fall 2015
6
computation:
(CPU);
What is Serial Computing?
CPU
t1 t1 t2 t2 t3 t3 Computational Mathematics, OpenMP , Sharif University Fall 2015
6
computation:
(CPU);
What is Serial Computing?
CPU
t2 t2 t3 t3 Computational Mathematics, OpenMP , Sharif University Fall 2015
7
What is Parallel Computing?
compute resources to solve a computational problem.
Computational Mathematics, OpenMP , Sharif University Fall 2015
7
What is Parallel Computing?
compute resources to solve a computational problem.
CPU CPU CPU
Computational Mathematics, OpenMP , Sharif University Fall 2015
7
What is Parallel Computing?
compute resources to solve a computational problem.
CPU CPU CPU
Pro bl bl em em
Computational Mathematics, OpenMP , Sharif University Fall 2015
7
What is Parallel Computing?
compute resources to solve a computational problem.
CPU
t1 t1 t2 t2 t3 t3
CPU
t1 t1 t2 t2 t3 t3
CPU
t1 t1 t2 t2 t3 t3
Computational Mathematics, OpenMP , Sharif University Fall 2015
7
What is Parallel Computing?
compute resources to solve a computational problem.
different CPUs
CPU
t2 t2 t3 t3
CPU
t2 t2 t3 t3
CPU
t2 t2 t3 t3
Computational Mathematics, OpenMP , Sharif University Fall 2015
8
Computational Mathematics, OpenMP , Sharif University Fall 2015
9
specialized computer resources (GPU, Xeon phi …);
network;
Parallel Computing: Resources
Computational Mathematics, OpenMP , Sharif University Fall 2015
10
Why Parallel Computing?
Computational Mathematics, OpenMP , Sharif University Fall 2015
11
Principles of Parallel Computing
Computational Mathematics, OpenMP , Sharif University Fall 2015
12
sequentially, so f is fraction parallelizable
Amdahl’s Law
Computational Mathematics, OpenMP , Sharif University Fall 2015
12
sequentially, so f is fraction parallelizable
Amdahl’s Law
Computational Mathematics, OpenMP , Sharif University Fall 2015
12
sequentially, so f is fraction parallelizable
Amdahl’s Law
Sp Speedup(P)=Time(1)/Tim ime(P) Maximum Sp Speedup < <(1 – F) / 1 + F / N
Computational Mathematics, OpenMP , Sharif University Fall 2015
12
sequentially, so f is fraction parallelizable
Amdahl’s Law
Sp Speedup(P)=Time(1)/Tim ime(P) Maximum Sp Speedup < <(1 – F) / 1 + F / N
Computational Mathematics, OpenMP , Sharif University Fall 2015
12
sequentially, so f is fraction parallelizable
processors
Amdahl’s Law
Sp Speedup(P)=Time(1)/Tim ime(P) Maximum Sp Speedup < <(1 – F) / 1 + F / N
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
13
Granularity
Computational Mathematics, OpenMP , Sharif University Fall 2015
14
Locality
Computational Mathematics, OpenMP , Sharif University Fall 2015
14
Locality
Computational Mathematics, OpenMP , Sharif University Fall 2015
14
Locality
Computational Mathematics, OpenMP , Sharif University Fall 2015
14
Locality
Computational Mathematics, OpenMP , Sharif University Fall 2015
15
the system are idle due to
Load Balance
Computational Mathematics, OpenMP , Sharif University Fall 2015
16
this can be accomplished, such as through a shared memory bus or
commonly referred to as communications regardless of the method employed.
Coordination and Synchronization
Computational Mathematics, OpenMP , Sharif University Fall 2015
16
this can be accomplished, such as through a shared memory bus or
commonly referred to as communications regardless of the method employed.
with communications. Often implemented by establishing a synchronization point within an application where a task may not proceed further until another task(s) reaches the same or logically equivalent point.
Coordination and Synchronization
Computational Mathematics, OpenMP , Sharif University Fall 2015
17
Parallel Computing Platforms
Computational Mathematics, OpenMP , Sharif University Fall 2015
18
Shared vs. Distributed Memory
CPU CPU CPU CPU
Shared d Memory
Computational Mathematics, OpenMP , Sharif University Fall 2015
18
Shared vs. Distributed Memory
CPU CPU CPU CPU
Shared d Memory
CPU Mem CPU Mem CPU Mem CPU Mem
Netw twork rk
Computational Mathematics, OpenMP , Sharif University Fall 2015
19
Computational Mathematics, OpenMP , Sharif University Fall 2015
19
Computational Mathematics, OpenMP , Sharif University Fall 2015
20
SIMD Example: SSE
Computational Mathematics, OpenMP , Sharif University Fall 2015
21
Slide Source: Dr.khunjush , Shiraz University
Computational Mathematics, OpenMP , Sharif University Fall 2015
21
Slide Source: Dr.khunjush , Shiraz University
Computational Mathematics, OpenMP , Sharif University Fall 2015