浏览代码

Make sure starpu_init is complete before submitting a task

Samuel Thibault 4 年之前
父节点
当前提交
3508c50255
共有 1 个文件被更改,包括 1 次插入0 次删除
  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;
 	{