Skip to content

Commit

Permalink
REFACTOR-#384: Fix docs building.
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill Suvorov <[email protected]>
  • Loading branch information
Retribution98 committed Nov 10, 2023
1 parent 5a6495f commit 9cbdad3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
6 changes: 3 additions & 3 deletions docs/flow/unidist/core/backends/mpi/core/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ API
.. autoclass:: unidist.core.backends.mpi.core.common.Operation
:members:

.. autoclass:: unidist.core.backends.mpi.core.common.MasterDataID
.. autoclass:: unidist.core.backends.mpi.core.common.MpiDataID
:members:

.. autofunction:: unidist.core.backends.mpi.core.common.get_logger
.. autofunction:: unidist.core.backends.mpi.core.common.unwrapped_data_ids_list
.. autofunction:: unidist.core.backends.mpi.core.common.master_data_ids_to_base
.. autofunction:: unidist.core.backends.mpi.core.common.unwrap_data_ids
.. autofunction:: unidist.core.backends.mpi.core.common.materialize_data_ids
.. autofunction:: unidist.core.backends.mpi.core.common.check_mpich_version
.. autofunction:: unidist.core.backends.mpi.core.common.is_shared_memory_supported
2 changes: 1 addition & 1 deletion docs/flow/unidist/core/backends/mpi/core/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Both of the functions block execution until read/write finishes.
.. autofunction:: unidist.core.backends.mpi.core.controller.api.put

:py:func:`~unidist.core.backends.mpi.core.controller.api.wait` carries out blocking of execution
until a requested number of :py:class:`~unidist.core.backends.mpi.core.common.MasterDataID` isn't ready.
until a requested number of :py:class:`~unidist.core.backends.mpi.core.common.MpiDataID` isn't ready.

.. autofunction:: unidist.core.backends.mpi.core.controller.api.wait

Expand Down
4 changes: 2 additions & 2 deletions docs/flow/unidist/core/backends/mpi/core/monitor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
Monitor related functionality API
"""""""""""""""""""""""""""""""""

Infinite :py:func:`~unidist.core.backends.mpi.core.monitor.monitor_loop` function tracks
Infinite :py:func:`~unidist.core.backends.mpi.core.monitor.loop.monitor_loop` function tracks
MPI backend statistics: executed tasks counter.

API
===

Cancel operation from :py:class:`~unidist.core.backends.mpi.core.common.Operations` class breaks the loop.

.. autofunction:: unidist.core.backends.mpi.core.monitor.monitor_loop
.. autofunction:: unidist.core.backends.mpi.core.monitor.loop.monitor_loop
9 changes: 9 additions & 0 deletions docs/optimization_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Optimization Notes

This page contains optimization notes for every backend that can be applied to it to get ultimate performance.

.. toctree::
:hidden:

mpi
dask
ray
pymp
pyseq

- :doc:`MPI <mpi>`
- :doc:`Dask <dask>`
- :doc:`Ray <ray>`
Expand Down
38 changes: 19 additions & 19 deletions unidist/core/backends/mpi/core/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ def mpi_send_operation(comm, op_type, dest_rank):
Notes
-----
* This blocking send is used when we have to wait for completion of the communication,
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``mpi_isend_operation``.
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``mpi_isend_operation``.
* The special tag is used for this communication, namely, ``common.MPITag.OPERATION``.
"""
comm.send(op_type, dest=dest_rank, tag=common.MPITag.OPERATION)
Expand All @@ -309,8 +309,8 @@ def mpi_send_object(comm, data, dest_rank, tag=common.MPITag.OBJECT):
Notes
-----
* This blocking send is used when we have to wait for completion of the communication,
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``mpi_isend_object``.
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``mpi_isend_object``.
* The special tag is used for this communication, namely, ``common.MPITag.OBJECT``.
"""
comm.send(data, dest=dest_rank, tag=tag)
Expand Down Expand Up @@ -361,7 +361,7 @@ def mpi_isend_object(comm, data, dest_rank):
Notes
-----
* The special tag is used for this communication, namely, ``common.MPITag.OBJECT``.
The special tag is used for this communication, namely, ``common.MPITag.OBJECT``.
"""
return comm.isend(data, dest=dest_rank, tag=common.MPITag.OBJECT)

