|
@@ -273,7 +273,8 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
|
|
_STARPU_DEP_DEBUG("dependency\n");
|
|
_STARPU_DEP_DEBUG("dependency\n");
|
|
|
|
|
|
if ((l != &handle->last_submitted_accessors && l->next != &handle->last_submitted_accessors)
|
|
if ((l != &handle->last_submitted_accessors && l->next != &handle->last_submitted_accessors)
|
|
- || (handle->last_submitted_ghost_accessors_id && handle->last_submitted_ghost_accessors_id->next))
|
|
|
|
|
|
+ || (handle->last_submitted_ghost_accessors_id && handle->last_submitted_ghost_accessors_id->next)
|
|
|
|
+ || (l != &handle->last_submitted_accessors && handle->last_submitted_ghost_accessors_id))
|
|
{
|
|
{
|
|
/* Several previous accessors */
|
|
/* Several previous accessors */
|
|
|
|
|
|
@@ -315,7 +316,7 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
|
|
else
|
|
else
|
|
{
|
|
{
|
|
struct _starpu_jobid_list *ghost_accessors_id = handle->last_submitted_ghost_accessors_id;
|
|
struct _starpu_jobid_list *ghost_accessors_id = handle->last_submitted_ghost_accessors_id;
|
|
- /* At most one previous accessor and one ghost */
|
|
|
|
|
|
+ /* At most one previous accessor or one ghost */
|
|
if (l != &handle->last_submitted_accessors)
|
|
if (l != &handle->last_submitted_accessors)
|
|
{
|
|
{
|
|
/* One accessor, make it the sync task,
|
|
/* One accessor, make it the sync task,
|
|
@@ -326,22 +327,6 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
|
|
l->prev = NULL;
|
|
l->prev = NULL;
|
|
handle->last_submitted_accessors.next = &handle->last_submitted_accessors;
|
|
handle->last_submitted_accessors.next = &handle->last_submitted_accessors;
|
|
handle->last_submitted_accessors.prev = &handle->last_submitted_accessors;
|
|
handle->last_submitted_accessors.prev = &handle->last_submitted_accessors;
|
|
-
|
|
|
|
-#ifndef STARPU_USE_FXT
|
|
|
|
- if (_starpu_bound_recording)
|
|
|
|
-#endif
|
|
|
|
- if (ghost_accessors_id)
|
|
|
|
- {
|
|
|
|
- /* And add a dependency for the ghost */
|
|
|
|
- unsigned long id = ghost_accessors_id->id;
|
|
|
|
- _STARPU_TRACE_GHOST_TASK_DEPS(id, _starpu_get_job_associated_to_task(pre_sync_task));
|
|
|
|
- _starpu_add_ghost_dependency(handle, id, pre_sync_task);
|
|
|
|
- _STARPU_DEP_DEBUG("dep ID%lu -> %p\n", id, pre_sync_task);
|
|
|
|
-
|
|
|
|
- STARPU_ASSERT(!ghost_accessors_id->next);
|
|
|
|
- handle->last_submitted_ghost_accessors_id = NULL;
|
|
|
|
- free(ghost_accessors_id);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
else if (ghost_accessors_id)
|
|
else if (ghost_accessors_id)
|
|
{
|
|
{
|