Commit df83061f authored by Philip Carns's avatar Philip Carns

bug fixes

parent 5e632db6
......@@ -329,20 +329,20 @@ static void handle_msg_ready_event(
param = find_params(m->net_msg_size_bytes);
if(m->net_msg_size_bytes > SMALL_MSG_LIMIT)
if(m->net_msg_size_bytes <= SMALL_MSG_LIMIT)
{
max = param->g;
if(max < param->o_r)
max = param->o_r;
recv_time = ceil((double)m->net_msg_size_bytes/(double)PACKET_SIZE) * max;
/* scale to nanoseconds */
recv_time /= 1000;
recv_time *= 1000.0;
}
else
{
recv_time = ((double)(m->net_msg_size_bytes-1)*param->G);
/* scale to nanoseconds */
recv_time /= 1000;
recv_time *= 1000.0;
}
m->recv_time_saved = recv_time;
......@@ -364,7 +364,7 @@ static void handle_msg_ready_event(
/* bump up input queue idle time accordingly, include gap (g) parameter */
m->net_recv_next_idle_saved = ns->net_recv_next_idle;
ns->net_recv_next_idle = recv_queue_time + tw_now(lp) + param->g;
ns->net_recv_next_idle = recv_queue_time + tw_now(lp) + param->g*1000.0;
/* copy only the part of the message used by higher level */
if(m->event_size_bytes)
......@@ -431,20 +431,20 @@ static void handle_msg_start_event(
total_event_size = loggp_get_msg_sz() + m->event_size_bytes + m->local_event_size_bytes;
if(m->net_msg_size_bytes > SMALL_MSG_LIMIT)
if(m->net_msg_size_bytes <= SMALL_MSG_LIMIT)
{
max = param->g;
if(max < param->o_s)
max = param->o_s;
xmit_time = param->L + param->o_s + ceil((double)m->net_msg_size_bytes/(double)PACKET_SIZE) * max;
/* scale to nanoseconds */
xmit_time /= 1000;
xmit_time *= 1000.0;
}
else
{
xmit_time = param->L + param->o_s + ((double)(m->net_msg_size_bytes-1)*param->G);
/* scale to nanoseconds */
xmit_time /= 1000;
xmit_time *= 1000.0;
}
m->xmit_time_saved = xmit_time;
......@@ -458,7 +458,7 @@ static void handle_msg_start_event(
stat->max_event_size = total_event_size;
/* calculate send time stamp */
send_queue_time = (param->L + param->o_s)/1000.0;
send_queue_time = (param->L + param->o_s)*1000.0;
/* bump up time if the NIC send queue isn't idle right now */
if(ns->net_send_next_idle > tw_now(lp))
send_queue_time += ns->net_send_next_idle - tw_now(lp);
......@@ -470,7 +470,7 @@ static void handle_msg_start_event(
m->net_send_next_idle_saved = ns->net_send_next_idle;
if(ns->net_send_next_idle < tw_now(lp))
ns->net_send_next_idle = tw_now(lp);
ns->net_send_next_idle += xmit_time + param->g;
ns->net_send_next_idle += xmit_time + param->g*1000.0;
/* create new event to send msg to receiving NIC */
codes_mapping_get_lp_info(m->final_dest_gid, lp_group_name, &mapping_grp_id, &mapping_type_id, lp_type_name, &mapping_rep_id, &mapping_offset);
......
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