Expand Down Expand Up @@ -475,10 +475,10 @@ def mpi_send_buffer(comm, buffer, dest_rank, data_type=MPI.CHAR, buffer_size=Non
Notes
-----
* This blocking send is used when we have to wait for completion of the communication,
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``mpi_isend_buffer``.
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``mpi_isend_buffer``.
* The special tags are used for this communication, namely,
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
if buffer_size:
comm.send(buffer_size, dest=dest_rank, tag=common.MPITag.OBJECT)
Expand Down Expand Up @@ -521,7 +521,7 @@ def mpi_isend_buffer(comm, buffer_size, buffer, dest_rank):
Notes
-----
* The special tags are used for this communication, namely,
The special tags are used for this communication, namely,
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
requests = []
Expand Down Expand Up @@ -565,7 +565,7 @@ def mpi_recv_buffer(comm, source_rank, result_buffer=None):
Notes
-----
* The special tags are used for this communication, namely,
The special tags are used for this communication, namely,
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
if result_buffer is None:
Expand Down Expand Up @@ -677,7 +677,7 @@ def send_complex_data(comm, data, dest_rank, is_serialized=False):
Notes
-----
* This blocking send is used when we have to wait for completion of the communication,
This blocking send is used when we have to wait for completion of the communication,
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``isend_complex_data``.
"""
Expand Down Expand Up @@ -732,7 +732,7 @@ def _isend_complex_data_impl(comm, s_data, raw_buffers, dest_rank, info_package)
Notes
-----
* The special tags are used for this communication, namely,
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
handlers = []
# wrap to dict for sending and correct deserialization of the object by the recipient
Expand Down Expand Up @@ -778,7 +778,7 @@ def isend_complex_data(comm, data, dest_rank, is_serialized=False):
Notes
-----
* The special tags are used for this communication, namely,
The special tags are used for this communication, namely,
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
if is_serialized:
Expand Down Expand Up @@ -829,7 +829,7 @@ def recv_complex_data(comm, source_rank, info_package):
Notes
-----
* The special tags are used for this communication, namely,
The special tags are used for this communication, namely,
``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
msgpack_buffer = bytearray(info_package["s_data_len"])
Expand Down Expand Up @@ -866,11 +866,11 @@ def send_simple_operation(comm, operation_type, operation_data, dest_rank):
Notes
-----
* This blocking send is used when we have to wait for completion of the communication,
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``isend_simple_operation``.
which is necessary for the pipeline to continue, or when the receiver is waiting for a result.
Otherwise, use non-blocking ``isend_simple_operation``.
* Serialization of the data to be sent takes place just using ``pickle.dump`` in this case.
* The special tags are used for this communication, namely,
``common.MPITag.OPERATION`` and ``common.MPITag.OBJECT``.
``common.MPITag.OPERATION`` and ``common.MPITag.OBJECT``.
"""
# Send operation type
mpi_send_operation(comm, operation_type, dest_rank)
Expand Down Expand Up @@ -902,7 +902,7 @@ def isend_simple_operation(comm, operation_type, operation_data, dest_rank):
-----
* Serialization of the data to be sent takes place just using ``pickle.dump`` in this case.
* The special tags are used for this communication, namely,
``common.MPITag.OPERATION`` and ``common.MPITag.OBJECT``.
``common.MPITag.OPERATION`` and ``common.MPITag.OBJECT``.
"""
# Send operation type
handlers = []
Expand Down Expand Up @@ -948,7 +948,7 @@ def isend_complex_operation(
Notes
-----
* The special tags are used for this communication, namely,
The special tags are used for this communication, namely,
``common.MPITag.OPERATION``, ``common.MPITag.OBJECT`` and ``common.MPITag.BUFFER``.
"""
# Send operation type
Expand Down

0 comments on commit 9cbdad3

Please sign in to comment.