Skip to content

A performance analysis of matrix multiplication in C++ and Java, comparing sequential and parallel implementations, developed for the Parallel and Distributed Computing course at FEUP.

License

Notifications You must be signed in to change notification settings

AFNeves/MultiMat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiMat: Sequential vs Parallel Computation

📖 Description

This project presents a performance analysis of matrix multiplication implemented in C++ and Java, comparing both sequential execution and OpenMP-parallelized versions. The study explores execution time, scalability, and cache performance when handling large-scale computations. It was developed as part of the Parallel and Distributed Computing course at FEUP.

📘 Documentation

A detailed report with the complete performance study, methodology, and results is available in:
doc/CPD_Proj1_Report.pdf

⚙️ Prerequisites

Before running the programs, ensure the following tools are installed:

  • A C++ compiler with OpenMP support (e.g., g++ or clang++)
  • Java Development Kit (JDK 21 recommended)
  • Bash (to execute the provided helper scripts)

🚀 How to Run

⚠️ Note: The programs perform very large matrix multiplications, which may take a significant amount of time to finish. For the C++ implementations, always use the provided scripts to guarantee the correct compilation flags are applied.

Java (Sequential)

Compile and run using the standard Java toolchain:

cd src
javac MatrixProduct.java
java MatrixProduct

C++ (Sequential)

Run the provided script to compile and execute:

cd src
./matrix.sh

C++ (Parallel with OpenMP)

Run the parallel version using the dedicated script:

cd src
./parallel.sh

👥 Authors

📎 License

This project is licensed under the terms of the MIT License.

About

A performance analysis of matrix multiplication in C++ and Java, comparing sequential and parallel implementations, developed for the Parallel and Distributed Computing course at FEUP.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •