瀏覽代碼

make it clear that data_acquire implicitly waits for tasks if data dependencies are not explicitly disabled

Samuel Thibault 14 年之前
父節點
當前提交
9df998bafc
共有 1 個文件被更改,包括 13 次插入5 次删除
  1. 13 5
      doc/starpu.texi

+ 13 - 5
doc/starpu.texi

@@ -617,7 +617,11 @@ If the @code{synchronous} field is non-zero, task submission will be
 synchronous: the @code{starpu_task_submit} function will not return until the
 synchronous: the @code{starpu_task_submit} function will not return until the
 task was executed. Note that the @code{starpu_shutdown} method does not
 task was executed. Note that the @code{starpu_shutdown} method does not
 guarantee that asynchronous tasks have been executed before it returns,
 guarantee that asynchronous tasks have been executed before it returns,
-@code{starpu_task_wait_for_all} can be used to that effect..
+@code{starpu_task_wait_for_all} can be used to that effect, or data can be
+acquired (@code{starpu_data_acquire(vector_handle, STARPU_R);}), which will
+implicitly wait for all the tasks scheduled to work on it, unless explicitly
+disabled thanks to @code{starpu_data_set_default_sequential_consistency_flag} or
+@code{starpu_data_set_sequential_consistency_flag}.
 
 
 @node Execution of Hello World
 @node Execution of Hello World
 @subsection Execution of Hello World
 @subsection Execution of Hello World
@@ -1415,7 +1419,8 @@ transfer to overlap with computations.
 
 
 To let StarPU make online optimizations, tasks should be submitted
 To let StarPU make online optimizations, tasks should be submitted
 asynchronously as much as possible. Ideally, all the tasks should be
 asynchronously as much as possible. Ideally, all the tasks should be
-submitted, and a mere @code{starpu_task_wait_for_all} call be done to wait for
+submitted, and mere calls to @code{starpu_task_wait_for_all} or
+@code{starpu_data_acquire} be done to wait for
 termination. StarPU will then be able to rework the whole schedule, overlap
 termination. StarPU will then be able to rework the whole schedule, overlap
 computation with communication, manage accelerator local memory usage, etc.
 computation with communication, manage accelerator local memory usage, etc.
 
 
@@ -2870,9 +2875,12 @@ up-to-date copy of the data in main memory located where the data was
 originally registered, and that all concurrent accesses (e.g. from tasks) will
 originally registered, and that all concurrent accesses (e.g. from tasks) will
 be consistent with the access mode specified in the @code{mode} argument.
 be consistent with the access mode specified in the @code{mode} argument.
 @code{starpu_data_release} must be called once the application does not need to
 @code{starpu_data_release} must be called once the application does not need to
-access the piece of data anymore.
-Note that implicit data dependencies are also enforced by
-@code{starpu_data_acquire} in case they are enabled.
+access the piece of data anymore.  Note that implicit data
+dependencies are also enforced by @code{starpu_data_acquire}, i.e.
+@code{starpu_data_acquire} will wait for all tasks scheduled to work on
+the data, unless that they have not been disabled explictly by calling
+@code{starpu_data_set_default_sequential_consistency_flag} or
+@code{starpu_data_set_sequential_consistency_flag}.
 @code{starpu_data_acquire} is a blocking call, so that it cannot be called from
 @code{starpu_data_acquire} is a blocking call, so that it cannot be called from
 tasks or from their callbacks (in that case, @code{starpu_data_acquire} returns
 tasks or from their callbacks (in that case, @code{starpu_data_acquire} returns
 @code{-EDEADLK}). Upon successful completion, this function returns 0. 
 @code{-EDEADLK}). Upon successful completion, this function returns 0.