Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Since your boss is so eager to see results, you hire two interns to help you with the parallelization. Intern Susie Cyclic implements the above

image text in transcribed

Since your boss is so eager to see results, you hire two interns to help you with the parallelization. Intern Susie Cyclic implements the above computation with P MPI processes. Her strategy is to make process p compute all of the (valid) rows p+ np for n = 0,1,2, and use MPI gather operation to collect all the values at the root process to render the fractal Intern Joe Block implements the above computation with P MPI processes as well. His strat- egy is to make process p compute all of the (valid) rows pN,pN +1,pN + 2,..pN(N - 1) where N height/P and then use MPI gather to collect all of the values at the root process for rendering the fractal. Which do you think is better? Why? Which intern do you offer a full-time job? HINT: The Mandelbrot function can require anywhere from 0 to 511 iterations per row. In general, you may not know beforehand how best to distribute the tasks. In the worst case, you could get a list of jobs that makes any specific distribution the worst possible. Another option when the number of jobs is much greater than the number of processes is to let each process request a job whenever it has finished the previous one it was given. This is the master/slave model. The master is responsible for giving each process a unit of work, receiving the result from any slave that completes its job, and sending slaves new units of work. A slave process is responsible for receiving a unit of work, completing the unit of work, sending the result back to the master, and repeating until there is no work left. Implement the Mandelbrot image computation using a master/slave MPI strategy in mandelbrot_ms.cc where a job is defined as computing a row of the image. Communicate as little as possible. Compare the master/slave strategy with Susie/Joe's implementation. Which do you think will scale to very large image sizes? Why

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Where Does Money Grow

Authors: Beth McGuinness

1070202150, 978-1070202150

More Books

Students also viewed these Accounting questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago