Commit 7f0aafc9 authored by Shane Snyder's avatar Shane Snyder

Remove unused workload parameters

Darshan and recorder workloads have temporary debug parameters that
are no longer used and can be removed.
parent 9eea02a0
......@@ -36,14 +36,12 @@ struct bgp_params
struct darshan_params
{
FILE* stream;
char log_file_path[MAX_NAME_LENGTH_WKLD];
int64_t aggregator_cnt;
};
struct recorder_params
{
FILE* stream;
char trace_dir_path[MAX_NAME_LENGTH_WKLD];
};
......
......@@ -52,7 +52,6 @@ static void darshan_insert_next_io_op(void *io_op_dat, struct darshan_io_op *io_
static void darshan_remove_next_io_op(void *io_op_dat, struct darshan_io_op *io_op,
double last_op_time);
static void darshan_finalize_io_op_dat(void *io_op_dat);
static void darshan_print_io_ops(void *io_op_dat, int rank, FILE *log_stream);
static int darshan_io_op_compare(const void *p1, const void *p2);
/* Helper functions for implementing the Darshan workload generator */
......@@ -197,12 +196,6 @@ static int darshan_io_workload_load(const char *params, int rank)
qhash_add(rank_tbl, &(my_ctx->my_rank), &(my_ctx->hash_link));
rank_tbl_pop++;
/* TODO: do we want this long-term */
if (d_params->stream)
{
darshan_print_io_ops(my_ctx->io_op_dat, rank, d_params->stream);
}
return 0;
}
......@@ -412,77 +405,6 @@ static void darshan_finalize_io_op_dat(
return;
}
/* print the events for this rank in order */
void darshan_print_io_ops(void *io_op_dat, int rank, FILE *log_stream)
{
struct darshan_io_dat_array *io_array = (struct darshan_io_dat_array *)io_op_dat;
struct darshan_io_op *event_list = io_array->op_array;
int64_t event_list_cnt = io_array->op_arr_cnt;
int64_t i;
if (!event_list_cnt)
return;
for (i = 0; i < event_list_cnt; i++)
{
if (event_list[i].codes_op.op_type == CODES_WK_OPEN)
{
if (event_list[i].codes_op.u.open.create_flag == 0)
{
fprintf(log_stream, "Rank %d OPEN %"PRIu64" (%lf - %lf)\n",
rank,
event_list[i].codes_op.u.open.file_id,
event_list[i].start_time,
event_list[i].end_time);
}
else
{
fprintf(log_stream, "Rank %d CREATE %"PRIu64" (%lf - %lf)\n",
rank,
event_list[i].codes_op.u.open.file_id,
event_list[i].start_time,
event_list[i].end_time);
}
}
else if (event_list[i].codes_op.op_type == CODES_WK_CLOSE)
{
fprintf(log_stream, "Rank %d CLOSE %"PRIu64" (%lf - %lf)\n",
rank,
event_list[i].codes_op.u.close.file_id,
event_list[i].start_time,
event_list[i].end_time);
}
else if (event_list[i].codes_op.op_type == CODES_WK_READ)
{
fprintf(log_stream, "Rank %d READ %"PRIu64" [sz = %"PRId64", off = %"PRId64
"] (%lf - %lf)\n",
rank,
event_list[i].codes_op.u.read.file_id,
(int64_t)event_list[i].codes_op.u.read.size,
(int64_t)event_list[i].codes_op.u.read.offset,
event_list[i].start_time,
event_list[i].end_time);
}
else if (event_list[i].codes_op.op_type == CODES_WK_WRITE)
{
fprintf(log_stream, "Rank %d WRITE %"PRIu64" [sz = %"PRId64", off = %"PRId64
"] (%lf - %lf)\n",
rank,
event_list[i].codes_op.u.write.file_id,
(int64_t)event_list[i].codes_op.u.write.size,
(int64_t)event_list[i].codes_op.u.write.offset,
event_list[i].start_time,
event_list[i].end_time);
}
else if (event_list[i].codes_op.op_type == CODES_WK_BARRIER)
{
fprintf(log_stream, "****");
}
}
return;
}
/* comparison function for sorting darshan_io_ops in order of start timestamps */
static int darshan_io_op_compare(
const void *p1, const void *p2)
......
......@@ -24,8 +24,6 @@
#include "codes/quickhash.h"
#include "codes/configuration.h"
#define WORKLOAD_PRINT 1
#define WORKLOAD_DELAY_PCT 0.95
/* hash table entry for looking up file descriptor of a workload file id */
......@@ -140,13 +138,6 @@ int load_workload(char *conf_path, int rank)
configuration_get_value(&config, "PARAMS", "aggregator_count", aggregator_count, 10);
d_params.aggregator_cnt = atoi(aggregator_count);
#if WORKLOAD_PRINT
d_params.stream = NULL;
#else
d_params.stream = log_stream;
opt_verbose = 0;
#endif
return codes_workload_load(workload_type, (char *)&d_params, rank);
}
else if (strcmp(workload_type, "bgp_io_workload") == 0)
......@@ -172,7 +163,6 @@ int load_workload(char *conf_path, int rank)
/* 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);
......@@ -313,11 +303,9 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
switch (replay_op.op_type)
{
case CODES_WK_DELAY:
#if WORKLOAD_PRINT
if (opt_verbose)
fprintf(log_stream, "[Rank %d] Operation %lld : DELAY %lf seconds\n",
rank, op_number, replay_op.u.delay.seconds);
#endif
if (!opt_noop)
{
......@@ -344,10 +332,8 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
}
return 0;
case CODES_WK_BARRIER:
#if WORKLOAD_PRINT
if (opt_verbose)
fprintf(log_stream, "[Rank %d] Operation %lld : BARRIER\n", rank, op_number);
#endif
if (!opt_noop)
{
......@@ -363,11 +349,9 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
}
return 0;
case CODES_WK_OPEN:
#if WORKLOAD_PRINT
if (opt_verbose)
fprintf(log_stream, "[Rank %d] Operation %lld: %s file %"PRIu64"\n", rank, op_number,
(replay_op.u.open.create_flag) ? "CREATE" : "OPEN", replay_op.u.open.file_id);
#endif
if (!opt_noop)
{
......@@ -402,11 +386,9 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
}
return 0;
case CODES_WK_CLOSE:
#if WORKLOAD_PRINT
if (opt_verbose)
fprintf(log_stream, "[Rank %d] Operation %lld : CLOSE file %"PRIu64"\n",
rank, op_number, replay_op.u.close.file_id);
#endif
if (!opt_noop)
{
......@@ -428,13 +410,11 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
}
return 0;
case CODES_WK_WRITE:
#if WORKLOAD_PRINT
if (opt_verbose)
fprintf(log_stream, "[Rank %d] Operation %lld : WRITE file %"PRIu64" (sz = %"PRId64
", off = %"PRId64")\n",
rank, op_number, replay_op.u.write.file_id, replay_op.u.write.size,
replay_op.u.write.offset);
#endif
if (!opt_noop)
{
......@@ -462,12 +442,11 @@ int replay_workload_op(struct codes_workload_op replay_op, int rank, long long i
}
return 0;
case CODES_WK_READ:
#if WORKLOAD_PRINT
if (opt_verbose)
fprintf(log_stream, "[Rank %d] Operation %lld : READ file %"PRIu64" (sz = %"PRId64
", off = %"PRId64")\n", rank, op_number, replay_op.u.read.file_id,
replay_op.u.read.size, replay_op.u.read.offset);
#endif
if (!opt_noop)
{
/* search for the corresponding file descriptor in the hash table */
......
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