1 / 17

CS 584

CS 584. 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. Example.

Télécharger la présentation

CS 584

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 • Major Premise: Sixty men can do a piece of work sixty times as quickly as one man. • Minor Premise: One man can dig a post-hole in sixty seconds. • Conclusion: Sixty men can dig a post-hole in one second.

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

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

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

  7. Speedup • Conventional speedup is defined as the reduction in execution time. • 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 • Conventional speedup penalizes faster absolute speed. • Assumption that task size is constant as the computing power increases results in an exaggeration of task overhead. • Scaling the problem size reduces these distortion effects.

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

  10. Traditional Speedup C ( N ) = 1 Speedup C ( N ) P C1 is complexity (time) taken on a single processor CP is complexity (time) taken on P processors

  11. C ( PN ) = 1 Speedup C ( PN ) P Scaled Speedup C1 is complexity (time) taken on a single processor CP is complexity (time) taken on P processors

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

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

  14. + C ( PN ) 2 12 ( 4 ( 128 )) 6146 = = = 1 3 . 93 + + C ( PN ) 4 12 ( 4 ( 128 ) / 4 ) 5 ( 4 ) 1560 P Example • Serial Time = 2 + 12 N seconds • Parallel Time = 4 + 12 N/P + 5P seconds • Let N/P = 128 • Scaled Speedup for 4 processors is:

  15. Traditional Speedup ideal Speedup measured Number of Processors

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

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

More Related