浏览代码

try to catch people who seemingly call starpu_mpi_init before starpu_init

Samuel Thibault 5 年之前
父节点
当前提交
48cac18789
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/core/topology.c

+ 2 - 0
src/core/topology.c

@@ -1049,6 +1049,8 @@ static inline unsigned _starpu_get_next_bindid(struct _starpu_machine_config *co
 {
 	struct _starpu_machine_topology *topology = &config->topology;
 
+	STARPU_ASSERT_MSG(topology_is_initialized, "The StarPU core is not initialized yet, have you called starpu_init?");
+
 	unsigned current_preferred;
 	unsigned nhyperthreads = topology->nhwpus / topology->nhwcpus;
 	unsigned ncores = topology->nhwpus / nhyperthreads;