MT2_2010_sol - CSci 5451 S10 Midterm 2 Apr 12th 2010 No...

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

View Full Document Right Arrow Icon
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]
Image of page 1

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

View Full Document Right Arrow Icon
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 0 3 18 10 parenrightbigg A = parenleftbigg 1 0 2 3
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern