瀏覽代碼

Also print the CUDA error number.

Samuel Thibault 13 年之前
父節點
當前提交
b6558c16a9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/drivers/cuda/driver_cuda.c

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

@@ -391,13 +391,13 @@ void starpu_cublas_report_error(const char *func, const char *file, int line, cu
 			errormsg = "unknown error";
 			break;
 	}
-	printf("oops in %s (%s:%u)... %s \n", func, file, line, errormsg);
+	printf("oops in %s (%s:%u)... %d: %s \n", func, file, line, status, errormsg);
 	STARPU_ASSERT(0);
 }
 
 void starpu_cuda_report_error(const char *func, const char *file, int line, cudaError_t status)
 {
 	const char *errormsg = cudaGetErrorString(status);
-	printf("oops in %s (%s:%u)... %s \n", func, file, line, errormsg);
+	printf("oops in %s (%s:%u)... %d: %s \n", func, file, line, status, errormsg);
 	STARPU_ASSERT(0);
 }