Bläddra i källkod

tests/main/starpu_init.c: do not set user_conf.ncpus with the value -1

Nathalie Furmento 13 år sedan
förälder
incheckning
7ba3912b95
1 ändrade filer med 6 tillägg och 1 borttagningar
  1. 6 1
      tests/main/starpu_init.c

+ 6 - 1
tests/main/starpu_init.c

@@ -31,6 +31,8 @@ static int check_cpu(int env_cpu, int conf_cpu, int expected_cpu, int *cpu)
 {
 	int ret;
 
+	FPRINTF(stderr, "Testing with env=%d - conf=%d\n", env_cpu, conf_cpu);
+
 	if (env_cpu != -1)
 	{
 		char string[50];
@@ -40,7 +42,10 @@ static int check_cpu(int env_cpu, int conf_cpu, int expected_cpu, int *cpu)
 
 	struct starpu_conf user_conf;
 	starpu_conf_init(&user_conf);
-	user_conf.ncpus = conf_cpu;
+	if (conf_cpu != -1)
+	{
+	     user_conf.ncpus = conf_cpu;
+	}
 	ret = starpu_init(&user_conf);
 
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;