UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS
University of West Attica · Department of Computer Engineering and Informatics
Parallel Systems
Vasileios Evangelos Athanasiou
Student ID: 19390005
Supervision
Supervisor: Vasileios Mamalis, Professor
Co-supervisor: Michalis Iordanakis, Academic Scholar
Athens, December 2024
This repository contains laboratory simulations and source code for Parallel Computing using OpenMP, developed as part of the Parallel Systems course at the University of West Attica. The focus is on matrix operations, diagonal dominance checking, and parallel reduction algorithms using the fork-join model.
All exercises are implemented in C using OpenMP.
- GCC Compiler (version supporting OpenMP, typically ≥ 4.2)
- OpenMP library support
- Operating System: Linux, macOS, or Windows (via WSL or MinGW)
- Text Editor / IDE for source code editing (VSCode, CLion, etc.)
- Spreadsheet Viewer for analyzing timing results (
docs/Times.xlsx)
Clone using Git:
git clone https://github.com/Parallel-Systems-aka-Uniwa/OpenMP.gitAlternatively, download the ZIP file and extract it locally.
cd OpenMPEnsure the following structure exists:
assign/
docs/
src/
README.mdsrc/ contains the main program (omp.c) and input files for exercises A and B.
docs/ contains documentation and performance results.
Compile the OpenMP C program using GCC:
gcc -o omp omp.c -fopenmpExplanation:
-o omp → output executable named omp
-fopenmp → enables OpenMP directives
Run the program with two arguments:
- Input file for Task A (matrix file)
- Input file for Task B (matrix file)
Example:
./omp src/A/A_T8_N400_CZ20.txt src/B/B_T8_N400_CZ20.txt- Output will be saved automatically in
src/Output/with names matching the input configuration.
- Task A files:
src/A/– matrices for diagonal dominance and other operations - Task B files:
src/B/– matrices for the second task (maximum diagonal, B matrix generation, etc.)
File naming pattern:
A_T<Threads>_N<Size>_CZ<Chunk>.txtExample: A_T12_N1000_CZ100.txt → 12 threads, 1000×1000 matrix, chunk size 100.
All results are saved to src/Output/:
- Contains task results: dominance check, maximum diagonal, B matrix, minimum element (via different methods)
- File names correspond to input configuration for easy correlation
- Modify thread count or chunk size in input files
- Compare sequential vs parallel execution
- Analyze speedup using the timing results in
docs/Times.xlsx
