|
@@ -236,7 +236,7 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
|
|
|
struct _starpu_task_wrapper_list *l = handle->last_submitted_accessors;
|
|
|
_STARPU_DEP_DEBUG("dependency\n");
|
|
|
|
|
|
- if (l && l->next)
|
|
|
+ if ((l && l->next) || (handle->last_submitted_ghost_accessors_id && handle->last_submitted_ghost_accessors_id->next))
|
|
|
{
|
|
|
/* Several previous accessors */
|
|
|
|
|
@@ -268,12 +268,22 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (l)
|
|
|
+ if (l || handle->last_submitted_ghost_accessors_id)
|
|
|
{
|
|
|
/* One previous accessor, make it the sync
|
|
|
* task, and start depending on it. */
|
|
|
- handle->last_sync_task = l->task;
|
|
|
- handle->last_submitted_accessors = NULL;
|
|
|
+ if (l)
|
|
|
+ {
|
|
|
+ handle->last_sync_task = l->task;
|
|
|
+ handle->last_submitted_accessors = NULL;
|
|
|
+ }
|
|
|
+ else if (handle->last_submitted_ghost_accessors_id)
|
|
|
+ {
|
|
|
+ handle->last_submitted_ghost_sync_id = handle->last_submitted_ghost_accessors_id->id;
|
|
|
+ handle->last_submitted_ghost_sync_id_is_valid = 1;
|
|
|
+ free(handle->last_submitted_ghost_accessors_id);
|
|
|
+ handle->last_submitted_ghost_accessors_id = NULL;
|
|
|
+ }
|
|
|
free(l);
|
|
|
}
|
|
|
_starpu_add_accessor(handle, pre_sync_task, post_sync_task);
|