* RMA_SYNC is a more appropriate error message for these than RmA_CONFLICT
* Print a warning error message if a target is not in an exposure epoch and an update is received. This results in the app continuing with that call having never happened, rather than evil hangs. refs trac:325 This commit was SVN r11514. The following Trac tickets were found above: Ticket 325 --> https://svn.open-mpi.org/trac/ompi/ticket/325
Этот коммит содержится в:
родитель
a4378a6643
Коммит
e0555889a9
@ -12,6 +12,7 @@ enable_pty_support=no
|
|||||||
enable_mem_debug=no
|
enable_mem_debug=no
|
||||||
enable_mem_profile=no
|
enable_mem_profile=no
|
||||||
enable_debug_symbols=no
|
enable_debug_symbols=no
|
||||||
|
enable_binaries=no
|
||||||
|
|
||||||
ompi_cv_f77_sizeof_LOGICAL=${ompi_cv_f77_sizeof_LOGICAL=4}
|
ompi_cv_f77_sizeof_LOGICAL=${ompi_cv_f77_sizeof_LOGICAL=4}
|
||||||
ompi_cv_f77_alignment_LOGICAL=${ompi_cv_f77_alignment_LOGICAL=4}
|
ompi_cv_f77_alignment_LOGICAL=${ompi_cv_f77_alignment_LOGICAL=4}
|
||||||
|
@ -410,6 +410,12 @@ ompi_osc_pt2pt_component_fragment_cb(ompi_osc_pt2pt_module_t *module,
|
|||||||
|
|
||||||
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
||||||
|
|
||||||
|
if (!ompi_win_exposure_epoch(module->p2p_win)) {
|
||||||
|
opal_output(0, "Invalid MPI_PUT on Window %s. Window not in exposure epoch",
|
||||||
|
module->p2p_win->w_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ompi_osc_pt2pt_sendreq_recv_put(module, header, payload);
|
ret = ompi_osc_pt2pt_sendreq_recv_put(module, header, payload);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -431,6 +437,12 @@ ompi_osc_pt2pt_component_fragment_cb(ompi_osc_pt2pt_module_t *module,
|
|||||||
|
|
||||||
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
||||||
|
|
||||||
|
if (!ompi_win_exposure_epoch(module->p2p_win)) {
|
||||||
|
opal_output(0, "Invalid MPI_ACCUMULATE on Window %s. Window not in exposure epoch",
|
||||||
|
module->p2p_win->w_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* receive into temporary buffer */
|
/* receive into temporary buffer */
|
||||||
ret = ompi_osc_pt2pt_sendreq_recv_accum(module, header, payload);
|
ret = ompi_osc_pt2pt_sendreq_recv_accum(module, header, payload);
|
||||||
}
|
}
|
||||||
@ -456,6 +468,12 @@ ompi_osc_pt2pt_component_fragment_cb(ompi_osc_pt2pt_module_t *module,
|
|||||||
|
|
||||||
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
||||||
|
|
||||||
|
if (!ompi_win_exposure_epoch(module->p2p_win)) {
|
||||||
|
opal_output(0, "Invalid MPI_GET on Window %s. Window not in exposure epoch",
|
||||||
|
module->p2p_win->w_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* create or get a pointer to our datatype */
|
/* create or get a pointer to our datatype */
|
||||||
proc = module->p2p_comm->c_pml_procs[header->hdr_origin]->proc_ompi;
|
proc = module->p2p_comm->c_pml_procs[header->hdr_origin]->proc_ompi;
|
||||||
datatype = ompi_osc_pt2pt_datatype_create(proc, &payload);
|
datatype = ompi_osc_pt2pt_datatype_create(proc, &payload);
|
||||||
|
@ -429,6 +429,12 @@ ompi_osc_rdma_component_fragment_cb(struct mca_btl_base_module_t *btl,
|
|||||||
module = ompi_osc_rdma_windx_to_module(header->hdr_windx);
|
module = ompi_osc_rdma_windx_to_module(header->hdr_windx);
|
||||||
if (NULL == module) return;
|
if (NULL == module) return;
|
||||||
|
|
||||||
|
if (!ompi_win_exposure_epoch(module->p2p_win)) {
|
||||||
|
opal_output(0, "Invalid MPI_PUT on Window %s. Window not in exposure epoch",
|
||||||
|
module->p2p_win->w_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ompi_osc_rdma_sendreq_recv_put(module, header, payload);
|
ret = ompi_osc_rdma_sendreq_recv_put(module, header, payload);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -452,6 +458,12 @@ ompi_osc_rdma_component_fragment_cb(struct mca_btl_base_module_t *btl,
|
|||||||
module = ompi_osc_rdma_windx_to_module(header->hdr_windx);
|
module = ompi_osc_rdma_windx_to_module(header->hdr_windx);
|
||||||
if (NULL == module) return;
|
if (NULL == module) return;
|
||||||
|
|
||||||
|
if (!ompi_win_exposure_epoch(module->p2p_win)) {
|
||||||
|
opal_output(0, "Invalid MPI_ACCUMULATE on Window %s. Window not in exposure epoch",
|
||||||
|
module->p2p_win->w_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* receive into temporary buffer */
|
/* receive into temporary buffer */
|
||||||
ret = ompi_osc_rdma_sendreq_recv_accum(module, header, payload);
|
ret = ompi_osc_rdma_sendreq_recv_accum(module, header, payload);
|
||||||
}
|
}
|
||||||
@ -479,6 +491,12 @@ ompi_osc_rdma_component_fragment_cb(struct mca_btl_base_module_t *btl,
|
|||||||
module = ompi_osc_rdma_windx_to_module(header->hdr_windx);
|
module = ompi_osc_rdma_windx_to_module(header->hdr_windx);
|
||||||
if (NULL == module) return;
|
if (NULL == module) return;
|
||||||
|
|
||||||
|
if (!ompi_win_exposure_epoch(module->p2p_win)) {
|
||||||
|
opal_output(0, "Invalid MPI_GET on Window %s. Window not in exposure epoch",
|
||||||
|
module->p2p_win->w_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* create or get a pointer to our datatype */
|
/* create or get a pointer to our datatype */
|
||||||
proc = module->p2p_comm->c_pml_procs[header->hdr_origin]->proc_ompi;
|
proc = module->p2p_comm->c_pml_procs[header->hdr_origin]->proc_ompi;
|
||||||
datatype = ompi_osc_rdma_datatype_create(proc, &payload);
|
datatype = ompi_osc_rdma_datatype_create(proc, &payload);
|
||||||
|
@ -58,7 +58,7 @@ int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_data
|
|||||||
} else if (MPI_OP_NULL == op) {
|
} else if (MPI_OP_NULL == op) {
|
||||||
rc = MPI_ERR_OP;
|
rc = MPI_ERR_OP;
|
||||||
} else if (!ompi_win_comm_allowed(win)) {
|
} else if (!ompi_win_comm_allowed(win)) {
|
||||||
rc = MPI_ERR_RMA_CONFLICT;
|
rc = MPI_ERR_RMA_SYNC;
|
||||||
} else {
|
} else {
|
||||||
OMPI_CHECK_DATATYPE_FOR_SEND(rc, origin_datatype, origin_count);
|
OMPI_CHECK_DATATYPE_FOR_SEND(rc, origin_datatype, origin_count);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ int MPI_Get(void *origin_addr, int origin_count,
|
|||||||
(MPI_PROC_NULL != target_rank)) {
|
(MPI_PROC_NULL != target_rank)) {
|
||||||
rc = MPI_ERR_RANK;
|
rc = MPI_ERR_RANK;
|
||||||
} else if (!ompi_win_comm_allowed(win)) {
|
} else if (!ompi_win_comm_allowed(win)) {
|
||||||
rc = MPI_ERR_RMA_CONFLICT;
|
rc = MPI_ERR_RMA_SYNC;
|
||||||
} else {
|
} else {
|
||||||
OMPI_CHECK_DATATYPE_FOR_SEND(rc, origin_datatype, origin_count);
|
OMPI_CHECK_DATATYPE_FOR_SEND(rc, origin_datatype, origin_count);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ int MPI_Put(void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
|
|||||||
(MPI_PROC_NULL != target_rank)) {
|
(MPI_PROC_NULL != target_rank)) {
|
||||||
rc = MPI_ERR_RANK;
|
rc = MPI_ERR_RANK;
|
||||||
} else if (!ompi_win_comm_allowed(win)) {
|
} else if (!ompi_win_comm_allowed(win)) {
|
||||||
rc = MPI_ERR_RMA_CONFLICT;
|
rc = MPI_ERR_RMA_SYNC;
|
||||||
} else {
|
} else {
|
||||||
OMPI_CHECK_DATATYPE_FOR_SEND(rc, origin_datatype, origin_count);
|
OMPI_CHECK_DATATYPE_FOR_SEND(rc, origin_datatype, origin_count);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ int MPI_Win_complete(MPI_Win win)
|
|||||||
if (ompi_win_invalid(win)) {
|
if (ompi_win_invalid(win)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_WIN, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_WIN, FUNC_NAME);
|
||||||
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_STARTED)) {
|
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_STARTED)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ int MPI_Win_fence(int assert, MPI_Win win)
|
|||||||
} else if (0 != (ompi_win_get_mode(win) &
|
} else if (0 != (ompi_win_get_mode(win) &
|
||||||
(OMPI_WIN_POSTED | OMPI_WIN_STARTED))) {
|
(OMPI_WIN_POSTED | OMPI_WIN_STARTED))) {
|
||||||
/* If we're in a post or start, we can't be in a fence */
|
/* If we're in a post or start, we can't be in a fence */
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ int MPI_Win_free(MPI_Win *win)
|
|||||||
} else if ((OMPI_WIN_ACCESS_EPOCH|OMPI_WIN_EXPOSE_EPOCH) &
|
} else if ((OMPI_WIN_ACCESS_EPOCH|OMPI_WIN_EXPOSE_EPOCH) &
|
||||||
ompi_win_get_mode(*win)) {
|
ompi_win_get_mode(*win)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(*win,
|
return OMPI_ERRHANDLER_INVOKE(*win,
|
||||||
MPI_ERR_RMA_CONFLICT,
|
MPI_ERR_RMA_SYNC,
|
||||||
FUNC_NAME);
|
FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win)
|
|||||||
} else if (0 != (assert & ~(MPI_MODE_NOCHECK))) {
|
} else if (0 != (assert & ~(MPI_MODE_NOCHECK))) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
||||||
} else if (0 != (ompi_win_get_mode(win) & OMPI_WIN_ACCESS_EPOCH)) {
|
} else if (0 != (ompi_win_get_mode(win) & OMPI_WIN_ACCESS_EPOCH)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
} else if (! ompi_win_allow_locks(win)) {
|
} else if (! ompi_win_allow_locks(win)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win)
|
|||||||
MPI_MODE_NOPUT))) {
|
MPI_MODE_NOPUT))) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
||||||
} else if (0 != (ompi_win_get_mode(win) & OMPI_WIN_EXPOSE_EPOCH)) {
|
} else if (0 != (ompi_win_get_mode(win) & OMPI_WIN_EXPOSE_EPOCH)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ int MPI_Win_start(MPI_Group group, int assert, MPI_Win win)
|
|||||||
} else if (0 != (assert & ~(MPI_MODE_NOCHECK))) {
|
} else if (0 != (assert & ~(MPI_MODE_NOCHECK))) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME);
|
||||||
} else if (0 != (ompi_win_get_mode(win) & OMPI_WIN_ACCESS_EPOCH)) {
|
} else if (0 != (ompi_win_get_mode(win) & OMPI_WIN_ACCESS_EPOCH)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ int MPI_Win_test(MPI_Win win, int *flag)
|
|||||||
if (ompi_win_invalid(win)) {
|
if (ompi_win_invalid(win)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_WIN, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_WIN, FUNC_NAME);
|
||||||
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_POSTED)) {
|
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_POSTED)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ int MPI_Win_unlock(int rank, MPI_Win win)
|
|||||||
} else if (ompi_win_peer_invalid(win, rank)) {
|
} else if (ompi_win_peer_invalid(win, rank)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RANK, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RANK, FUNC_NAME);
|
||||||
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_LOCK_ACCESS)) {
|
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_LOCK_ACCESS)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ int MPI_Win_wait(MPI_Win win)
|
|||||||
if (ompi_win_invalid(win)) {
|
if (ompi_win_invalid(win)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_WIN, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_WIN, FUNC_NAME);
|
||||||
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_POSTED)) {
|
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_POSTED)) {
|
||||||
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_CONFLICT, FUNC_NAME);
|
return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RMA_SYNC, FUNC_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +164,12 @@ static inline bool ompi_win_access_epoch(ompi_win_t *win) {
|
|||||||
return (OMPI_WIN_ACCESS_EPOCH & mode);
|
return (OMPI_WIN_ACCESS_EPOCH & mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* already in an exposure epoch */
|
||||||
|
static inline bool ompi_win_exposure_epoch(ompi_win_t *win) {
|
||||||
|
int16_t mode = ompi_win_get_mode(win);
|
||||||
|
return (OMPI_WIN_EXPOSE_EPOCH & mode);
|
||||||
|
}
|
||||||
|
|
||||||
/* we're either already in an access epoch or can easily start one
|
/* we're either already in an access epoch or can easily start one
|
||||||
(stupid fence rule). Either way, it's ok to be the origin of a
|
(stupid fence rule). Either way, it's ok to be the origin of a
|
||||||
communication call. */
|
communication call. */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user