Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
748628b584
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  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();
 			starpu_shutdown();
 		return STARPU_TEST_SKIPPED;
 		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);
 	ret = starpu_pthread_create(&driver_thread, NULL, run_driver, &d);
 	if (ret == -1)
 	if (ret == -1)