This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CSci 5451, S’10 Midterm # 2 Apr. 12th, 2010 No documents are allowed  except for a 2page 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 backpage 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 costoptimal 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.
 Spring '08
 Staff
 Algorithms

Click to edit the document details