|
@@ -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
|
|
|
|