1
1

* fix a race condition where a sendreq could be reused if it was originally

for a Get request and the reply came in before the local completion
  callback was fired from the btl.
* Silence some more debugging output for the moment

This commit was SVN r9130.
Этот коммит содержится в:
Brian Barrett 2006-02-23 06:02:10 +00:00
родитель 57b9c22adf
Коммит c544584387
2 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -1,4 +1,3 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
@ -97,7 +96,14 @@ ompi_osc_pt2pt_sendreq_send_cb(struct mca_btl_base_module_t* btl,
return;
}
if (OMPI_OSC_PT2PT_GET != sendreq->req_type) {
/* have to look at header, and not the sendreq because in the case
of get, it's possible that the sendreq has been freed already
(if the remote side replies before we get our send completion
callback) and already allocated to another request. We don't
wait for this completion before exiting a synchronization point
in the case of get, as we really don't care when it completes -
only when the data arrives. */
if (OMPI_OSC_PT2PT_HDR_GET != header->hdr_base.hdr_type) {
/* do we need to post a send? */
if (header->hdr_msg_length != 0) {
/* sendreq is done. Mark it as so and get out of here */
@ -726,7 +732,7 @@ ompi_osc_pt2pt_replyreq_recv(ompi_osc_pt2pt_module_t *module,
/**********************************************************************
*
* Recveive a get on the origin side
* Control message communication
*
**********************************************************************/
static void

Просмотреть файл

@ -504,7 +504,7 @@ ompi_osc_pt2pt_passive_lock(ompi_osc_pt2pt_module_t *module,
module->p2p_lock_status = MPI_LOCK_EXCLUSIVE;
send_ack = true;
} else {
opal_output(0, "%d queuing lock request from %d (%d)",
opal_output(-1, "%d queuing lock request from %d (%d)",
module->p2p_comm->c_my_rank, origin, lock_type);
new_pending = OBJ_NEW(ompi_osc_pt2pt_pending_lock_t);
new_pending->proc = proc;
@ -517,7 +517,7 @@ ompi_osc_pt2pt_passive_lock(ompi_osc_pt2pt_module_t *module,
module->p2p_shared_count++;
send_ack = true;
} else {
opal_output(0, "queuing lock request from %d (%d)",
opal_output(-1, "queuing lock request from %d (%d)",
module->p2p_comm->c_my_rank, origin, lock_type);
new_pending = OBJ_NEW(ompi_osc_pt2pt_pending_lock_t);
new_pending->proc = proc;
@ -530,7 +530,7 @@ ompi_osc_pt2pt_passive_lock(ompi_osc_pt2pt_module_t *module,
OPAL_THREAD_UNLOCK(&(module->p2p_lock));
if (send_ack) {
opal_output(0, "%d sending lock ack to %d",
opal_output(-1, "%d sending lock ack to %d",
module->p2p_comm->c_my_rank, origin);
ompi_osc_pt2pt_control_send(module, proc,
OMPI_OSC_PT2PT_HDR_LOCK_REQ,
@ -573,7 +573,7 @@ ompi_osc_pt2pt_passive_unlock(ompi_osc_pt2pt_module_t *module,
OPAL_THREAD_UNLOCK(&(module->p2p_lock));
if (NULL != new_pending) {
opal_output(0, "sending lock request to proc");
opal_output(-1, "sending lock request to proc");
/* set lock state and generate a lock request */
module->p2p_lock_status = new_pending->lock_type;
ompi_osc_pt2pt_control_send(module,