Commit 51dcc4a3 authored by Misbah Mubarak's avatar Misbah Mubarak

adding debug statements for bw tracking

parent d31683a3
......@@ -56,7 +56,7 @@ static int wrkld_id;
static int num_net_traces = 0;
static int priority_type = 0;
static int num_dumpi_traces = 0;
static int64_t EAGER_THRESHOLD = 8192;
static int64_t EAGER_THRESHOLD = INT_MAX;
static long num_ops = 0;
static int upper_threshold = 1048576;
......@@ -1557,7 +1557,7 @@ static void codes_exec_mpi_send(nw_state* s,
bf->c3 = 0;
bf->c1 = 0;
bf->c4 = 0;
char prio[12];
if(priority_type == 0)
{
......@@ -1813,10 +1813,22 @@ static void send_ack_back(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp, m
remote_m.fwd.matched_req = matched_req;
char prio[12];
if(s->app_id == 0)
strcpy(prio, "high");
else if(s->app_id == 1)
strcpy(prio, "medium");
if(priority_type == 0)
{
if(s->app_id == 0)
strcpy(prio, "high");
else if(s->app_id == 1)
strcpy(prio, "medium");
}
else if(priority_type == 1)
{
if(mpi_op->tag == COL_TAG)
{
strcpy(prio, "high");
}
else
strcpy(prio, "medium");
}
else
tw_error(TW_LOC, "\n Invalid app id");
......@@ -2058,7 +2070,6 @@ void nw_test_init(nw_state* s, tw_lp* lp)
s->app_id = lid.job;
s->local_rank = lid.rank;
double overhead;
int rc = configuration_get_value_double(&config, "PARAMS", "self_msg_overhead", NULL, &overhead);
......
......@@ -31,6 +31,7 @@
#include <cortex/topology.h>
#endif
#define DEBUG_QOS 1
#define DUMP_CONNECTIONS 0
#define PRINT_CONFIG 1
#define T_ID 1
......@@ -1406,18 +1407,17 @@ void router_plus_setup(router_state *r, tw_lp *lp)
assert(router_type_map[r->router_id] == LEAF);
// printf("%lu: %i is a LEAF\n",lp->gid, r->router_id);
}
if(r->router_id == 0)
{
#if DEBUG_QOS == 1
char rtr_bw_log[128];
sprintf(rtr_bw_log, "router-bw-tracker");
dragonfly_rtr_bw_log = fopen(rtr_bw_log, "w+");
sprintf(rtr_bw_log, "router-bw-tracker-%d", g_tw_mynode);
if(dragonfly_rtr_bw_log == NULL)
{
dragonfly_rtr_bw_log = fopen(rtr_bw_log, "w+");
if(dragonfly_rtr_bw_log != NULL)
fprintf(dragonfly_rtr_bw_log, "\n router-id time-stamp port-id qos-level bw-consumed qos-status qos-data busy-time");
}
}
#endif
r->connMan = &connManagerList[r->router_id];
r->gc_usage = (int *) calloc(p->num_global_connections, sizeof(int));
......@@ -1609,12 +1609,17 @@ void issue_rtr_bw_monitor_event(router_state * s, tw_bf * bf, terminal_plus_mess
for(int k = 0; k < num_qos_levels; k++)
{
int bw_consumed = get_rtr_bandwidth_consumption(s, k, j);
if(s->router_id == 0)
#if DEBUG_QOS == 1
if(dragonfly_rtr_bw_log != NULL)
{
fprintf(dragonfly_rtr_bw_log, "\n %d %f %d %d %d %d %d %f", s->router_id, tw_now(lp), j, k, bw_consumed, s->qos_status[j][k], s->qos_data[j][k], s->busy_time_sample[j]);
if(s->qos_data[j][k] > 0)
{
fprintf(dragonfly_rtr_bw_log, "\n %d %f %d %d %d %d %d %f", s->router_id, tw_now(lp), j, k, bw_consumed, s->qos_status[j][k], s->qos_data[j][k], s->busy_time_sample[j]);
}
}
#endif
}
}
for(int j = 0; j < s->params->radix; j++)
......
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