Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
pytools 2025.1.3 documentation
pytools 2025.1.3 documentation

Contents:

  • A Collection of Utilities
  • An in-memory relational database table
  • Dot helper functions
  • Handling numpy Object Arrays
  • Persistent Hashing and Persistent Dictionaries
  • Testing convergence
  • Graph Algorithms
  • Tag Interface
  • Supporting Functionality
  • Tools for Source Code Generation
  • MPI helper functionality
  • Installation
  • User-visible changes
  • License
  • 🚀 Github
  • 💾 Download Releases
Back to top
View this page

MPI helper functionality¶

pytools.mpi.check_for_mpi_relaunch(argv)[source]¶
pytools.mpi.run_with_mpi_ranks(py_script, ranks, callable_, args=(), kwargs=None)[source]¶
pytools.mpi.pytest_raises_on_rank(my_rank: int, fail_rank: int, expected_exception: type[BaseException] | tuple[type[BaseException], ...]) → Generator[contextlib.AbstractContextManager, None, None][source]¶

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

Next
Installation
Previous
Tools for Source Code Generation
Copyright © 2009-21, Andreas Kloeckner
Made with Sphinx and @pradyunsg's Furo
On this page
  • MPI helper functionality
    • check_for_mpi_relaunch()
    • run_with_mpi_ranks()
    • pytest_raises_on_rank()