Browse Source

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

Nathalie Furmento 13 years ago
parent
commit
a36692bf99
1 changed files with 5 additions and 0 deletions
  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;
 	int ret;
 
 
 	ret = starpu_init(NULL);
 	ret = starpu_init(NULL);
+	if (ret == -ENODEV) goto enodev;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 
 #ifdef STARPU_SLOW_MACHINE
 #ifdef STARPU_SLOW_MACHINE
@@ -100,4 +101,8 @@ int main(int argc, char **argv)
 	starpu_shutdown();
 	starpu_shutdown();
 
 
 	return 0;
 	return 0;
+
+enodev:
+	starpu_shutdown();
+	return 77;
 }
 }