Commit 69292f03 authored by Caitlin Ross's avatar Caitlin Ross

fix RNG reverse bug in model-net.c

parent a3f129b4
...@@ -271,12 +271,12 @@ static model_net_event_return model_net_noop_event( ...@@ -271,12 +271,12 @@ static model_net_event_return model_net_noop_event(
model_net_event_return num_rng_calls = 0; model_net_event_return num_rng_calls = 0;
tw_stime poffset = mn_in_sequence ? mn_msg_offset : 0.0; tw_stime poffset = mn_in_sequence ? mn_msg_offset : 0.0;
tw_stime delay = codes_local_latency(sender); tw_stime delay = codes_local_latency(sender);
num_rng_calls++; // rng call is in codes_local_latency
tw_stime sendTime = message_size * codes_cn_delay; tw_stime sendTime = message_size * codes_cn_delay;
if (self_event_size && self_event != NULL) { if (self_event_size && self_event != NULL) {
poffset += delay; poffset += delay;
num_rng_calls++;
tw_event *e = tw_event_new(sender->gid, poffset+offset+sendTime, sender); tw_event *e = tw_event_new(sender->gid, poffset+offset+sendTime, sender);
memcpy(tw_event_data(e), self_event, self_event_size); memcpy(tw_event_data(e), self_event, self_event_size);
tw_event_send(e); tw_event_send(e);
...@@ -284,7 +284,6 @@ static model_net_event_return model_net_noop_event( ...@@ -284,7 +284,6 @@ static model_net_event_return model_net_noop_event(
if (remote_event_size && remote_event != NULL) { if (remote_event_size && remote_event != NULL) {
poffset += delay; poffset += delay;
num_rng_calls++;
/* special case - in a "pull" event, the "remote" message is actually /* special case - in a "pull" event, the "remote" message is actually
* to self */ * to self */
tw_event *e = tw_event_new(is_pull ? sender->gid : final_dest_lp, tw_event *e = tw_event_new(is_pull ? sender->gid : final_dest_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