Assignment 04 Matrix Multiplication
Assignment 04 Matrix Multiplication
Task 1
Write a parallel computer program to multiply 2 square matrices using parallel technologies studied
in this course. You need to write 4 different programs for all the four technologies given below.
The program should accept two arguments on command line. The first argument is matrix size and
second argument is number of processes (for MPI) or number of threads (for pThreads / Open MP) or
number of blocks (for CUDA). Program must generate square matrix elements at random and in
parallel. Use suitable parallel random library to complete the task. You need to display top-left 5x5
matrix as result on console for larger matrix size.
Task 2
Write a parallel computer program to calculate the value of PI. Use the formulas discussed in class and
are available on lecture slides. Don’t use the Monte Carlo method. You need to use the mathematical
series discussed in class and sum the individual terms to calculate the value of PI. You need to write 4
different programs for all the four technologies given below.
The program should accept two arguments on command line. The first argument is number of terms
in series to add and second argument is number of processes (for MPI) or number of threads (for
pThreads / Open MP) or number of blocks (for CUDA). Finally Display the calculated value of PI on
console.
Deliverables
Submit on canvas, see the rubrics there for more details grading of each part.
Zero tolerance policy for plagiarism. Please come with your own code no matter how bad is it.