Browse Source

doc: more explanations on how mpi works

Nathalie Furmento 12 years ago
parent
commit
ec770af0c7
2 changed files with 44 additions and 19 deletions
  1. 0 18
      doc/chapters/advanced-api.texi
  2. 44 1
      doc/chapters/mpi-support.texi

+ 0 - 18
doc/chapters/advanced-api.texi

@@ -165,24 +165,6 @@ to the world size. Communications statistics must be enabled
 @node Communication
 @subsection Communication
 
-The standard point to point communications of MPI have been
-implemented. The semantic is similar to the MPI one, but adapted to
-the DSM provided by StarPU. A MPI request will only be submitted when
-the data is available in the main memory of the node submitting the
-request.
-
-There is two types of asynchronous communications: the classic
-asynchronous communications and the detached communications. The
-classic asynchronous communications (@code{starpu_mpi_isend} and
-@code{starpu_mpi_irecv}) need to be followed by a call to
-@code{starpu_mpi_wait} or to @code{starpu_mpi_test} to wait for or to
-test the completion of the communication. Waiting for or testing the
-completion of detached communications is not possible, this is done
-internally by StarPU-MPI, on completion, the resources are
-automatically released. This mechanism is similar to the pthread
-detach state attribute which determines whether a thread will be
-created in a joinable or a detached state.
-
 @deftypefun int starpu_mpi_send (starpu_data_handle_t @var{data_handle}, int @var{dest}, int @var{mpi_tag}, MPI_Comm @var{comm})
 Performs a standard-mode, blocking send of @var{data_handle} to the
 node @var{dest} using the message tag @code{mpi_tag} within the

+ 44 - 1
doc/chapters/mpi-support.texi

@@ -21,6 +21,7 @@ according to the task graph and an application-provided distribution.
 
 @menu
 * Simple Example::
+* Point to point communication::
 * Exchanging User Defined Data Interface::
 * MPI Insert Task Utility::
 * MPI Collective Operations::
@@ -120,7 +121,49 @@ int main(int argc, char **argv)
 @end smallexample
 @end cartouche
 
-@page
+@node Point to point communication
+@section Point to point communication
+
+The standard point to point communications of MPI have been
+implemented. The semantic is similar to the MPI one, but adapted to
+the DSM provided by StarPU. A MPI request will only be submitted when
+the data is available in the main memory of the node submitting the
+request.
+
+There is two types of asynchronous communications: the classic
+asynchronous communications and the detached communications. The
+classic asynchronous communications (@code{starpu_mpi_isend} and
+@code{starpu_mpi_irecv}) need to be followed by a call to
+@code{starpu_mpi_wait} or to @code{starpu_mpi_test} to wait for or to
+test the completion of the communication. Waiting for or testing the
+completion of detached communications is not possible, this is done
+internally by StarPU-MPI, on completion, the resources are
+automatically released. This mechanism is similar to the pthread
+detach state attribute which determines whether a thread will be
+created in a joinable or a detached state.
+
+For any communication, the call of the function will result in the
+creation of a StarPU-MPI request, the function
+@code{starpu_data_acquire_cb} is then called to asynchronously request
+StarPU to fetch the data in main memory; when the data is available in
+main memory, a StarPU-MPI function is called to put the new request in
+the list of the ready requests.
+
+The StarPU-MPI progression thread regularly polls this list of ready
+requests. For each new ready request, the appropriate function is
+called to post the corresponding MPI call. For example, calling
+@code{starpu_mpi_isend} will result in posting @code{MPI_Isend}. If
+the request is marked as detached, the request will be put in the list
+of detached requests.
+
+The StarPU-MPI progression thread also polls the list of detached
+requests. For each detached request, it regularly tests the completion
+of the MPI request by calling @code{MPI_Test}. On completion, the data
+handle is released, and if a callback was defined, it is called.
+
+@ref{Communication} gives the list of all the point to point
+communications defined in StarPU-MPI.
+
 @node Exchanging User Defined Data Interface
 @section Exchanging User Defined Data Interface