浏览代码

src/core/jobs.c: move job_successors.ndeps_completed from _starpu_not_all_task_deps_are_fulfilled() to _starpu_handle_job_termination()

(
 original message:
 src/core/jobs.c: fix resetting of job_successors.ndeps_completed, this is needed for automatically unpartitioning data
)

(cherry picked from commit 8b6e6dc66c7413e0605a315deff026b6ee68a127)
Nathalie Furmento 5 年之前
父节点
当前提交
44c9eaeaaf
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/core/jobs.c

+ 5 - 2
src/core/jobs.c

@@ -226,6 +226,7 @@ void _starpu_job_prepare_for_continuation_ext(struct _starpu_job *j, unsigned co
 	j->continuation_callback_on_sleep = continuation_callback_on_sleep;
 	j->continuation_callback_on_sleep_arg = continuation_callback_on_sleep_arg;
 	j->job_successors.ndeps = 0;
+	j->job_successors.ndeps_completed = 0;
 }
 /* Prepare a currently running job for accepting a new set of
  * dependencies in anticipation of becoming a continuation. */
@@ -349,6 +350,10 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 	{
 		task->status = STARPU_TASK_FINISHED;
 
+		/* already prepare for next run */
+		struct _starpu_cg_list *job_successors = &j->job_successors;
+		job_successors->ndeps_completed = 0;
+
 		/* We must have set the j->terminated flag early, so that it is
 		 * possible to express task dependencies within the callback
 		 * function. A value of 1 means that the codelet was executed but that
@@ -652,8 +657,6 @@ static unsigned _starpu_not_all_task_deps_are_fulfilled(struct _starpu_job *j)
 	else
 	{
 		/* existing deps (if any) are fulfilled */
-		/* already prepare for next run */
-		job_successors->ndeps_completed = 0;
 		ret = 0;
 	}