Skip to content

An interactive tutorial on OpenMP & MPI for parallel programming

License

Notifications You must be signed in to change notification settings

soreana/openmp-mpi-workshop

Repository files navigation

OpenMP & MPI Interactive Tutorial

📌 Overview

This repository provides an interactive tutorial on OpenMP and MPI, covering fundamental parallel computing concepts, practical exercises, and real-world examples. The content is structured for ease of use with step-by-step explanations and runnable code inside a Jupyter Notebook.

OpenMP & MPI Tutorial

🚀 Getting Started

1️⃣ Clone the Repository

git clone https://github.com/yourusername/openmp-mpi-workshop.git
cd openmp-mpi-workshop

2️⃣ Install Dependencies

Ensure that you have GCC with OpenMP support and an MPI implementation installed:

# Install OpenMP support (GCC)
sudo apt install gcc

# Install MPI (MPICH or OpenMPI)
sudo apt install mpich

3️⃣ Run the Jupyter Notebook

Start Jupyter and open the tutorial:

jupyter lab tutorial.ipynb

4️⃣ Compile and Run OpenMP/MPI Programs

OpenMP Example

gcc -fopenmp examples/openmp_hello.c -o openmp_hello
./openmp_hello

MPI Example

mpicc examples/mpi_hello.c -o mpi_hello
mpirun -np 2 ./mpi_hello

📖 Topics Covered

  • OpenMP Basics: Fork-Join Model, Parallel Loops, Work Sharing
  • MPI Basics: Point-to-Point and Collective Communication
  • Synchronization: Barriers, Critical Sections, Reduction
  • Advanced Concepts: Custom Data Types, Communicators, Hybrid OpenMP+MPI

🛠 Contributions

Contributions are welcome! If you find any issues or improvements, feel free to open a Pull Request.

📜 License

This project is licensed under the MIT License.


Happy coding! 🚀

About

An interactive tutorial on OpenMP & MPI for parallel programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published