.. _mpi_startall:
MPI_Startall
============
.. include_body
:ref:`MPI_Startall` |mdash| Starts a collection of requests.
.. The following file was automatically generated
.. include:: ./bindings/mpi_startall.rst
INPUT PARAMETER
---------------
* ``count``: List length (integer).
INPUT/OUTPUT PARAMETER
----------------------
* ``array_of_requests``: Array of requests (array of handle).
OUTPUT PARAMETER
----------------
* ``ierror``: Fortran only: Error status (integer).
DESCRIPTION
-----------
Starts all communications associated with requests in array_of_requests.
A call to MPI_Startall(count, array_of_requests) has the same effect as
calls to :ref:`MPI_Start` (&array_of_requests[i]), executed for i=0 ,...,
count-1, in some arbitrary order.
A communication started with a call to :ref:`MPI_Start` or :ref:`MPI_Startall` is
completed by a call to :ref:`MPI_Wait`, :ref:`MPI_Test`, or one of the derived
functions :ref:`MPI_Waitany`, :ref:`MPI_Testany`, :ref:`MPI_Waitall`, :ref:`MPI_Testall`,
:ref:`MPI_Waitsome`, :ref:`MPI_Testsome` (these are described in Section 3.7.5 of the
`MPI Standard `_, "Multiple
Completions"). The request becomes inactive
after successful completion by such a call. The request is not
deallocated, and it can be activated anew by another :ref:`MPI_Start` or
:ref:`MPI_Startall` call.
A persistent request is deallocated by a call to
:ref:`MPI_Request_free` (see Section 3.7.3 of the `MPI Standard
`_, "Communication Completion").
| The call to :ref:`MPI_Request_free` can occur at any point in the program
after the persistent request was created. However, the request will be
deallocated only after it becomes inactive. Active receive requests
should not be freed. Otherwise, it will not be possible to check that
the receive has completed. It is preferable, in general, to free
requests when they are inactive. If this rule is followed, then the
persistent communication request functions will be invoked in a
sequence of the form,
| Create (Start Complete)\* Free
where \* indicates zero or more repetitions. If the same communication
object is used in several concurrent threads, it is the user's
responsibility to coordinate calls so that the correct sequence is
obeyed.
A send operation initiated with :ref:`MPI_Start` can be matched with any
receive operation and, likewise, a receive operation initiated with
:ref:`MPI_Start` can receive messages generated by any send operation.
ERRORS
------
.. include:: ./ERRORS.rst
.. seealso::
* :ref:`MPI_Bsend_init`
* :ref:`MPI_Rsend_init`
* :ref:`MPI_Send_init`
* :ref:`MPI_Ssend_init`
* :ref:`MPI_Recv_init`
* :ref:`MPI_Start`
* :ref:`MPI_Request_free`