Browse Source

actually fix build

Samuel Thibault 8 years ago
parent
commit
ba921fb64b
1 changed files with 3 additions and 5 deletions
  1. 3 5
      examples/sched_ctx/gpu_partition.c

+ 3 - 5
examples/sched_ctx/gpu_partition.c

@@ -110,11 +110,9 @@ int main(int argc, char **argv)
 	int ncuda = 0;
 	int gpu_devid = -1;
 
-#ifndef STARPU_HAVE_SETENV
-	return STARPU_TEST_SKIPPED;
-#endif
-	/* Request separate threads for streams */
-	setenv("STARPU_ONE_THREAD_PER_STREAM", "1");
+	/* Check we have separate threads for streams */
+	if (!starpu_get_env_number_default("STARPU_ONE_THREAD_PER_STREAM", 0))
+		return 77;
 
 	/* Initialize StarPU */
 	ret = starpu_init(NULL);