Commit 522ebe75 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Simplest argument parsing for C test programs

parent 825120e2
...@@ -117,9 +117,15 @@ int main(int argc, char** argv) { ...@@ -117,9 +117,15 @@ int main(int argc, char** argv) {
myid = 0; myid = 0;
#endif #endif
na = 1000; if (argc == 4) {
nev = 500; na = atoi(argv[1]);
nblk = 16; nev = atoi(argv[2]);
nblk = atoi(argv[3]);
} else {
na = 1000;
nev = 500;
nblk = 16;
}
for (np_cols = (int) sqrt((double) nprocs); np_cols > 1; np_cols--) { for (np_cols = (int) sqrt((double) nprocs); np_cols > 1; np_cols--) {
if (nprocs % np_cols == 0) { if (nprocs % np_cols == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment