|
@@ -1,6 +1,6 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
- * Copyright (C) 2010-2014 Université de Bordeaux
|
|
|
+ * Copyright (C) 2010-2014, 2016 Université de Bordeaux
|
|
|
* Copyright (C) 2010, 2011, 2012, 2013 CNRS
|
|
|
*
|
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
@@ -81,10 +81,19 @@ static void parse_args(int argc, char **argv)
|
|
|
break;
|
|
|
case 'b':
|
|
|
nbuffers = atoi(optarg);
|
|
|
+ if (nbuffers > STARPU_NMAXBUFS)
|
|
|
+ {
|
|
|
+#ifdef STARPU_DEVEL
|
|
|
+#warning FIXME: use dyn_handles
|
|
|
+#endif
|
|
|
+ fprintf(stderr,"%u buffers is not supported, please raise the maximum value (%u) with --enable-maxbuffers\n", nbuffers, STARPU_NMAXBUFS);
|
|
|
+ exit(EXIT_FAILURE);
|
|
|
+ }
|
|
|
codelet.nbuffers = nbuffers;
|
|
|
break;
|
|
|
case 'h':
|
|
|
fprintf(stderr, "Usage: %s [-i ntasks] [-b nbuffers] [-h]\n", argv[0]);
|
|
|
+ exit(EXIT_SUCCESS);
|
|
|
break;
|
|
|
}
|
|
|
}
|