Version 3.12
Version 5.0.3
While any MPI implementation should work, here are my recommended options.
For macOS, you can install Open MPI using Homebrew:
brew install openmpiFor Linux, you may need to either install Open MPI from source or check your distribution’s repositories. For example, on Ubuntu/Debian, MPICH is readily available:
sudo apt install mpich
For Windows, Microsoft MPI is required. Follow the Microsoft MPI installation guide for instructions.
This project uses Poetry for dependency management. Please refer to the offical docs for installation details.
# install dependencies
poetry install
# activate the virtual environment
poetry shellYou're all set! You can now run examples, tests, and other code from this repository.
python examples/run_ga_example.pypython examples/run_optimized_example.pympiexec -n 4 python examples/run_ga_mpi_example.pypytest -m functionalmpiexec -n 4 python -m pytest -m mpiThe 8 is an arbitrary value and you can use as many parallel environments as many your MPI implementation detects.
for cores in {1..8}; do echo "Running with $cores cores"; time mpiexec -n $cores python benchmark/hyperparameter_search.py; done