Commit f86fa5a2 authored by Xin Wang's avatar Xin Wang

enable alltoall overhead

parent 333037be
...@@ -2182,17 +2182,25 @@ static void get_next_mpi_operation_rc(nw_state* s, tw_bf * bf, nw_message * m, t ...@@ -2182,17 +2182,25 @@ static void get_next_mpi_operation_rc(nw_state* s, tw_bf * bf, nw_message * m, t
} }
break; break;
case CODES_WK_ALLREDUCE: case CODES_WK_ALLREDUCE:
case CODES_WK_BCAST:
case CODES_WK_ALLGATHER:
case CODES_WK_ALLGATHERV:
case CODES_WK_ALLTOALL:
case CODES_WK_ALLTOALLV:
case CODES_WK_REDUCE:
{ {
if(bf->c1) if(bf->c1)
{ {
s->num_msg_sizes = m->rc.saved_num_msg_sizes; if(debug_cols) {
if(s->num_msg_sizes > 0){ s->num_msg_sizes = m->rc.saved_num_msg_sizes;
s->col_latency[s->num_msg_sizes-1] = m->rc.saved_col_time; if(s->num_msg_sizes > 0){
s->col_msizes[s->num_msg_sizes-1] = m->rc.saved_col_size; s->col_latency[s->num_msg_sizes-1] = m->rc.saved_col_time;
s->col_msizes[s->num_msg_sizes-1] = m->rc.saved_col_size;
}
s->num_all_reduce--;
s->all_reduce_time = m->rc.saved_delay;
} }
s->num_all_reduce--;
s->col_time = m->rc.saved_send_time; s->col_time = m->rc.saved_send_time;
s->all_reduce_time = m->rc.saved_delay;
if(enable_col_overhead) if(enable_col_overhead)
s->is_collective = 1; s->is_collective = 1;
} }
...@@ -2204,12 +2212,6 @@ static void get_next_mpi_operation_rc(nw_state* s, tw_bf * bf, nw_message * m, t ...@@ -2204,12 +2212,6 @@ static void get_next_mpi_operation_rc(nw_state* s, tw_bf * bf, nw_message * m, t
codes_issue_next_event_rc(lp); codes_issue_next_event_rc(lp);
} }
break; break;
case CODES_WK_BCAST:
case CODES_WK_ALLGATHER:
case CODES_WK_ALLGATHERV:
case CODES_WK_ALLTOALL:
case CODES_WK_ALLTOALLV:
case CODES_WK_REDUCE:
case CODES_WK_COL: case CODES_WK_COL:
{ {
s->num_cols--; s->num_cols--;
...@@ -2332,32 +2334,40 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l ...@@ -2332,32 +2334,40 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
} }
break; break;
case CODES_WK_ALLREDUCE: case CODES_WK_ALLREDUCE:
case CODES_WK_REDUCE:
case CODES_WK_BCAST:
case CODES_WK_ALLGATHER:
case CODES_WK_ALLGATHERV:
case CODES_WK_ALLTOALL:
case CODES_WK_ALLTOALLV:
{ {
s->num_cols++; s->num_cols++;
if(s->col_time > 0) if(s->col_time > 0)
{ {
bf->c1 = 1; bf->c1 = 1;
m->rc.saved_delay = s->all_reduce_time; if(debug_cols) {
m->rc.saved_num_msg_sizes = s->num_msg_sizes; m->rc.saved_delay = s->all_reduce_time;
if (s->num_msg_sizes>0){ m->rc.saved_num_msg_sizes = s->num_msg_sizes;
m->rc.saved_col_size = s->col_msizes[s->num_msg_sizes-1]; if (s->num_msg_sizes>0){
m->rc.saved_col_time = s->col_latency[s->num_msg_sizes-1]; m->rc.saved_col_size = s->col_msizes[s->num_msg_sizes-1];
m->rc.saved_col_time = s->col_latency[s->num_msg_sizes-1];
}
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);
s->num_all_reduce++;
} }
if(s->num_msg_sizes == 0) s->is_collective = 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; m->rc.saved_send_time = s->col_time;
s->col_time = 0; s->col_time = 0;
s->is_collective = 0;
s->num_all_reduce++;
} }
else else
{ {
...@@ -2368,13 +2378,6 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l ...@@ -2368,13 +2378,6 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
codes_issue_next_event(lp); codes_issue_next_event(lp);
} }
break; break;
case CODES_WK_REDUCE:
case CODES_WK_BCAST:
case CODES_WK_ALLGATHER:
case CODES_WK_ALLGATHERV:
case CODES_WK_ALLTOALL:
case CODES_WK_ALLTOALLV:
case CODES_WK_COL: case CODES_WK_COL:
{ {
s->num_cols++; s->num_cols++;
......
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