Browse Source

try to catch people who seemingly call starpu_mpi_init before starpu_init

Samuel Thibault 5 years ago
parent
commit
48cac18789
1 changed files with 2 additions and 0 deletions
  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;
 	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 current_preferred;
 	unsigned nhyperthreads = topology->nhwpus / topology->nhwcpus;
 	unsigned nhyperthreads = topology->nhwpus / topology->nhwcpus;
 	unsigned ncores = topology->nhwpus / nhyperthreads;
 	unsigned ncores = topology->nhwpus / nhyperthreads;