rma: fix semantic errors in osc/rdma and MPI_Win_fence
- Return an error if the caller specified both MPI_MODE_NOPRECEDE and MPI_MODE_NOSUCCEED to MPI_Win_fence. - Return an error if the caller attempts to enter an active target epoch while already in a passive target epoch. - End an active target epoch if MPI_Win_fence is called with MPI_MODE_NOSUCCEED. cmr=v1.7.5:ticket=trac:4382 This commit was SVN r31043. The following Trac tickets were found above: Ticket 4382 --> https://svn.open-mpi.org/trac/ompi/ticket/4382
Этот коммит содержится в:
родитель
f56f37d364
Коммит
6648a46963
@ -78,9 +78,18 @@ ompi_osc_rdma_fence(int assert, ompi_win_t *win)
|
||||
OPAL_OUTPUT_VERBOSE((25, ompi_osc_base_framework.framework_output,
|
||||
"osc rdma: fence start"));
|
||||
|
||||
/* can't enter an active target epoch when in a passive target epoch */
|
||||
if (module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
/* active sends are now active (we will close the epoch if NOSUCCEED is specified) */
|
||||
if (0 == (assert & MPI_MODE_NOSUCCEED)) {
|
||||
module->active_eager_send_active = true;
|
||||
}
|
||||
|
||||
/* short-circuit the noprecede case */
|
||||
if (0 != (assert & MPI_MODE_NOPRECEDE)) {
|
||||
module->active_eager_send_active = true;
|
||||
ret = module->comm->c_coll.coll_barrier(module->comm,
|
||||
module->comm->c_coll.coll_barrier_module);
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
|
||||
@ -122,8 +131,10 @@ ompi_osc_rdma_fence(int assert, ompi_win_t *win)
|
||||
|
||||
ret = OMPI_SUCCESS;
|
||||
|
||||
if (0 == (assert & MPI_MODE_NOSUCCEED)) {
|
||||
module->active_eager_send_active = true;
|
||||
if (assert & MPI_MODE_NOSUCCEED) {
|
||||
/* as specified in MPI-3 p 438 3-5 the fence can end an epoch. it isn't explicitly
|
||||
* stated that MPI_MODE_NOSUCCEED ends the epoch but it is a safe assumption. */
|
||||
module->active_eager_send_active = false;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
@ -9,6 +10,8 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -48,7 +51,10 @@ int MPI_Win_fence(int assert, MPI_Win win)
|
||||
} else if (0 != (assert & ~(MPI_MODE_NOSTORE | MPI_MODE_NOPUT |
|
||||
MPI_MODE_NOPRECEDE | MPI_MODE_NOSUCCEED))) {
|
||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
||||
}
|
||||
} else if ((MPI_MODE_NOPRECEDE | MPI_MODE_NOSUCCEED) == (assert & (MPI_MODE_NOPRECEDE | MPI_MODE_NOSUCCEED))) {
|
||||
/* it is erroneous to have both MPI_MODE_NOPRECEDE & MPI_MODE_NOSUCCEED */
|
||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user