1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
mpi4py.util.pool
----------------
.. module:: mpi4py.util.pool
:synopsis: :mod:`multiprocessing.pool` interface via :mod:`mpi4py.futures`.
.. versionadded:: 4.0.0
.. seealso::
This module intends to be a drop-in replacement for the
:mod:`multiprocessing.pool` interface from the Python standard library.
The :class:`~mpi4py.util.pool.Pool` class exposed here is implemented as a
thin wrapper around :class:`~mpi4py.futures.MPIPoolExecutor`.
.. note::
The :mod:`mpi4py.futures` package offers a higher level interface
for asynchronously pushing tasks to MPI worker process, allowing
for a clear separation between submitting tasks and waiting for the
results.
.. autoclass:: mpi4py.util.pool.Pool
.. automethod:: __init__
.. automethod:: apply
.. automethod:: apply_async
.. automethod:: map
.. automethod:: map_async
.. automethod:: imap
.. automethod:: imap_unordered
.. automethod:: starmap
.. automethod:: starmap_async
.. automethod:: istarmap
.. automethod:: istarmap_unordered
.. automethod:: close
.. automethod:: terminate
.. automethod:: join
.. autoclass:: mpi4py.util.pool.ThreadPool
:show-inheritance:
.. autoclass:: mpi4py.util.pool.AsyncResult
.. automethod:: get
.. automethod:: wait
.. automethod:: ready
.. automethod:: successful
.. autoclass:: mpi4py.util.pool.ApplyResult
:show-inheritance:
.. autoclass:: mpi4py.util.pool.MapResult
:show-inheritance:
|