|
@@ -19,6 +19,12 @@
|
|
|
#include <core/task.h>
|
|
|
#include <datawizard/datawizard.h>
|
|
|
|
|
|
+#if 0
|
|
|
+# define _STARPU_DEBUG(fmt, args ...) fprintf(stderr, fmt, ##args);
|
|
|
+#else
|
|
|
+# define _STARPU_DEBUG(fmt, args ...)
|
|
|
+#endif
|
|
|
+
|
|
|
|
|
|
* sequential consistency. Two tasks are provided: pre_sync and post_sync which
|
|
|
* respectively indicates which task is going to depend on the previous deps
|
|
@@ -34,7 +40,6 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
|
|
|
|
|
|
if (handle->sequential_consistency)
|
|
|
{
|
|
|
-
|
|
|
#ifdef STARPU_USE_FXT
|
|
|
|
|
|
* dependency between the pre and the post sync tasks in case
|
|
@@ -51,8 +56,10 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
|
|
|
|
|
|
if (mode & STARPU_W)
|
|
|
{
|
|
|
+ _STARPU_DEBUG("W %p\n", handle);
|
|
|
if (previous_mode & STARPU_W)
|
|
|
{
|
|
|
+ _STARPU_DEBUG("WAW %p\n", handle);
|
|
|
|
|
|
|
|
|
if (handle->last_submitted_writer)
|
|
@@ -80,6 +87,7 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
|
|
|
* mode: this task must depend on all those read-only
|
|
|
* tasks and we get rid of the list of readers */
|
|
|
|
|
|
+ _STARPU_DEBUG("WAR %p\n", handle);
|
|
|
|
|
|
unsigned nreaders = 0;
|
|
|
struct starpu_task_wrapper_list *l;
|
|
@@ -89,6 +97,7 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
|
|
|
nreaders++;
|
|
|
l = l->next;
|
|
|
}
|
|
|
+ _STARPU_DEBUG("%d readers\n", nreaders);
|
|
|
|
|
|
struct starpu_task *task_array[nreaders];
|
|
|
|
|
@@ -128,6 +137,7 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
+ _STARPU_DEBUG("R %p\n", handle);
|
|
|
|
|
|
STARPU_ASSERT(pre_sync_task);
|
|
|
STARPU_ASSERT(post_sync_task);
|
|
@@ -141,6 +151,7 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
|
|
|
|
|
|
if (handle->last_submitted_writer)
|
|
|
{
|
|
|
+ _STARPU_DEBUG("RAW %p\n", handle);
|
|
|
struct starpu_task *task_array[1] = {handle->last_submitted_writer};
|
|
|
starpu_task_declare_deps_array(pre_sync_task, 1, task_array);
|
|
|
}
|