Explorar o código

Make sure people do not submit the same task structure several times

Samuel Thibault %!s(int64=7) %!d(string=hai) anos
pai
achega
b2d98a0a32
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/core/task.c

+ 1 - 0
src/core/task.c

@@ -678,6 +678,7 @@ int starpu_task_submit(struct starpu_task *task)
 
 	if (!continuation)
 	{
+		STARPU_ASSERT_MSG(!j->submitted || j->terminated >= 1, "Tasks can not be submitted a second time before being terminated. Please use different task structures, or use the regenerate flag to let the task resubmit itself automatically.");
 		_STARPU_TRACE_TASK_SUBMIT(j,
 			_starpu_get_sched_ctx_struct(task->sched_ctx)->iterations[0],
 			_starpu_get_sched_ctx_struct(task->sched_ctx)->iterations[1]);