Selaa lähdekoodia

examples/basic_examples/variable.c: when no worker is found, it is not an error, just skip the example

Nathalie Furmento 13 vuotta sitten
vanhempi
commit
a36692bf99
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      examples/basic_examples/variable.c

+ 5 - 0
examples/basic_examples/variable.c

@@ -43,6 +43,7 @@ int main(int argc, char **argv)
 	int ret;
 
 	ret = starpu_init(NULL);
+	if (ret == -ENODEV) goto enodev;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 #ifdef STARPU_SLOW_MACHINE
@@ -100,4 +101,8 @@ int main(int argc, char **argv)
 	starpu_shutdown();
 
 	return 0;
+
+enodev:
+	starpu_shutdown();
+	return 77;
 }