The project discusses the ability to utilize parallel processing to solve the problem of matrix multiplication, especially multiplying two matrices of the squared size of MxM of randomly generated numbers. With the employment of OpenMP API of C language.
In this project, you need to write a parallel program using OpenMP that calculates the multiplication of 2 matrices A and B of size MxM.
Run the code using p= 1,2,3,4 processors (threads) and with M=100, 200, 500, 1000, 2000 sizes. Print the results in a table. You need to run each case multiple times to take a representative average. When measuring the time make sure that the machine has only the parallel program running to reduce variations in run time measurement. Also, find the speedup and efficiency for each run and list it down in a table.
Before starting, test your program on a small matrix (M=3) to make sure the multiplication is correct before running for a large size matrix to measure the time.
Finally, write a report that summarizes your experiment, also observations, and conclusions.
You can find The Team Report and The Individual Report -contains other observations besides the team report- of the project in the repository.
In a terminal or command window, navigate to the top-level project directory Parallel-Matrix-Multiplication/
(that contains this README) and run the following command:
gcc -o Matrix_multi -fopenmp Matrix_multi.c
Then run the following command:
Matrix_multi
- Installation
- Note that OpenMP does come with some gcc versions.
- HelloWorld example