Commit 6a26562f authored by Misbah Mubarak's avatar Misbah Mubarak

adding latest version of mpi-replay and dragonfly-custom

parent 331f2c6e
......@@ -776,7 +776,7 @@ static void gen_synthetic_tr(nw_state * s, tw_bf * bf, nw_message * m, tw_lp * l
remote_m.fwd.src_rank = s->local_rank;
// printf("\nAPP %d SRC %d Dest %d (twid %llu)", jid.job, s->local_rank, dest_svr[i], global_dest_id);
m->event_rc = model_net_event(net_id, "medium", global_dest_id, payload_sz, 0.0,
m->event_rc = model_net_event(net_id, "high", global_dest_id, payload_sz, 0.0,
sizeof(nw_message), (const void*)&remote_m,
0, NULL, lp);
......@@ -2914,13 +2914,11 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
MPI_Finalize();
return -1;
}
}
char agg_log_name[512];
sprintf(agg_log_name, "%s/mpi-aggregate-logs-%d.bin", sampling_dir, rank);
workload_agg_log = fopen(agg_log_name, "w+");
workload_meta_log = fopen("mpi-workload-meta-log", "w+");
group_ratio = codes_mctx_set_group_ratio(NULL, true);
if(!workload_agg_log || !workload_meta_log)
{
......@@ -2928,6 +2926,9 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
MPI_Finalize();
return -1;
}
}
group_ratio = codes_mctx_set_group_ratio(NULL, true);
if(enable_sampling)
model_net_enable_sampling(sampling_interval, sampling_end_time);
......
......@@ -130,7 +130,7 @@ static int num_intra_nonmin_hops = 4;
static int num_intra_min_hops = 2;
static FILE * dragonfly_rtr_bw_log = NULL;
static FILE * dragonfly_term_bw_log = NULL;
//static FILE * dragonfly_term_bw_log = NULL;
static int sample_bytes_written = 0;
static int sample_rtr_bytes_written = 0;
......@@ -1145,12 +1145,12 @@ void issue_bw_monitor_event(terminal_state * s, tw_bf * bf, terminal_custom_mess
s->rc_index++;
assert(s->rc_index < num_rc_windows);
if(s->router_id == 0)
/* if(s->router_id == 0)
{
fprintf(dragonfly_term_bw_log, "\n %d %lf %lf ", s->terminal_id, tw_now(lp), s->busy_time_sample);
s->busy_time_sample = 0;
}
*/
if(tw_now(lp) > max_qos_monitor)
return;
......@@ -1209,12 +1209,10 @@ void issue_rtr_bw_monitor_event(router_state * s, tw_bf * bf, terminal_custom_me
for(int k = 0; k < num_qos_levels; k++)
{
int bw_consumed = get_rtr_bandwidth_consumption(s, k, j);
if(s->router_id == 1)
if(s->router_id == 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]);
if(s->busy_time_sample[j] != 0)
printf("\n Busy time %lf ", s->busy_time_sample[j]);
}
}
}
......@@ -1374,13 +1372,13 @@ terminal_custom_init( terminal_state * s,
s->in_send_loop = 0;
s->issueIdle = 0;
if(s->terminal_id == 0)
/*if(s->terminal_id == 0)
{
char term_bw_log[64];
sprintf(term_bw_log, "terminal-bw-tracker");
dragonfly_term_bw_log = fopen(term_bw_log, "w");
fprintf(dragonfly_term_bw_log, "\n term-id time-stamp port-id busy-time");
}
}*/
return;
}
......@@ -1420,7 +1418,10 @@ void router_custom_setup(router_state * r, tw_lp * lp)
{
char rtr_bw_log[64];
sprintf(rtr_bw_log, "router-bw-tracker");
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");
}
//printf("\n Local router id %d global id %d ", r->router_id, lp->gid);
......@@ -3049,12 +3050,15 @@ dragonfly_custom_terminal_final( terminal_state * s,
if(s->terminal_id == 0)
{
fclose(dragonfly_term_bw_log);
char meta_filename[64];
//fclose(dragonfly_term_bw_log);
char meta_filename[128];
sprintf(meta_filename, "dragonfly-cn-stats.meta");
FILE * fp = fopen(meta_filename, "w+");
FILE * fp = NULL;
fp = fopen(meta_filename, "w+");
if(fp)
fprintf(fp, "# Format <LP id> <Terminal ID> <Total Data Size> <Avg packet latency> <# Flits/Packets finished> <Busy Time> <Max packet Latency> <Min packet Latency >\n");
fclose(fp);
}
written = 0;
......
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