Send reply from the passive side of an unlock request back to the active
side and only let MPI_WIN_UNLOCK return when the passive side has actively replied that the window is unlocked. Refs trac:761 This commit was SVN r13118. The following Trac tickets were found above: Ticket 761 --> https://svn.open-mpi.org/trac/ompi/ticket/761
Этот коммит содержится в:
родитель
ba8c8ce92c
Коммит
f03ffb3a62
@ -689,7 +689,22 @@ ompi_osc_pt2pt_component_fragment_cb(struct ompi_osc_pt2pt_buffer_t *pt2pt_buffe
|
||||
header->hdr_value[1]);
|
||||
}
|
||||
break;
|
||||
case OMPI_OSC_PT2PT_HDR_UNLOCK_REPLY:
|
||||
{
|
||||
ompi_osc_pt2pt_control_header_t *header =
|
||||
(ompi_osc_pt2pt_control_header_t*)
|
||||
buffer;
|
||||
|
||||
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT
|
||||
if (header->hdr_base.hdr_flags & OMPI_OSC_PT2PT_HDR_FLAG_NBO) {
|
||||
OMPI_OSC_PT2PT_CONTROL_HDR_NTOH(*header);
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(module == ompi_osc_pt2pt_windx_to_module(header->hdr_windx));
|
||||
OPAL_THREAD_ADD32(&(module->p2p_num_pending_out), -1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
opal_output_verbose(5, ompi_osc_base_output,
|
||||
"received packet for Window with unknown type");
|
||||
|
@ -25,12 +25,13 @@
|
||||
|
||||
#define OMPI_OSC_PT2PT_HDR_PUT 0x0001
|
||||
#define OMPI_OSC_PT2PT_HDR_ACC 0x0002
|
||||
#define OMPI_OSC_PT2PT_HDR_GET 0x0004
|
||||
#define OMPI_OSC_PT2PT_HDR_REPLY 0x0008
|
||||
#define OMPI_OSC_PT2PT_HDR_POST 0x0010
|
||||
#define OMPI_OSC_PT2PT_HDR_COMPLETE 0x0020
|
||||
#define OMPI_OSC_PT2PT_HDR_LOCK_REQ 0x0040
|
||||
#define OMPI_OSC_PT2PT_HDR_UNLOCK_REQ 0x0080
|
||||
#define OMPI_OSC_PT2PT_HDR_GET 0x0003
|
||||
#define OMPI_OSC_PT2PT_HDR_REPLY 0x0004
|
||||
#define OMPI_OSC_PT2PT_HDR_POST 0x0005
|
||||
#define OMPI_OSC_PT2PT_HDR_COMPLETE 0x0006
|
||||
#define OMPI_OSC_PT2PT_HDR_LOCK_REQ 0x0007
|
||||
#define OMPI_OSC_PT2PT_HDR_UNLOCK_REQ 0x0008
|
||||
#define OMPI_OSC_PT2PT_HDR_UNLOCK_REPLY 0x0009
|
||||
|
||||
#define OMPI_OSC_PT2PT_HDR_FLAG_NBO 0x0001
|
||||
|
||||
|
@ -497,6 +497,12 @@ ompi_osc_pt2pt_module_unlock(int target,
|
||||
P2P_MODULE(win)->p2p_comm->c_my_rank,
|
||||
out_count);
|
||||
|
||||
/* wait for ack */
|
||||
OPAL_THREAD_ADD32(&(P2P_MODULE(win)->p2p_num_pending_out), 1);
|
||||
while (0 != P2P_MODULE(win)->p2p_num_pending_out) {
|
||||
ompi_osc_pt2pt_progress_long(P2P_MODULE(win));
|
||||
}
|
||||
|
||||
/* set our mode on the window */
|
||||
ompi_win_remove_mode(win, OMPI_WIN_ACCESS_EPOCH | OMPI_WIN_LOCK_ACCESS);
|
||||
|
||||
@ -569,6 +575,7 @@ ompi_osc_pt2pt_passive_unlock(ompi_osc_pt2pt_module_t *module,
|
||||
int32_t count)
|
||||
{
|
||||
ompi_osc_pt2pt_pending_lock_t *new_pending = NULL;
|
||||
ompi_proc_t *proc = ompi_comm_peer_lookup( module->p2p_comm, origin );
|
||||
|
||||
assert(module->p2p_lock_status != 0);
|
||||
|
||||
@ -590,6 +597,10 @@ ompi_osc_pt2pt_passive_unlock(ompi_osc_pt2pt_module_t *module,
|
||||
}
|
||||
}
|
||||
|
||||
ompi_osc_pt2pt_control_send(module, proc,
|
||||
OMPI_OSC_PT2PT_HDR_UNLOCK_REPLY,
|
||||
OMPI_SUCCESS, OMPI_SUCCESS);
|
||||
|
||||
/* if we were really unlocked, see if we have more to process */
|
||||
new_pending = (ompi_osc_pt2pt_pending_lock_t*)
|
||||
opal_list_remove_first(&(module->p2p_locks_pending));
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user