Browse Source

Make sure that we are not in exclusive thread mode when using memcpy peer

Samuel Thibault 13 years ago
parent
commit
942609f3bc
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/drivers/cuda/driver_cuda.c

+ 6 - 0
src/drivers/cuda/driver_cuda.c

@@ -124,6 +124,12 @@ static void init_context(int devid)
 	cures = cudaGetDeviceProperties(&props[devid], devid);
 	if (STARPU_UNLIKELY(cures))
 		STARPU_CUDA_REPORT_ERROR(cures);
+#ifdef HAVE_CUDA_MEMCPY_PEER
+	if (props[devid].computeMode == cudaComputeModeExclusive) {
+		fprintf(stderr, "CUDA is in EXCLUSIVE-THREAD mode, but StarPU was built with multithread GPU control support, please reconfigure with --disable-cuda-memcpy-peer\n");
+		STARPU_ASSERT(0);
+	}
+#endif
 
 	limit_gpu_mem_if_needed(devid);