Przeglądaj źródła

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

Samuel Thibault 7 lat temu
rodzic
commit
b2d98a0a32
1 zmienionych plików z 1 dodań i 0 usunięć
  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]);