Commit 56085591 authored by Misbah Mubarak's avatar Misbah Mubarak

Adding lp suspend for wait operations in MPI Sim layer, adding commit_f in...

Adding lp suspend for wait operations in MPI Sim layer, adding commit_f in dumpi workload debug utility
parent 03cc9c23
......@@ -390,6 +390,7 @@ tw_lptype nw_lp = {
(pre_run_f) NULL,
(event_f) nw_test_event_handler,
(revent_f) nw_test_event_handler_rc,
(commit_f) NULL,
(final_f) nw_test_finalize,
(map_f) codes_mapping,
sizeof(nw_state)
......
......@@ -370,7 +370,9 @@ static int notify_posted_wait(nw_state* s,
wait_elem->num_completed,
wait_elem->count,
lp->gid);
assert(wait_elem->num_completed <= wait_elem->count);
if(wait_elem->num_completed > wait_elem->count)
tw_lp_suspend(lp, 1, 0);
if(wait_elem->num_completed == wait_elem->count)
{
if(enable_debug)
......@@ -1253,9 +1255,13 @@ static void get_next_mpi_operation_rc(nw_state* s, tw_bf * bf, nw_message * m, t
case CODES_WK_DELAY:
{
s->num_delays--;
tw_rand_reverse_unif(lp->rng);
if(!disable_delay)
if(disable_delay)
codes_issue_next_event_rc(lp);
else
{
tw_rand_reverse_unif(lp->rng);
s->compute_time = m->rc.saved_delay;
}
}
break;
case CODES_WK_BCAST:
......@@ -1307,7 +1313,7 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
if(mpi_op.op_type == CODES_WK_END)
{
s->elapsed_time = tw_now(lp) - s->start_time;
s->elapsed_time = tw_now(lp) - s->start_time;
return;
}
switch(mpi_op.op_type)
......@@ -1330,7 +1336,6 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
case CODES_WK_DELAY:
{
s->num_delays++;
if(disable_delay)
codes_issue_next_event(lp);
......@@ -1384,11 +1389,11 @@ void nw_test_finalize(nw_state* s, tw_lp* lp)
if(!s->nw_id)
written = sprintf(s->output_buf, "# Format <LP ID> <Terminal ID> <Total sends> <Total Recvs> <Bytes sent> <Bytes recvd> <Send time> <Comm. time> <Compute time>");
if(s->wait_op)
/*if(s->wait_op)
{
printf("\n Incomplete wait operation Rank %ld ", s->nw_id);
print_waiting_reqs(s->wait_op->req_ids, s->wait_op->count);
}
}*/
if(alloc_spec == 1)
{
struct codes_jobmap_id lid;
......
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