浏览代码

socl/src/init.c: revert #6609

Nathalie Furmento 13 年之前
父节点
当前提交
e86763c3ef
共有 2 个文件被更改,包括 4 次插入7 次删除
  1. 4 2
      socl/examples/matmul/matmul.c
  2. 0 5
      socl/src/init.c

+ 4 - 2
socl/examples/matmul/matmul.c

@@ -222,8 +222,10 @@ int main(int argc, const char** argv) {
 	parse_args(argc, argv);
 
 	check(clGetPlatformIDs(5, platforms, &platform_count));
-	if (platform_count == 0)
-		error("No platform found\n");
+	if (platform_count == 0) {
+		printf("No platform found\n");
+		exit(77);
+	}
 
 	cl_uint device_count;
 	cl_uint devs[platform_count];

+ 0 - 5
socl/src/init.c

@@ -26,13 +26,8 @@ int _starpu_init_failed;
 __attribute__((constructor)) static void socl_init() {
 
   struct starpu_conf conf;
-  const char *env;
-
   starpu_conf_init(&conf);
   conf.ncuda = 0;
-  putenv("STARPU_NCUDA=0");
-  if ((env = getenv("STARPU_NCPUS")) && atoi(env) == 0)
-	  putenv("STARPU_NCPUS=1");
 
   mem_object_init();