Skip to content

Commit 9f74df9

Browse files
authored
Merge pull request #8779 from awlauria/8677_fix
osc/rdma: Fix MPI_Win_start()/complete() with MPI_GROUP_EMPTY.
2 parents 060f129 + ec0d6ff commit 9f74df9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ompi/mca/osc/rdma/osc_rdma_active_target.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,16 +385,17 @@ int ompi_osc_rdma_start_atomic (ompi_group_t *group, int mpi_assert, ompi_win_t
385385

386386
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "start group size %d", sync->num_peers);
387387

388+
sync->type = OMPI_OSC_RDMA_SYNC_TYPE_PSCW;
389+
388390
if (0 == ompi_group_size (group)) {
389391
/* nothing more to do. this is an empty start epoch */
392+
sync->peer_list.peers = NULL;
390393
OPAL_THREAD_UNLOCK(&module->lock);
391394
return OMPI_SUCCESS;
392395
}
393396

394397
opal_atomic_wmb ();
395398

396-
sync->type = OMPI_OSC_RDMA_SYNC_TYPE_PSCW;
397-
398399
/* prevent us from entering a passive-target, fence, or another pscw access epoch until
399400
* the matching complete is called */
400401
sync->epoch_active = true;
@@ -466,17 +467,14 @@ int ompi_osc_rdma_complete_atomic (ompi_win_t *win)
466467
sync->type = OMPI_OSC_RDMA_SYNC_TYPE_NONE;
467468
sync->epoch_active = false;
468469

469-
/* phase 2 cleanup group */
470-
OBJ_RELEASE(group);
471-
472470
peers = sync->peer_list.peers;
473471
if (NULL == peers) {
474-
/* empty peer list */
475472
OPAL_THREAD_UNLOCK(&(module->lock));
476-
OBJ_RELEASE(group);
477473
return OMPI_SUCCESS;
478474
}
479475

476+
OBJ_RELEASE(group);
477+
480478
sync->peer_list.peers = NULL;
481479

482480
OPAL_THREAD_UNLOCK(&(module->lock));

0 commit comments

Comments
 (0)