Commit b3b459e8 authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

more updates to dragonfly-custom reverse handler, probable fix to max-time issue

parent 4b6b67e7
...@@ -840,7 +840,7 @@ void arrive_syn_tr(nw_state * s, tw_bf * bf, nw_message * m, tw_lp * lp) ...@@ -840,7 +840,7 @@ void arrive_syn_tr(nw_state * s, tw_bf * bf, nw_message * m, tw_lp * lp)
}*/ }*/
} }
m->rc.saved_send_time = s->send_time; m->rc.saved_send_time = s->send_time;
if(tw_now(lp) - m->fwd.sim_start_time > s->max_time) if((tw_now(lp) - m->fwd.sim_start_time) > s->max_time)
s->max_time = tw_now(lp) - m->fwd.sim_start_time; s->max_time = tw_now(lp) - m->fwd.sim_start_time;
s->send_time += (tw_now(lp) - m->fwd.sim_start_time); s->send_time += (tw_now(lp) - m->fwd.sim_start_time);
......
...@@ -1892,7 +1892,7 @@ static void packet_send_rc(terminal_state * s, tw_bf * bf, terminal_custom_messa ...@@ -1892,7 +1892,7 @@ static void packet_send_rc(terminal_state * s, tw_bf * bf, terminal_custom_messa
tw_lp * lp) tw_lp * lp)
{ {
int num_qos_levels = s->params->num_qos_levels; int num_qos_levels = s->params->num_qos_levels;
int vcg = 0; int vcg = msg->saved_vc;
if(bf->c1) { if(bf->c1) {
s->in_send_loop = 1; s->in_send_loop = 1;
...@@ -1915,9 +1915,6 @@ static void packet_send_rc(terminal_state * s, tw_bf * bf, terminal_custom_messa ...@@ -1915,9 +1915,6 @@ static void packet_send_rc(terminal_state * s, tw_bf * bf, terminal_custom_messa
terminal_custom_message_list* cur_entry = (terminal_custom_message_list *)rc_stack_pop(s->st); terminal_custom_message_list* cur_entry = (terminal_custom_message_list *)rc_stack_pop(s->st);
if(num_qos_levels > 1)
vcg = get_vcg_from_category(msg);
prepend_to_terminal_custom_message_list(s->terminal_msgs, prepend_to_terminal_custom_message_list(s->terminal_msgs,
s->terminal_msgs_tail, vcg, cur_entry); s->terminal_msgs_tail, vcg, cur_entry);
if(bf->c3) { if(bf->c3) {
...@@ -1968,6 +1965,7 @@ static void packet_send(terminal_state * s, tw_bf * bf, terminal_custom_message ...@@ -1968,6 +1965,7 @@ static void packet_send(terminal_state * s, tw_bf * bf, terminal_custom_message
return; return;
} }
msg->saved_vc = vcg;
terminal_custom_message_list* cur_entry = s->terminal_msgs[vcg]; terminal_custom_message_list* cur_entry = s->terminal_msgs[vcg];
int data_size = s->params->chunk_size; int data_size = s->params->chunk_size;
uint64_t num_chunks = cur_entry->msg.packet_size/s->params->chunk_size; uint64_t num_chunks = cur_entry->msg.packet_size/s->params->chunk_size;
...@@ -3720,6 +3718,10 @@ static void router_packet_receive_rc(router_state * s, ...@@ -3720,6 +3718,10 @@ static void router_packet_receive_rc(router_state * s,
int output_port = msg->saved_vc; int output_port = msg->saved_vc;
int output_chan = msg->saved_channel; int output_chan = msg->saved_channel;
if(bf->c1)
{
s->is_monitoring_bw = 1;
}
if(bf->c15) if(bf->c15)
{ {
tw_rand_reverse_unif(lp->rng); tw_rand_reverse_unif(lp->rng);
...@@ -3805,6 +3807,7 @@ router_packet_receive( router_state * s, ...@@ -3805,6 +3807,7 @@ router_packet_receive( router_state * s,
{ {
if(s->is_monitoring_bw == 0) if(s->is_monitoring_bw == 0)
{ {
bf->c1 = 1;
tw_stime bw_ts = bw_reset_window + codes_local_latency(lp); tw_stime bw_ts = bw_reset_window + codes_local_latency(lp);
terminal_custom_message * m; terminal_custom_message * m;
tw_event * e = model_net_method_event_new(lp->gid, bw_ts, lp, tw_event * e = model_net_method_event_new(lp->gid, bw_ts, lp,
......
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