Commit aae0feb6 authored by Xin Wang's avatar Xin Wang

omitting collective overhead for 0 byte msg, delete temporary bcast modification

parent d147259f
......@@ -1507,7 +1507,7 @@ static void codes_exec_mpi_send(nw_state* s,
local_m.fwd.app_id = s->app_id;
tw_stime collective_overhead = 0;
if(s->is_collective)
if(s->is_collective && mpi_op->u.send.num_bytes > 0)
collective_overhead = col_soft_overhead + col_overhead_per_byte * mpi_op->u.send.num_bytes;
if(mpi_op->u.send.num_bytes < EAGER_THRESHOLD)
......@@ -2134,22 +2134,6 @@ static void get_next_mpi_operation_rc(nw_state* s, tw_bf * bf, nw_message * m, t
}
break;
case CODES_WK_BCAST:
{
if(bf->c1)
{
s->col_latency[s->num_msg_sizes] = 0;
s->col_msizes[s->num_msg_sizes] = 0;
//todo: reverse handler for num_msg_sizes
s->num_all_reduce--;
s->col_time = m->rc.saved_send_time;
s->all_reduce_time -= s->col_time;
}
else
{
s->col_time = 0;
}
codes_issue_next_event_rc(lp);
}
case CODES_WK_ALLGATHER:
case CODES_WK_ALLGATHERV:
case CODES_WK_ALLTOALL:
......@@ -2311,37 +2295,6 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
case CODES_WK_REDUCE:
case CODES_WK_BCAST:
{
s->num_cols++;
if(s->col_time > 0)
{
bf->c1 = 1;
m->rc.saved_delay = s->all_reduce_time;
if(s->num_msg_sizes == 0)
{
s->num_msg_sizes += 1;
}
else if(s->col_msizes[s->num_msg_sizes-1] != mpi_op.u.collective.num_bytes)
{
s->num_msg_sizes += 1;
}
s->col_latency[s->num_msg_sizes-1] += (tw_now(lp) - s->col_time);
s->col_msizes[s->num_msg_sizes-1] = mpi_op.u.collective.num_bytes;
s->all_reduce_time += (tw_now(lp) - s->col_time);
m->rc.saved_send_time = s->col_time;
s->col_time = 0;
s->is_collective = 0;
s->num_all_reduce++;
}
else
{
s->col_time = tw_now(lp);
if(enable_col_overhead)
s->is_collective = 1;
}
codes_issue_next_event(lp);
}
break;
case CODES_WK_ALLGATHER:
case CODES_WK_ALLGATHERV:
case CODES_WK_ALLTOALL:
......@@ -2538,8 +2491,8 @@ const tw_optdef app_opt [] =
TWOPT_UINT("preserve_wait_ordering", preserve_wait_ordering, "only enable when getting unmatched send/recv errors in optimistic mode (turning on slows down simulation)"),
TWOPT_UINT("debug_cols", debug_cols, "completion time of collective operations (currently MPI_AllReduce)"),
TWOPT_UINT("enable_col_overhead", enable_col_overhead, "adding overhead to collective operations (currently MPI_AllReduce)"),
TWOPT_STIME("col_overhead_per_byte",col_overhead_per_byte, "collective call overhead per byte"),
TWOPT_STIME("col_soft_overhead",col_soft_overhead, "collective call constant overhead"),
TWOPT_STIME("col_overhead_per_byte",col_overhead_per_byte, "collective call overhead per byte (currently MPI_AllReduce)"),
TWOPT_STIME("col_soft_overhead",col_soft_overhead, "collective call software overhead (currently MPI_AllReduce)"),
TWOPT_UINT("enable_mpi_debug", enable_debug, "enable debugging of MPI sim layer (works with sync=1 only)"),
TWOPT_UINT("sampling_interval", sampling_interval, "sampling interval for MPI operations"),
TWOPT_UINT("enable_sampling", enable_sampling, "enable sampling (only works in sequential mode)"),
......
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