Browse Source

Set task blocked status before submitting dependency, to avoid concurrency between setting after that, and another worker that completes the dependency just after that

Samuel Thibault 13 years ago
parent
commit
4972d48c77
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/dependencies/data_concurrency.c

+ 1 - 1
src/core/dependencies/data_concurrency.c

@@ -211,9 +211,9 @@ static unsigned _submit_job_enforce_data_deps(struct _starpu_job *j, unsigned st
 			 * _starpu_compar_handles.  */
 			 * _starpu_compar_handles.  */
 			continue;
 			continue;
 
 
+                j->task->status = STARPU_TASK_BLOCKED_ON_DATA;
                 if (attempt_to_submit_data_request_from_job(j, buf))
                 if (attempt_to_submit_data_request_from_job(j, buf))
 		{
 		{
-                        j->task->status = STARPU_TASK_BLOCKED_ON_DATA;
 			return 1;
 			return 1;
                 }
                 }
 	}
 	}