Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(1) Use a centralized work pool approach (see section 7.2.1 on page 204 of textbook) to write an MPI-based parallel matrix multiplication program (assume both

image text in transcribed

(1) Use a centralized work pool approach (see section 7.2.1 on page 204 of textbook) to write an MPI-based parallel matrix multiplication program (assume both matrices have each N rows and N columns). A master process generates (randomly) and broadcasts the two matrices to be multiplied. The master process then maintains a pool of tasks each corresponding to the multiplication of one row of the first matrix by one column of the second matrix. Each worker process repeatedly requests and receives one task from the master process, performs the task and returns the result to the master process. The master process outputs the result matrix after completion of all tasks. (2) Analyze the run-time complexity of your solution. (3) Measure the execution time T of your program experimentally for a fixed number of parallel processes p - 4 and aryingatris size N- 1024, 048, 409%, 8192. Plot the execution time as a function of N. (4) Measure the execution time T of your program experimentally for a fixed N- 1024 and a varying number of processes p= 1,2,4,8. Plot the execution time as a function ofp. (5) From the results of (3) and (4) plot the speedup Sp as a function of N and as a function of p (two plots are required one plotting Sp as a function of N and the other as a function of p). (1) Use a centralized work pool approach (see section 7.2.1 on page 204 of textbook) to write an MPI-based parallel matrix multiplication program (assume both matrices have each N rows and N columns). A master process generates (randomly) and broadcasts the two matrices to be multiplied. The master process then maintains a pool of tasks each corresponding to the multiplication of one row of the first matrix by one column of the second matrix. Each worker process repeatedly requests and receives one task from the master process, performs the task and returns the result to the master process. The master process outputs the result matrix after completion of all tasks. (2) Analyze the run-time complexity of your solution. (3) Measure the execution time T of your program experimentally for a fixed number of parallel processes p - 4 and aryingatris size N- 1024, 048, 409%, 8192. Plot the execution time as a function of N. (4) Measure the execution time T of your program experimentally for a fixed N- 1024 and a varying number of processes p= 1,2,4,8. Plot the execution time as a function ofp. (5) From the results of (3) and (4) plot the speedup Sp as a function of N and as a function of p (two plots are required one plotting Sp as a function of N and the other as a function of p)

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_2

Step: 3

blur-text-image_3

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago