MT2_2010_sol - CSci 5451 S’10 Midterm 2 Apr 12th 2010 No...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSci 5451, S’10 Midterm # 2 Apr. 12th, 2010 No documents are allowed - except for a 2-page formula sheet. Weights are indicated in bold at the end of each question. Base is: 100. There are 4 parts: (A), (B), (C), and (D) - see back-page Notation: p represents the number of processors. A. General questions . Very brief or Yes/No answers needed. 1. The execution time of a parallel program will always decrease or stay the same if we use more processors (Yes/No) [4 pts] Answer: No it can very well increase due to the overhead 2. Cannon’s algorithm is cost-optimal when p ≤ n 2 (Yes/No) [4 pts] Answer: Yes. 3. Name the MPI command that is required to compute the sum of p numbers (one on each processor) if we want the result of the sum to be available in each processor. [4 pts] Answer: MPI Allreduce 4. Give one reason why Amdahl’s law does not yield a realistic model in practice. [4 pts] Answer: The model involves a problem of fixed size which is not realistic in practice. Other acceptable answer: too simplistic model [only time for float operations counted. ] 5. Consider two algorithm (A) and (B) whose isoefficiency functions are Θ( p 2 ) for (A) and Θ( p 2 log p ) for (B). Which one is likely to have a bigger overhead (for large p )? [4 pts] Answer: (B) of course B. Show how Cannon’s algorithm would be executed for performing the product of the following 2 matrices (assuming a 2 × 2 mesh of processors) A = parenleftbigg 0 1 2 3 parenrightbigg B = parenleftbigg 4 5 − 6 − 3 parenrightbigg [Hint: show the matrices A,B after the initial alignment and the states of the matrices C,A,B after the first and second steps.] [16 pts] Answer: Initial Alignment : A = parenleftbigg 0 1 3 2 parenrightbigg B = parenleftbigg 4 − 3 − 6 5 parenrightbigg 1st step: [update C then shift A,B ] C = parenleftbigg − 3 − 18 10...
View Full Document

This note was uploaded on 10/21/2011 for the course CSCI 5451 taught by Professor Staff during the Spring '08 term at Minnesota.

Page1 / 5

MT2_2010_sol - CSci 5451 S’10 Midterm 2 Apr 12th 2010 No...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online