Question
Parallel Computing Lab 5 Performance In this Lab you are going to measure the performance of a parallel program. Parallel program in practice: Multiplication of
Parallel Computing Lab 5
Performance
In this Lab you are going to measure the performance of a parallel program.
Parallel program in practice: Multiplication of matrices written in Lab4.
Instructions:
Run your program of multiplication of matrices sequentially (using just one thread).
Measure the time of execution of the program serially (Ts).
Measure the time of execution of the Parallel program (Tp) with 2 Cores, 4 Cores, 16 cores (modify number of threads).
Compute the Speedup with 2 Cores, 4 Cores, and 16 cores
Speedup = Ts / Tp
Measure the efficiency of the parallel program
Efficiency = S/ p
| p=1 | p=2 | p=4 | p=8 | p= 16 |
Speed up (S) |
|
|
|
|
|
Efficiency (E) |
|
|
|
|
|
Modify the size of the problem (double the size of the matrices), and measure again the SpeedUp and Efficiency. What do you observe?
Double size matrices | p=1 | p=2 | p=4 | p=8 | p= 16 |
Speed up (S) |
|
|
|
|
|
Efficiency (E) |
|
|
|
|
|
Using Amdahls Law calculate the maximum speedup gain of the program assuming that 60 percent of parallel component for two processing cores and four processing cores.
Amdahls Law: Speedup = 1 / (s + (1 s) / N) where s is the portion of the application that must be performed serially, and N is the number of processing cores.
For 2 processing cores and 60 percent parallel component, s is 40 percent or 0.4 and N is 2.
1/0.4+(0.6/2) = 1. 42
M speed up: 1/ 1-p = 1/1-0.6 = (2.5)
For 4 processing cores and 60 percent parallel component, s is 40 percent or 0.4 and N is 4.
1/0.4+(0.6/4) = 1.8
M speed up: 1/ 1-p = 1/1-0.6 = (2.5)
(a) For two processing cores and 60 percent parallel component, S is 40 percent that is 0.4 and N is 2.
speedup <= 1/(0.4 + (1-0.4)/2 speedup <= 1.428 Speedup gain is 1.428 times.
(b) For four processing cores and 60 percent parallel component Here, S is 40 percent that is 0.4 and N is 4
speedup <= 1/(0.4 + (1-0.4)/4) speedup <= 1.81 Speedup gain is 1.81 times.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started