Browse Source

Return 77 instead of crashing when there are no devices available

Cyril Roelandt 13 years ago
parent
commit
89d6f8662f

+ 1 - 1
examples/cholesky/cholesky_grain_tag.c

@@ -275,7 +275,7 @@ static void initialize_system(float **A, unsigned dim, unsigned pinned)
 
 	ret = starpu_init(NULL);
 	if (ret == -ENODEV)
-		return 77;
+		exit(77);
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	starpu_helper_cublas_init();

+ 2 - 0
examples/cholesky/cholesky_tile_tag.c

@@ -259,6 +259,8 @@ int main(int argc, char **argv)
 	FPRINTF(stderr, "BLOCK SIZE = %d\n", size / nblocks);
 
 	ret = starpu_init(NULL);
+	if (ret == -ENODEV)
+		return 77;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	/* Disable sequential consistency */

+ 2 - 0
examples/filters/fmatrix.c

@@ -69,6 +69,8 @@ int main(int argc, char **argv)
         };
 
         ret = starpu_init(NULL);
+	if (ret == -ENODEV)
+		return 77;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	/* Declare data to StarPU */