Skip to content

Commit 389828a

Browse files
committed
osc/pt2pt: reset all_sync sync object before sending complete messages
This commit fixes a bug that occurs when a post message comes in when sending complete messages or while waiting for all outgoing messages to flush. In that case the post message might get incorrecly associated with the ending sync object. References open-mpi#1012 Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from open-mpi/ompi@864f88a)
1 parent af63795 commit 389828a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ int ompi_osc_pt2pt_complete (ompi_win_t *win)
321321

322322
peers = sync->peer_list.peers;
323323

324+
/* need to reset the sync here to avoid processing incorrect post messages */
325+
ompi_osc_pt2pt_sync_reset (sync);
326+
324327
OPAL_THREAD_UNLOCK(&module->lock);
325328

326329
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
@@ -396,8 +399,6 @@ int ompi_osc_pt2pt_complete (ompi_win_t *win)
396399
opal_condition_wait(&module->cond, &module->lock);
397400
}
398401

399-
ompi_osc_pt2pt_sync_reset (sync);
400-
401402
/* unlock here, as group cleanup can take a while... */
402403
OPAL_THREAD_UNLOCK(&module->lock);
403404

0 commit comments

Comments
 (0)