Bläddra i källkod

Fix tests with MIC support enabled, without MIC devices for now

Samuel Thibault 12 år sedan
förälder
incheckning
627245f029

+ 1 - 1
tests/datawizard/interfaces/block/block_interface.c

@@ -142,7 +142,7 @@ main(int argc, char **argv)
 	conf.nopencl = 1;
 	conf.nmic = -1;
 
-	if (starpu_initialize(&conf, &argc, &argv || starpu_cpu_worker_get_count() == 0) == -ENODEV)
+	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV || starpu_cpu_worker_get_count() == 0)
 		goto enodev;
 
 	register_data();

+ 8 - 4
tests/datawizard/interfaces/coo/coo_interface.c

@@ -20,7 +20,7 @@
 #define NY 2
 #define MATRIX_SIZE (NX*NY)
 
-#ifdef STARPU_USE_CPU
+#if defined(STARPU_USE_CPU) || defined(STAPRU_USE_MIC)
 static void test_coo_cpu_func(void *buffers[], void *args);
 #endif
 #ifdef STARPU_USE_CUDA
@@ -43,13 +43,16 @@ struct test_config coo_config =
 #ifdef STARPU_USE_OPENCL
 	.opencl_func   = test_coo_opencl_func,
 #endif /* !STARPU_USE_OPENCL */
+#ifdef STARPU_USE_MIC
+	.cpu_func_name = "test_coo_cpu_func",
+#endif
 	.handle        = &coo_handle,
 	.dummy_handle  = &coo2_handle,
 	.copy_failed   = SUCCESS,
 	.name          = "coo_interface"
 };
 
-static void
+void
 test_coo_cpu_func(void *buffers[], void *args)
 {
 	int factor = *(int *) args;
@@ -145,7 +148,7 @@ unregister_data(void)
 }
 
 int
-main(void)
+main(int argc, char **argv)
 {
 	struct starpu_conf conf;
 	data_interface_test_summary *summary;
@@ -153,8 +156,9 @@ main(void)
 	starpu_conf_init(&conf);
 	conf.ncuda = 2;
 	conf.nopencl = 1;
+	conf.nmic = -1;
 
-	if (starpu_init(&conf) == -ENODEV || starpu_cpu_worker_get_count() == 0)
+	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV || starpu_cpu_worker_get_count() == 0)
 		goto enodev;
 
 	register_data();

+ 1 - 1
tests/datawizard/interfaces/vector/test_vector_interface.c

@@ -112,7 +112,7 @@ main(int argc, char **argv)
 	conf.nopencl = 1;
 	conf.nmic = -1;
 
-	if (starpu_initialize(&conf, &argc, &argv || starpu_cpu_worker_get_count() == 0) == -ENODEV)
+	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV || starpu_cpu_worker_get_count() == 0)
 		goto enodev;
 
 	register_data();