From 9c7b6a43529dfb8081e2855a35bb496a04b16f5a Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Tue, 8 Dec 2015 19:13:03 +0900 Subject: [PATCH] osc/sm: Fix a bug that `MPI_WIN_TEST` does not update `flag` to 0. `MPI_WIN_TEST` must update the `flag` parameter to 0 when not all origin processes called `MPI_WIN_COMPLETE`. But sm OSC doesn't. If the caller initialize the `flag` argument to a non-0 value, the caller will receive the non-0 `flag` value. --- ompi/mca/osc/sm/osc_sm_active_target.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ompi/mca/osc/sm/osc_sm_active_target.c b/ompi/mca/osc/sm/osc_sm_active_target.c index 672850be99..fdd1117eaf 100644 --- a/ompi/mca/osc/sm/osc_sm_active_target.c +++ b/ompi/mca/osc/sm/osc_sm_active_target.c @@ -315,6 +315,8 @@ ompi_osc_sm_test(struct ompi_win_t *win, OBJ_RELEASE(module->post_group); module->post_group = NULL; *flag = 1; + } else { + *flag = 0; } OPAL_THREAD_UNLOCK(&module->lock);