Browse Source

perf_knobs_03: skip when environment force e.g. cuda devices

Samuel Thibault 5 years ago
parent
commit
0c9013a26e
1 changed files with 7 additions and 0 deletions
  1. 7 0
      examples/perf_steering/perf_knobs_03.c

+ 7 - 0
examples/perf_steering/perf_knobs_03.c

@@ -56,6 +56,13 @@ int main(int argc, char **argv)
 	ret = starpu_initialize(&conf, &argc, &argv);
 	if (ret == -ENODEV)
 		return 77;
+	if (conf.ncpus != 2
+		|| conf.ncuda != 0
+		|| conf.nopencl != 0
+		|| conf.nmic != 0
+		|| conf.nmpi_ms != 0)
+		/* Environment variables forced otherwise, refuse it */
+		return 77;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	unsigned int ncpu  = starpu_cpu_worker_get_count();