
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Assignment Objectives: ๏ท To reinforce your understanding of some key concepts/techniques introduced in class. ๏ท To introduce you to doing independent study in parallel computing. Q.1 Marks 10 (=5+5) You are given a sample code for matrixโvector multiplication โmatvec1.cppโ using MPI. The comments in the program explain its working. Modify the program as: I. The program should take input ask you enter vector and matrix and dimensions online. II. Should read the vector and matrix from input file and generate an output file for results. Do it for p=n and p<n for each case. Q.2 Marks 30 (=2x(5+5+5)) I. You are given a sample code for matrixโmatrix multiplication โmatrix.cโ using MPI. Another program using cannonโs algorithm โmmult_cannon.cโ and a third program using foxโs algorithm take from Pacheco book (provided in my folder on data sever). The comments in these programs explain their working. The theory for fox algorithm is given in Pacheco book and some addition material is given in my folder of โProgramming Assignmentsโ. Convert these codes to C++. Modify the program as: a. The program should take input ask you input both matrices and their dimensions online. b. Should read the matrix from input file and generate an output file for results. Do it for p=n and p<n for each case. Implement the cannonโs and fox algorithms independently II. Extend part (I) to use DNS algorithm for p=n and p<n cases Measure the execution trimmings by using MPI function MPI_Wtime(). (Dr.Muhammad Hanif Durad)