Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 584. Logic The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding. The basis of.

Similar presentations


Presentation on theme: "CS 584. Logic The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding. The basis of."— Presentation transcript:

1 CS 584

2 Logic The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding. The basis of logic is the syllogism, consisting of a major and minor premise and a conclusion.

3 Example n Major Premise: Sixty men can do a piece of work sixty times as quickly as one man. n Minor Premise: One man can dig a post- hole in sixty seconds. n Conclusion: Sixty men can dig a post-hole in one second.

4 Performance Analysis: "Tar Baby" n Ask the right questions n Questions to consider –What is time? –What is work? n Objectivity is the key –Take a step back from your program

5 Performance Analysis Statements n There is always a trade-off between time and solution quality. n We should compare the quality of the answer for a given execution time. n For any performance reporting, find and clearly state the quality measure.

6 Efficiency n Efficiency is defined as speedup/P n With superlinear speedup efficiency > 1 –Does cache make a processor work at 110%? n Why is communication not considered work but rather overhead?

7 Speedup n Conventional speedup is defined as the reduction in execution time. n Consider running a problem on a slow parallel computer and on a faster one. –Same serial component –Speedup will be lower on the faster computer.

8 Speedup and Amdahl's Law n Conventional speedup penalizes faster absolute speed. n Assumption that task size is constant as the computing power increases results in an exaggeration of task overhead. n Scaling the problem size reduces these distortion effects.

9 Solution n Gustafson introduces scaled speedup. n Scale the problem size as you increase the number of processors. n Calculated in two ways –Experimentally –Analytical models

10 Traditional Speedup )( )( 1 NC NC Speedup P  C 1 is complexity (time) taken on a single processor C P is complexity (time) taken on P processors

11 Scaled Speedup )( )( 1 PNC C Speedup P  C 1 is complexity (time) taken on a single processor C P is complexity (time) taken on P processors

12 Experimental Scaled Speedup n Keep the ratio N/P constant between single processor case and many processor case when testing n Example:Calculate the speedup for 8, and 16 processors. –N/P = 256 n How big should the problem be?

13 Using analytical models n Examine the control flow of the algorithm n Find a general algebraic form for the complexity (execution time). n Fit the curve with experimental data. n If the fit is poor, find the missing terms and repeat. n Calculate the scaled speedup using formula.

14 Example n Serial Time = 2 + 12 N seconds n Parallel Time = 4 + 12 N/P + 5P seconds n Let N/P = 128 n Scaled Speedup for 4 processors is: 93.3 1560 6146  )4(5)4/)128(4(124 ))128(4(122    )( )( 1  PNC C P

15 Traditional Speedup ideal measured Number of Processors Speedup

16 Scaled Speedup ideal Number of Processors Speedup Small problem Medium problem Large Problem

17 Assignment n Problems on the web n Create a model for your program n Use the model to calculate –traditional speedup –scaled speedup n Experimentally calculate the values n Compare the results.


Download ppt "CS 584. Logic The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding. The basis of."

Similar presentations


Ads by Google