Dedicated to MPI Basics
Make sure you have installed MPI in your system. We will be using OpenMPI to write our examples.
cd cpp
mkdir build
cd build
cmake ../
make
Create a virtual environment
python3 -m venv mpi_env
source mpi_env/bin/activate
pip install mpi4py
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
mpirun -n 4 python3 hello_world.py