Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# MPI helper functionality

pytools.mpi.check_for_mpi_relaunch(argv)

pytools.mpi.run_with_mpi_ranks(py_script, ranks, callable_, args=(), kwargs=None)

pytools.mpi.pytest_raises_on_rank(my_rank: int, fail_rank: int, expected_exception: type[BaseException] | tuple[type[BaseException], ...]) → Generator[contextlib.AbstractContextManager, None, None]

  Like `pytest.raises()`, but only expect an exception on rank fail_rank.