HPC - Assignment 1
HPC - Assignment 1
Objective
The objective of this assignment is to implement a parallel program for matrix addition
using OpenMP. This exercise will enhance your understanding of parallel computing
and the use of OpenMP for performance optimization.
Instructions
1. Setup: Ensure you have a C/C++ compiler with OpenMP support (e.g., GCC).
2. Task:
o Write a program that adds two N×N matrices and stores the result in a
third matrix. The size N should be defined by the user.
3. Requirements:
o Implement a function to add the matrices and store the result in a third
matrix C.
1. Matrix Initialization:
2. Matrix Addition:
4. Output:
o Print the resulting matrix C (optional: print only a portion for large
matrices).
Submission Requirements
Deadline
• [Saturday, November 2 ]