Browse Source

Disable tests/main/driver_api/run_driver.c when running several workers on a CUDA device, the test does not handle the case when two threads are needed to drive them

Samuel Thibault 8 years ago
parent
commit
748628b584
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tests/main/driver_api/run_driver.c

+ 7 - 0
tests/main/driver_api/run_driver.c

@@ -152,6 +152,13 @@ static int test_cuda(void)
 			starpu_shutdown();
 		return STARPU_TEST_SKIPPED;
 	}
+	if (starpu_cuda_worker_get_count() > 1)
+	{
+		FPRINTF(stderr, "WARNING: More than one worker, this is not supported by this test\n");
+		if (ret == 0)
+			starpu_shutdown();
+		return STARPU_TEST_SKIPPED;
+	}
 
 	ret = starpu_pthread_create(&driver_thread, NULL, run_driver, &d);
 	if (ret == -1)