Commit 39bf10b3 authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

memory fixes in mpi sim layer

parent f5539ee1
...@@ -459,6 +459,8 @@ static void codes_exec_mpi_wait_rc(nw_state* s, nw_message* m, tw_lp* lp, struct ...@@ -459,6 +459,8 @@ static void codes_exec_mpi_wait_rc(nw_state* s, nw_message* m, tw_lp* lp, struct
{ {
if(s->pending_waits) if(s->pending_waits)
{ {
struct pending_waits * wait_op = s->pending_waits;
free(wait_op);
s->pending_waits = NULL; s->pending_waits = NULL;
return; return;
} }
...@@ -520,6 +522,8 @@ static void codes_exec_mpi_wait_all_rc(nw_state* s, nw_message* m, tw_lp* lp, st ...@@ -520,6 +522,8 @@ static void codes_exec_mpi_wait_all_rc(nw_state* s, nw_message* m, tw_lp* lp, st
} }
else else
{ {
struct pending_waits* wait_op = s->pending_waits;
free(wait_op);
s->pending_waits = NULL; s->pending_waits = NULL;
assert(!s->pending_waits); assert(!s->pending_waits);
if(lp->gid == TRACE) if(lp->gid == TRACE)
...@@ -573,7 +577,6 @@ static void codes_exec_mpi_wait_all( ...@@ -573,7 +577,6 @@ static void codes_exec_mpi_wait_all(
wait_op->mpi_op = mpi_op; wait_op->mpi_op = mpi_op;
wait_op->num_completed = num_completed; wait_op->num_completed = num_completed;
wait_op->start_time = tw_now(lp); wait_op->start_time = tw_now(lp);
//rc_stack_push(lp, wait_op, free, s->st);
s->pending_waits = wait_op; s->pending_waits = wait_op;
} }
} }
......
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