This commit fixes trac:4681 - ibm c_fence_lock hangs
cmr=v1.8.2:reviewer=tkordenbrock:subject=Portals4/MTL hanging fix This commit was SVN r32113. The following Trac tickets were found above: Ticket 4681 --> https://svn.open-mpi.org/trac/ompi/ticket/4681
Этот коммит содержится в:
родитель
5cb8cc856c
Коммит
a1d312343b
@ -98,6 +98,8 @@ struct ompi_osc_portals4_module_t {
|
||||
ompi_group_t *post_group;
|
||||
opal_list_t outstanding_locks;
|
||||
|
||||
bool passive_target_access_epoch; /* True if the access epoch is a passive target access epoch */
|
||||
|
||||
/* things that are remotely accessible */
|
||||
ompi_osc_portals4_node_state_t state;
|
||||
};
|
||||
|
@ -25,10 +25,16 @@ ompi_osc_portals4_fence(int assert, struct ompi_win_t *win)
|
||||
(ompi_osc_portals4_module_t*) win->w_osc_module;
|
||||
int comm_ret, ret;
|
||||
|
||||
/* can't enter an active target epoch when in a passive target epoch */
|
||||
if (module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
comm_ret = ompi_osc_portals4_complete_all(module);
|
||||
|
||||
ret = module->comm->c_coll.coll_barrier(module->comm,
|
||||
module->comm->c_coll.coll_barrier_module);
|
||||
|
||||
return (OMPI_SUCCESS == comm_ret) ? ret : comm_ret;
|
||||
}
|
||||
|
||||
@ -41,6 +47,11 @@ ompi_osc_portals4_start(struct ompi_group_t *group,
|
||||
ompi_osc_portals4_module_t *module =
|
||||
(ompi_osc_portals4_module_t*) win->w_osc_module;
|
||||
|
||||
/* can't enter an active target epoch when in a passive target epoch */
|
||||
if (module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
if (0 == (assert & MPI_MODE_NOCHECK)) {
|
||||
int size;
|
||||
|
||||
|
@ -600,6 +600,8 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
|
||||
|
||||
OBJ_CONSTRUCT(&module->outstanding_locks, opal_list_t);
|
||||
|
||||
module->passive_target_access_epoch = false;
|
||||
|
||||
#if OPAL_ASSEMBLY_ARCH == OMPI_AMD64 || OPAL_ASSEMBLY_ARCH == IA32
|
||||
*model = MPI_WIN_UNIFIED;
|
||||
#else
|
||||
|
@ -219,6 +219,8 @@ ompi_osc_portals4_lock(int lock_type,
|
||||
ompi_osc_portals4_outstanding_lock_t* lock;
|
||||
int ret;
|
||||
|
||||
module->passive_target_access_epoch = true;
|
||||
|
||||
lock = OBJ_NEW(ompi_osc_portals4_outstanding_lock_t);
|
||||
lock->target = target;
|
||||
|
||||
@ -278,6 +280,8 @@ ompi_osc_portals4_unlock(int target,
|
||||
ret = OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
module->passive_target_access_epoch = false;
|
||||
|
||||
OBJ_RELEASE(lock);
|
||||
|
||||
return ret;
|
||||
@ -293,6 +297,8 @@ ompi_osc_portals4_lock_all(int assert,
|
||||
ompi_osc_portals4_outstanding_lock_t* lock;
|
||||
int ret = OMPI_SUCCESS;
|
||||
|
||||
module->passive_target_access_epoch = true;
|
||||
|
||||
lock = OBJ_NEW(ompi_osc_portals4_outstanding_lock_t);
|
||||
lock->target = -1;
|
||||
|
||||
@ -354,6 +360,8 @@ ompi_osc_portals4_unlock_all(struct ompi_win_t *win)
|
||||
}
|
||||
}
|
||||
|
||||
module->passive_target_access_epoch = false;
|
||||
|
||||
OBJ_RELEASE(lock);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
@ -378,6 +386,11 @@ ompi_osc_portals4_flush(int target,
|
||||
ompi_osc_portals4_module_t *module =
|
||||
(ompi_osc_portals4_module_t*) win->w_osc_module;
|
||||
|
||||
/* flush is only allowed from within a passive target epoch */
|
||||
if (!module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
return ompi_osc_portals4_complete_all(module);
|
||||
}
|
||||
|
||||
@ -388,6 +401,11 @@ ompi_osc_portals4_flush_all(struct ompi_win_t *win)
|
||||
ompi_osc_portals4_module_t *module =
|
||||
(ompi_osc_portals4_module_t*) win->w_osc_module;
|
||||
|
||||
/* flush is only allowed from within a passive target epoch */
|
||||
if (!module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
return ompi_osc_portals4_complete_all(module);
|
||||
}
|
||||
|
||||
@ -399,6 +417,11 @@ ompi_osc_portals4_flush_local(int target,
|
||||
ompi_osc_portals4_module_t *module =
|
||||
(ompi_osc_portals4_module_t*) win->w_osc_module;
|
||||
|
||||
/* flush is only allowed from within a passive target epoch */
|
||||
if (!module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
return ompi_osc_portals4_complete_all(module);
|
||||
}
|
||||
|
||||
@ -409,5 +432,10 @@ ompi_osc_portals4_flush_local_all(struct ompi_win_t *win)
|
||||
ompi_osc_portals4_module_t *module =
|
||||
(ompi_osc_portals4_module_t*) win->w_osc_module;
|
||||
|
||||
/* flush is only allowed from within a passive target epoch */
|
||||
if (!module->passive_target_access_epoch) {
|
||||
return OMPI_ERR_RMA_SYNC;
|
||||
}
|
||||
|
||||
return ompi_osc_portals4_complete_all(module);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user