This program implements a parallel machine processing simulation using MPI4py. It simulates the processing of products through a network of machines, each performing specific operations. The code is designed to run in a parallelized environment using MPI for efficient parallel processing.
- Python 3.x
- MPI4py library
- Ensure Python is installed on your system.
- Firstly
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
writing this to the terminal, install Homebrew - Then
brew install python
- Then
brew install open-mpi
- After that,
pip3 install mpi4py
- Run the script using the command in the file path:
mpiexec -n <number_of_processes> python your_code.py input.txt output.txt
- If it is oversubscribe:
mpiexec --oversubscribe -n <NUMBER> python3 test.py test_input.txt output.txt
. NUMBER refers to number of machine + 1 you will use.
Feel free to explore and adapt this script for your specific use cases and performance analysis needs.
Happy coding!