Commit 9d3d0492 authored by Shane Snyder's avatar Shane Snyder
Browse files

Update recorder workload params and replay tool

parent d8650f54
......@@ -17,6 +17,7 @@
typedef struct bgp_params bgp_params;
typedef struct darshan_params darshan_params;
typedef struct recorder_params recorder_params;
typedef struct codes_workload_info codes_workload_info;
struct bgp_params
......@@ -38,6 +39,13 @@ struct darshan_params
int64_t aggregator_cnt;
};
struct recorder_params
{
FILE* stream;
char trace_dir_path[MAX_NAME_LENGTH_WKLD];
};
struct codes_workload_info
{
int group_id; /* group id */
......
......@@ -115,12 +115,12 @@ static int rank_tbl_pop = 0;
/* load the workload generator for this rank, given input params */
static int recorder_io_workload_load(const char *params, int rank)
{
const char *trace_dir = params; /* for now, params is just the directory name of the trace files */
recorder_params *r_params = (recorder_params *) params;
int64_t nprocs = 0;
struct rank_traces_context *new = NULL;
char *trace_dir = r_params->trace_dir_path;
if(!trace_dir)
return -1;
......@@ -154,7 +154,7 @@ static int recorder_io_workload_load(const char *params, int rank)
char *function_name = (char*) malloc(sizeof(char) * 128);
/* Read the first chunk of data (of size RECORDER_MAX_TRACE_READ_COUNT) */
char *line;
char *line = NULL;
size_t len;
ssize_t ret_value;
int i;
......
......@@ -164,6 +164,17 @@ int load_workload(char *conf_path, int rank)
return codes_workload_load(workload_type, (char *)&b_params, rank);
}
else if (strcmp(workload_type, "recorder_io_workload") == 0) {
struct recorder_params r_params;
/* get the darshan params from the config file */
configuration_get_value(&config, "PARAMS", "trace_dir_path",
r_params.trace_dir_path, MAX_NAME_LENGTH_WKLD);
r_params.stream = NULL;
return codes_workload_load(workload_type, (char *)&r_params, rank);
}
else
{
fprintf(stderr, "Error: Invalid workload type specified (%s)\n", workload_type);
......
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