Browse Source

Really make sure not to use GPU memory

Samuel Thibault 6 years ago
parent
commit
bb46e86a8e
4 changed files with 15 additions and 4 deletions
  1. 5 0
      tests/disk/disk_copy.c
  2. 5 0
      tests/disk/disk_copy_unpack.c
  3. 0 4
      tests/disk/disk_pack.c
  4. 5 0
      tests/disk/mem_reclaim.c

+ 5 - 0
tests/disk/disk_copy.c

@@ -62,6 +62,11 @@ int dotest(struct starpu_disk_ops *ops, void *param)
 	setenv("STARPU_LIMIT_CPU_MEM", RAM, 1);
 
 	/* Initialize StarPU without GPU devices to make sure the memory of the GPU devices will not be used */
+	// Ignore environment variables as we want to force the exact number of workers
+	unsetenv("STARPU_NCUDA");
+	unsetenv("STARPU_NOPENCL");
+	unsetenv("STARPU_NMIC");
+	unsetenv("STARPU_NSCC");
 	struct starpu_conf conf;
 	ret = starpu_conf_init(&conf);
 	if (ret == -EINVAL)

+ 5 - 0
tests/disk/disk_copy_unpack.c

@@ -50,6 +50,11 @@ int dotest(struct starpu_disk_ops *ops, void *param)
 	int ret;
 
 	/* Initialize StarPU without GPU devices to make sure the memory of the GPU devices will not be used */
+	// Ignore environment variables as we want to force the exact number of workers
+	unsetenv("STARPU_NCUDA");
+	unsetenv("STARPU_NOPENCL");
+	unsetenv("STARPU_NMIC");
+	unsetenv("STARPU_NSCC");
 	struct starpu_conf conf;
 	ret = starpu_conf_init(&conf);
 	if (ret == -EINVAL)

+ 0 - 4
tests/disk/disk_pack.c

@@ -79,10 +79,6 @@ int dotest(struct starpu_disk_ops *ops, char *base)
 	int ret = starpu_conf_init(&conf);
 	if (ret == -EINVAL)
 		return EXIT_FAILURE;
-#ifdef STARPU_HAVE_UNSETENV
-	unsetenv("STARPU_NCUDA");
-	unsetenv("STARPU_NOPENCL");
-#endif
 	conf.ncuda = 0;
 	conf.nopencl = 0;
 	conf.nmic = 0;

+ 5 - 0
tests/disk/mem_reclaim.c

@@ -154,6 +154,11 @@ int dotest(struct starpu_disk_ops *ops, char *base, void (*vector_data_register)
 
 	FPRINTF(stderr, "Testing <%s>\n", text);
 	/* Initialize StarPU without GPU devices to make sure the memory of the GPU devices will not be used */
+	// Ignore environment variables as we want to force the exact number of workers
+	unsetenv("STARPU_NCUDA");
+	unsetenv("STARPU_NOPENCL");
+	unsetenv("STARPU_NMIC");
+	unsetenv("STARPU_NSCC");
 	struct starpu_conf conf;
 	int ret = starpu_conf_init(&conf);
 	if (ret == -EINVAL)