Browse Source

Make sure starpu_init is complete before submitting a task

Samuel Thibault 4 years ago
parent
commit
3508c50255
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/core/task.c

+ 1 - 0
src/core/task.c

@@ -841,6 +841,7 @@ int _starpu_task_submit(struct starpu_task *task, int nodeps)
 	_STARPU_LOG_IN();
 	STARPU_ASSERT(task);
 	STARPU_ASSERT_MSG(task->magic == _STARPU_TASK_MAGIC, "Tasks must be created with starpu_task_create, or initialized with starpu_task_init.");
+	STARPU_ASSERT_MSG(starpu_is_initialized(), "starpu_init must be called (and return no error) before submitting tasks.");
 
 	int ret;
 	{