Commit 293ab047 authored by Caitlin Ross's avatar Caitlin Ross

fixing fat-tree RNG reverse errors

parent bd0052a7
......@@ -253,9 +253,12 @@ static void handle_kickoff_rev_event(
{
(void)b;
(void)m;
ns->msg_sent_count--;
model_net_event_rc2(lp, &m->event_rc);
tw_rand_reverse_unif(lp->rng);
ns->msg_sent_count--;
model_net_event_rc2(lp, &m->event_rc);
tw_rand_reverse_unif(lp->rng); // reversing RNG in issue_event
if (traffic == UNIFORM)
tw_rand_reverse_unif(lp->rng);
}
static void handle_kickoff_event(
svr_state * ns,
......
......@@ -1900,7 +1900,7 @@ void switch_packet_receive_rc(switch_state * s,
s_arrive_r++;
#endif
int output_port = msg->saved_vc;
if(s->params->routing != STATIC) {
if(s->params->routing != STATIC && !bf->c10) {
tw_rand_reverse_unif(lp->rng);
}
if(bf->c1)
......@@ -2669,6 +2669,7 @@ int ft_get_output_port( switch_state * s, tw_bf * bf, fattree_message * msg,
tw_lp * lp, int *out_off) {
(void)bf;
(void)lp;
bf->c10 = 0;
int outport = -1;
int start_port, end_port;
fattree_param *p = s->params;
......@@ -2694,6 +2695,7 @@ int ft_get_output_port( switch_state * s, tw_bf * bf, fattree_message * msg,
if(dest_term_local_id >= s->start_lneigh && dest_term_local_id < s->end_lneigh) {
outport = dest_term_local_id - s->start_lneigh;
*out_off = 0;
bf->c10 = 1;
return outport;
} else { //go up the least congested path
start_port = s->num_lcons;
......
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