瀏覽代碼

Provide hint for the user about missing func pointer

Samuel Thibault 11 年之前
父節點
當前提交
89ac7e59ac

+ 2 - 2
src/drivers/cpu/driver_cpu.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux 1
+ * Copyright (C) 2010-2014  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
@@ -155,7 +155,7 @@ static int execute_job_on_cpu(struct _starpu_job *j, struct starpu_task *worker_
 		if (is_parallel_task && cl->type == STARPU_FORKJOIN)
 			/* bind to parallel worker */
 			_starpu_bind_thread_on_cpus(cpu_args->config, _starpu_get_combined_worker_struct(j->combined_workerid));
-		STARPU_ASSERT(func);
+		STARPU_ASSERT_MSG(func, "when STARPU_CPU is defined in 'where', cpu_func or cpu_funcs has to be defined");
 #ifdef STARPU_SIMGRID
 		_starpu_simgrid_execute_job(j, perf_arch, NAN);
 #else

+ 2 - 2
src/drivers/cuda/driver_cuda.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2013  Université de Bordeaux 1
+ * Copyright (C) 2009-2014  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
@@ -350,7 +350,7 @@ static int execute_job_on_cuda(struct _starpu_job *j, struct _starpu_worker *arg
 #endif
 
 	starpu_cuda_func_t func = _starpu_task_get_cuda_nth_implementation(cl, j->nimpl);
-	STARPU_ASSERT(func);
+	STARPU_ASSERT_MSG(func, "when STARPU_CUDA is defined in 'where', cuda_func or cuda_funcs has to be defined");
 
 #ifdef STARPU_SIMGRID
 	_starpu_simgrid_execute_job(j, &args->perf_arch, NAN);

+ 1 - 1
src/drivers/mic/driver_mic_source.c

@@ -272,7 +272,7 @@ starpu_mic_kernel_t _starpu_mic_src_get_kernel_from_codelet(struct starpu_codele
 			kernel = _starpu_mic_src_get_kernel(symbol);
 		}
 	}
-	STARPU_ASSERT(kernel);
+	STARPU_ASSERT_MSG(kernel, "when STARPU_MIC is defined in 'where', mic_funcs or cpu_funcs_name has to be defined");
 
 	return kernel;
 }

+ 2 - 2
src/drivers/opencl/driver_opencl.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux 1
+ * Copyright (C) 2010-2014  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
@@ -831,7 +831,7 @@ static int _starpu_opencl_execute_job(struct _starpu_job *j, struct _starpu_work
 	_starpu_driver_start_job(args, j, &codelet_start, 0, profiling);
 
 	starpu_opencl_func_t func = _starpu_task_get_opencl_nth_implementation(cl, j->nimpl);
-	STARPU_ASSERT(func);
+	STARPU_ASSERT_MSG(func, "when STARPU_OPENCL is defined in 'where', opencl_func or opencl_funcs has to be defined");
 
 #ifdef STARPU_SIMGRID
 	double length = NAN;

+ 1 - 1
src/drivers/scc/driver_scc_source.c

@@ -88,7 +88,7 @@ void (*_starpu_scc_src_get_kernel_from_job(const struct _starpu_mp_node *,struct
 	  kernel = _starpu_scc_src_get_kernel(symbol);
 	}
     }
-  STARPU_ASSERT(kernel);  
+  STARPU_ASSERT_MSG(kernel, "when STARPU_MIC is defined in 'where', mic_funcs or cpu_funcs_name has to be defined");
 
   return (void (*)(void))kernel;
 }