egttools.numerical.mpi

MPI-distributed stationary distribution solvers backed by PETSc/SLEPc.

This subpackage is only functional when EGTtools was compiled with EGTTOOLS_ENABLE_PETSC=ON (i.e. the numerical_mpi_ C++ extension module is present). Importing it without that module is safe — the subpackage simply exports nothing.

Typical use

>>> from egttools.numerical.mpi import PairwisePetscOperator
>>> op = PairwisePetscOperator(population_size=100, game=game, beta=1.0, mu=0.01)
>>> pi = op.compute_stationary_distribution()

Multi-rank via mpiexec

mpiexec -n 4 python my_script.py

See PairwisePetscOperator for when to use this class vs the serial solvers.