Commit 0b4fb673 authored by Jonathan Jenkins's avatar Jonathan Jenkins

workload dump utility opt cleanup

parent 336aa52b
...@@ -23,7 +23,6 @@ static struct option long_opts[] = ...@@ -23,7 +23,6 @@ static struct option long_opts[] =
{"d-log", required_argument, NULL, 'l'}, {"d-log", required_argument, NULL, 'l'},
{"d-aggregator-cnt", required_argument, NULL, 'a'}, {"d-aggregator-cnt", required_argument, NULL, 'a'},
{"i-meta", required_argument, NULL, 'm'}, {"i-meta", required_argument, NULL, 'm'},
{"i-rank-cnt", required_argument, NULL, 'r'},
{"i-use-relpath", no_argument, NULL, 'p'}, {"i-use-relpath", no_argument, NULL, 'p'},
{"r-trace-dir", required_argument, NULL, 'd'}, {"r-trace-dir", required_argument, NULL, 'd'},
{"r-nprocs", required_argument, NULL, 'x'}, {"r-nprocs", required_argument, NULL, 'x'},
...@@ -32,15 +31,16 @@ static struct option long_opts[] = ...@@ -32,15 +31,16 @@ static struct option long_opts[] =
void usage(){ void usage(){
fprintf(stderr, fprintf(stderr,
"Usage: codes-workload-dump --type TYPE --num-ranks N " "Usage: codes-workload-dump --type TYPE --num-ranks N [OPTION...]"
"[--d-log LOG --d-aggregator-cnt CNT]\n"
"--type: type of workload (\"darshan_io_workload\", \"iolang_workload\", etc.)\n" "--type: type of workload (\"darshan_io_workload\", \"iolang_workload\", etc.)\n"
"--num-ranks: number of ranks to process (if not set, it is set by the workload)\n" "--num-ranks: number of ranks to process (if not set, it is set by the workload)\n"
"DARSHAN OPTIONS (darshan_io_workload)\n"
"--d-log: darshan log file\n" "--d-log: darshan log file\n"
"--d-aggregator-cnt: number of aggregators for collective I/O in darshan\n" "--d-aggregator-cnt: number of aggregators for collective I/O in darshan\n"
"IOLANG OPTIONS (iolang_workload)\n"
"--i-meta: i/o language kernel meta file path\n" "--i-meta: i/o language kernel meta file path\n"
"--i-rank-cnt: i/o language rank count\n"
"--i-use-relpath: use i/o kernel path relative meta file path\n" "--i-use-relpath: use i/o kernel path relative meta file path\n"
"RECORDER OPTIONS (recorder_io_workload)\n"
"--r-trace-dir: directory containing recorder trace files\n" "--r-trace-dir: directory containing recorder trace files\n"
"--r-nprocs: number of ranks in original recorder workload\n" "--r-nprocs: number of ranks in original recorder workload\n"
"-s: print final workload stats\n"); "-s: print final workload stats\n");
...@@ -88,7 +88,7 @@ int main(int argc, char *argv[]) ...@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
int64_t num_testalls = 0; int64_t num_testalls = 0;
char ch; char ch;
while ((ch = getopt_long(argc, argv, "t:n:l:a:m:r:sp", long_opts, NULL)) != -1){ while ((ch = getopt_long(argc, argv, "t:n:l:a:m:sp", long_opts, NULL)) != -1){
switch (ch){ switch (ch){
case 't': case 't':
strcpy(type, optarg); strcpy(type, optarg);
...@@ -106,9 +106,6 @@ int main(int argc, char *argv[]) ...@@ -106,9 +106,6 @@ int main(int argc, char *argv[])
case 'm': case 'm':
strcpy(i_params.io_kernel_meta_path, optarg); strcpy(i_params.io_kernel_meta_path, optarg);
break; break;
case 'r':
i_params.num_cns = atoi(optarg);
break;
case 'p': case 'p':
i_params.use_relpath = 1; i_params.use_relpath = 1;
break; break;
...@@ -148,18 +145,18 @@ int main(int argc, char *argv[]) ...@@ -148,18 +145,18 @@ int main(int argc, char *argv[])
} }
} }
else if (strcmp(type, "iolang_workload") == 0){ else if (strcmp(type, "iolang_workload") == 0){
if (i_params.num_cns == 0){ if (n == -1){
if (n == -1){ fprintf(stderr,
fprintf(stderr, "Expected \"--i-rank-cnt\" or \"--num-ranks\" argument for iolang workload\n"); "Expected \"--num-ranks\" argument for iolang workload\n");
usage(); usage();
return 1; return 1;
} }
else{ else{
i_params.num_cns = n; i_params.num_cns = n;
}
} }
else if (i_params.io_kernel_meta_path[0] == '\0'){ if (i_params.io_kernel_meta_path[0] == '\0'){
fprintf(stderr, "Expected \"--i-meta\" argument for iolang workload\n"); fprintf(stderr,
"Expected \"--i-meta\" argument for iolang workload\n");
usage(); usage();
return 1; return 1;
} }
......
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