Commit f35597e8 authored by Shane Snyder's avatar Shane Snyder

Add recorder workload to workload dump utilility

parent 7f0aafc9
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
#include <inttypes.h> #include <inttypes.h>
static char type[128] = {'\0'}; static char type[128] = {'\0'};
static darshan_params d_params = {NULL, "", 0}; static darshan_params d_params = {"", 0};
static bgp_params b_params = {0, 0, "", "", "", ""}; static bgp_params b_params = {0, 0, "", "", "", ""};
static recorder_params r_params = {""};
static int n = -1; static int n = -1;
static struct option long_opts[] = static struct option long_opts[] =
...@@ -25,6 +26,7 @@ static struct option long_opts[] = ...@@ -25,6 +26,7 @@ static struct option long_opts[] =
{"i-bgp-config", required_argument, NULL, 'b'}, {"i-bgp-config", required_argument, NULL, 'b'},
{"i-rank-cnt", required_argument, NULL, 'r'}, {"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'},
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
...@@ -32,7 +34,7 @@ void usage(){ ...@@ -32,7 +34,7 @@ void usage(){
fprintf(stderr, fprintf(stderr,
"Usage: codes-workload-dump --type TYPE --num-ranks N " "Usage: codes-workload-dump --type TYPE --num-ranks N "
"[--d-log LOG --d-aggregator-cnt CNT]\n" "[--d-log LOG --d-aggregator-cnt CNT]\n"
"--type: type of workload (\"darshan_io_workload\" or \"bgp_io_workload\")\n" "--type: type of workload (\"darshan_io_workload\", \"bgp_io_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"
"--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"
...@@ -40,6 +42,7 @@ void usage(){ ...@@ -40,6 +42,7 @@ void usage(){
"--i-bgp-config: i/o language bgp config file\n" "--i-bgp-config: i/o language bgp config file\n"
"--i-rank-cnt: i/o language rank count\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"
"--r-trace-dir: directory containing recorder trace files\n"
"-s: print final workload stats\n"); "-s: print final workload stats\n");
} }
...@@ -79,12 +82,15 @@ int main(int argc, char *argv[]) ...@@ -79,12 +82,15 @@ int main(int argc, char *argv[])
case 'r': case 'r':
b_params.num_cns = atoi(optarg); b_params.num_cns = atoi(optarg);
break; break;
case 's':
print_stats = 1;
break;
case 'p': case 'p':
b_params.use_relpath = 1; b_params.use_relpath = 1;
break; break;
case 'd':
strcpy(r_params.trace_dir_path, optarg);
break;
case 's':
print_stats = 1;
break;
} }
} }
...@@ -131,6 +137,16 @@ int main(int argc, char *argv[]) ...@@ -131,6 +137,16 @@ int main(int argc, char *argv[])
wparams = (char *)&b_params; wparams = (char *)&b_params;
} }
} }
else if (strcmp(type, "recorder_io_workload") == 0){
if (r_params.trace_dir_path[0] == '\0'){
fprintf(stderr, "Expected \"--r-trace-dir\" argument for recorder workload\n");
usage();
return 1;
}
else{
wparams = (char *)&r_params;
}
}
else { else {
fprintf(stderr, "Invalid type argument\n"); fprintf(stderr, "Invalid type argument\n");
usage(); usage();
......
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