瀏覽代碼

starpu_init_noworker: unset environment variables so that they do not get in the way.

Cyril Roelandt 13 年之前
父節點
當前提交
0514f248d3
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      tests/errorcheck/starpu_init_noworker.c

+ 9 - 0
tests/errorcheck/starpu_init_noworker.c

@@ -21,10 +21,19 @@
 #include <starpu.h>
 #include <stdlib.h>
 
+static void unset_env_variables(void)
+{
+	(void) unsetenv("STARPU_NCPUS");
+	(void) unsetenv("STARPU_NCUDA");
+	(void) unsetenv("STARPU_NNOPENCL");
+}
+
 int main(int argc, char **argv)
 {
 	int ret;	
 
+	unset_env_variables();
+
 	/* We try to initialize StarPU without any worker */
 	struct starpu_conf conf =
 	{