/mpi_basics-1

MPI basics codes of EE8207 HPC module

Primary LanguagePythonApache License 2.0Apache-2.0

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
mpirun -n 4 ./hello_world

Python

mpirun -n 4 python3 hello_world.py