vibhatha / mpi_basics

Dedicated to MPI Basics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mpi_basics

Dedicated to MPI Basics

Make sure you have installed MPI in your system. We will be using OpenMPI to write our examples.

C++

cd cpp
mkdir build
cd build
cmake ../
make

Python

Create a virtual environment

python3 -m venv mpi_env
source mpi_env/bin/activate
pip install mpi4py

Run Examples

C++

cd cpp\build
mpirun -n 4 ./hello_world
cd cpp\build
mpirun -n 4 ./send_recv <program_num>

Program Numbers:
1. Send Number 
2. Send Array
3. Send Vector

Python

mpirun -n 4 python3 hello_world.py

About

Dedicated to MPI Basics

License:Apache License 2.0


Languages

Language:Python 66.3%Language:C++ 27.1%Language:Cuda 4.5%Language:CMake 2.1%