Question: USING C LANGUAGE Problem 3: Matrix Multiplication Write a parallel program that takes, as a command line argument, the name of a file and reads

USING C LANGUAGE

USING C LANGUAGE Problem 3: Matrix Multiplication Write a parallel program that

Problem 3: Matrix Multiplication Write a parallel program that takes, as a command line argument, the name of a file and reads from it first two integers that correspond to the dimensions (number of columns and number of rows) of the first matrix followed by the elements of the matrix, then two integers that correspond to the dimensions of the second matrix followed by the clements of the second matrix. The two matrices are read into two 2- dimensional arrays. Your program should compute their multiplication and write the result to an output file. Note: you must handle the case when the matrices cannot be multiplied by printing "No answer" in this case. Sample input: 3 Sample output: 17 17 7 31 11 40 4 1 250 3014 5223 2 02 15 31 16 Test your program on the provided text file Input2.txt Measure the execution time in your program using the function MPI_Wtime as was explained in Problem I Report in a tabular form the execution time of your program when using 1, 2, and 4 processors. Draw your conclusions on the speedups obtained. Note: A report should be submitted where you describe your parallel implementation for every problem and report in tabular form, the execution

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!