瀏覽代碼

Fix GPU memory size in the simgrid case

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

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

@@ -92,7 +92,7 @@ static void _starpu_cuda_limit_gpu_mem_if_needed(unsigned devid)
 		sprintf(name, "STARPU_LIMIT_CUDA_%u_MEM", devid);
 		limit = starpu_get_env_number(name);
 	}
-#ifdef STARPU_USE_CUDA
+#if defined(STARPU_USE_CUDA) || defined(STARPU_SIMGRID)
 	if (limit == -1)
 	{
 		/* Use 90% of the available memory by default.  */

+ 1 - 1
src/drivers/opencl/driver_opencl.c

@@ -83,7 +83,7 @@ static void _starpu_opencl_limit_gpu_mem_if_needed(unsigned devid)
 		sprintf(name, "STARPU_LIMIT_OPENCL_%u_MEM", devid);
 		limit = starpu_get_env_number(name);
 	}
-#ifdef STARPU_USE_OPENCL
+#if defined(STARPU_USE_OPENCL) || defined(STARPU_SIMGRID)
 	if (limit == -1)
 	{
 		/* Use 90% of the available memory by default.  */