1
1

* use the osc base debugging stream for all output, and do the whole

verbose MCA param thing instead of changing -1 to 0 and back in the
  output stream param.

This commit was SVN r11245.
Этот коммит содержится в:
Brian Barrett 2006-08-17 14:52:20 +00:00
родитель 517d6fda49
Коммит df84dbad00
9 изменённых файлов: 135 добавлений и 91 удалений

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

@ -49,6 +49,7 @@ OMPI_DECLSPEC int ompi_osc_base_close(void);
extern opal_list_t ompi_osc_base_open_components; extern opal_list_t ompi_osc_base_open_components;
extern opal_list_t ompi_osc_base_avail_components; extern opal_list_t ompi_osc_base_avail_components;
extern int ompi_osc_base_output;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -50,7 +50,8 @@ ompi_osc_base_close(void)
opal_list_get_end(&ompi_osc_base_open_components), opal_list_get_end(&ompi_osc_base_open_components),
&ompi_osc_base_avail_components); &ompi_osc_base_avail_components);
mca_base_components_close(0, &ompi_osc_base_open_components, NULL); mca_base_components_close(ompi_osc_base_output,
&ompi_osc_base_open_components, NULL);
OBJ_DESTRUCT(&ompi_osc_base_open_components); OBJ_DESTRUCT(&ompi_osc_base_open_components);
OBJ_DESTRUCT(&ompi_osc_base_avail_components); OBJ_DESTRUCT(&ompi_osc_base_avail_components);

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

@ -35,7 +35,7 @@
opal_list_t ompi_osc_base_open_components; opal_list_t ompi_osc_base_open_components;
opal_list_t ompi_osc_base_avail_components; opal_list_t ompi_osc_base_avail_components;
int ompi_osc_base_output = 0;
/** /**
@ -47,13 +47,16 @@ ompi_osc_base_open(void)
{ {
int ret; int ret;
/* setup the output stream */
ompi_mtl_base_output = opal_output_open(NULL);
/* initialize the base code */ /* initialize the base code */
OBJ_CONSTRUCT(&ompi_osc_base_open_components, opal_list_t); OBJ_CONSTRUCT(&ompi_osc_base_open_components, opal_list_t);
OBJ_CONSTRUCT(&ompi_osc_base_avail_components, opal_list_t); OBJ_CONSTRUCT(&ompi_osc_base_avail_components, opal_list_t);
/* Open up all available components */ /* Open up all available components */
if (OMPI_SUCCESS != if (OMPI_SUCCESS !=
(ret = mca_base_components_open("osc", 0, (ret = mca_base_components_open("osc", ompi_osc_base_output,
mca_osc_base_static_components, mca_osc_base_static_components,
&ompi_osc_base_open_components, true))) { &ompi_osc_base_open_components, true))) {
return ret; return ret;

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

@ -30,6 +30,7 @@
#include "ompi/info/info.h" #include "ompi/info/info.h"
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/mca/osc/osc.h" #include "ompi/mca/osc/osc.h"
#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/pml/pml.h" #include "ompi/mca/pml/pml.h"
#include "ompi/datatype/dt_arch.h" #include "ompi/datatype/dt_arch.h"
@ -193,7 +194,8 @@ ompi_osc_pt2pt_component_finalize(void)
if (0 != if (0 !=
(num_modules = opal_hash_table_get_size(&mca_osc_pt2pt_component.p2p_c_modules))) { (num_modules = opal_hash_table_get_size(&mca_osc_pt2pt_component.p2p_c_modules))) {
opal_output(0, "WARNING: There were %d Windows created but not freed.",- num_modules); opal_output(ompi_osc_base_output,
"WARNING: There were %d Windows created but not freed.",- num_modules);
opal_progress_unregister(ompi_osc_pt2pt_progress); opal_progress_unregister(ompi_osc_pt2pt_progress);
} }
@ -581,9 +583,8 @@ ompi_osc_pt2pt_component_fragment_cb(ompi_osc_pt2pt_module_t *module,
break; break;
default: default:
/* BWB - FIX ME - this sucks */ opal_output_verbose(5, ompi_osc_base_output,
opal_output(0, "received packet for Window with unknown type"); "received packet for Window with unknown type");
abort();
} }
} }

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

@ -28,6 +28,7 @@
#include "ompi/mca/pml/pml.h" #include "ompi/mca/pml/pml.h"
#include "ompi/datatype/datatype.h" #include "ompi/datatype/datatype.h"
#include "ompi/datatype/dt_arch.h" #include "ompi/datatype/dt_arch.h"
#include "ompi/mca/osc/base/base.h"
static inline int32_t static inline int32_t
@ -66,9 +67,10 @@ ompi_osc_pt2pt_sendreq_send_long_cb(ompi_osc_pt2pt_longreq_t *longreq)
ompi_osc_pt2pt_sendreq_t *sendreq = ompi_osc_pt2pt_sendreq_t *sendreq =
(ompi_osc_pt2pt_sendreq_t*) longreq->req_comp_cbdata; (ompi_osc_pt2pt_sendreq_t*) longreq->req_comp_cbdata;
opal_output(-1, "%d completed long sendreq to %d", opal_output_verbose(50, ompi_osc_base_output,
sendreq->req_module->p2p_comm->c_my_rank, "%d completed long sendreq to %d",
sendreq->req_target_rank); sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
opal_list_remove_item(&(sendreq->req_module->p2p_long_msgs), opal_list_remove_item(&(sendreq->req_module->p2p_long_msgs),
&(longreq->super.super)); &(longreq->super.super));
@ -112,10 +114,11 @@ ompi_osc_pt2pt_sendreq_send_cb(ompi_osc_pt2pt_buffer_t *buffer)
longreq->req_comp_cb = ompi_osc_pt2pt_sendreq_send_long_cb; longreq->req_comp_cb = ompi_osc_pt2pt_sendreq_send_long_cb;
longreq->req_comp_cbdata = sendreq; longreq->req_comp_cbdata = sendreq;
opal_output(-1, "%d starting long sendreq to %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
sendreq->req_module->p2p_comm->c_my_rank, "%d starting long sendreq to %d (%d)",
sendreq->req_target_rank, sendreq->req_module->p2p_comm->c_my_rank,
header->hdr_origin_tag); sendreq->req_target_rank,
header->hdr_origin_tag);
mca_pml.pml_isend(sendreq->req_origin_convertor.pBaseBuf, mca_pml.pml_isend(sendreq->req_origin_convertor.pBaseBuf,
sendreq->req_origin_convertor.count, sendreq->req_origin_convertor.count,
@ -262,9 +265,10 @@ ompi_osc_pt2pt_sendreq_send(ompi_osc_pt2pt_module_t *module,
#endif #endif
/* send fragment */ /* send fragment */
opal_output(-1, "%d sending sendreq to %d", opal_output_verbose(50, ompi_osc_base_output,
sendreq->req_module->p2p_comm->c_my_rank, "%d sending sendreq to %d",
sendreq->req_target_rank); sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
ret = MCA_PML_CALL(isend(buffer->payload, ret = MCA_PML_CALL(isend(buffer->payload,
buffer->len, buffer->len,
@ -579,9 +583,10 @@ ompi_osc_pt2pt_sendreq_recv_accum_long_cb(ompi_osc_pt2pt_longreq_t *longreq)
/* unlock the window for accumulates */ /* unlock the window for accumulates */
OPAL_THREAD_UNLOCK(&longreq->req_module->p2p_acc_lock); OPAL_THREAD_UNLOCK(&longreq->req_module->p2p_acc_lock);
opal_output(-1, "%d finished receiving long accum message from %d", opal_output_verbose(50, ompi_osc_base_output,
longreq->req_module->p2p_comm->c_my_rank, "%d finished receiving long accum message from %d",
header->hdr_origin); longreq->req_module->p2p_comm->c_my_rank,
header->hdr_origin);
/* free the temp buffer */ /* free the temp buffer */
free(longreq->req_comp_cbdata); free(longreq->req_comp_cbdata);
@ -624,9 +629,10 @@ ompi_osc_pt2pt_sendreq_recv_accum(ompi_osc_pt2pt_module_t *module,
OPAL_THREAD_ADD32(&(module->p2p_num_pending_in), -1); OPAL_THREAD_ADD32(&(module->p2p_num_pending_in), -1);
opal_output(-1, "%d received accum message from %d", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, "%d received accum message from %d",
header->hdr_origin); module->p2p_comm->c_my_rank,
header->hdr_origin);
} else { } else {
ompi_osc_pt2pt_longreq_t *longreq; ompi_osc_pt2pt_longreq_t *longreq;
@ -663,10 +669,11 @@ ompi_osc_pt2pt_sendreq_recv_accum(ompi_osc_pt2pt_module_t *module,
module->p2p_comm, module->p2p_comm,
&(longreq->req_pml_req)); &(longreq->req_pml_req));
opal_output(-1, "%d started long recv accum message from %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, "%d started long recv accum message from %d (%d)",
header->hdr_origin, module->p2p_comm->c_my_rank,
header->hdr_origin_tag); header->hdr_origin,
header->hdr_origin_tag);
/* put the send request in the waiting list */ /* put the send request in the waiting list */
OPAL_THREAD_LOCK(&(module->p2p_lock)); OPAL_THREAD_LOCK(&(module->p2p_lock));

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

@ -26,7 +26,7 @@
#include "opal/runtime/opal_progress.h" #include "opal/runtime/opal_progress.h"
#include "opal/threads/mutex.h" #include "opal/threads/mutex.h"
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/mca/osc/base/base.h"
/* should have p2p_lock before calling */ /* should have p2p_lock before calling */
static inline void static inline void
@ -143,9 +143,10 @@ ompi_osc_pt2pt_module_fence(int assert, ompi_win_t *win)
OPAL_THREAD_ADD32(&(P2P_MODULE(win)->p2p_num_pending_out), OPAL_THREAD_ADD32(&(P2P_MODULE(win)->p2p_num_pending_out),
opal_list_get_size(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs))); opal_list_get_size(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs)));
opal_output(-1, "fence: waiting on %d in and %d out", opal_output_verbose(50, ompi_osc_base_output,
P2P_MODULE(win)->p2p_num_pending_in, "fence: waiting on %d in and %d out",
P2P_MODULE(win)->p2p_num_pending_out); P2P_MODULE(win)->p2p_num_pending_in,
P2P_MODULE(win)->p2p_num_pending_out);
/* try to start all the requests. We've copied everything we /* try to start all the requests. We've copied everything we
need out of pending_sendreqs, so don't need the lock need out of pending_sendreqs, so don't need the lock
@ -158,8 +159,9 @@ ompi_osc_pt2pt_module_fence(int assert, ompi_win_t *win)
ret = ompi_osc_pt2pt_sendreq_send(P2P_MODULE(win), req); ret = ompi_osc_pt2pt_sendreq_send(P2P_MODULE(win), req);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
opal_output(0, "fence: failure in starting sendreq (%d). Will try later.", opal_output_verbose(5, ompi_osc_base_output,
ret); "fence: failure in starting sendreq (%d). Will try later.",
ret);
opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item); opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item);
} }
} }
@ -269,8 +271,9 @@ ompi_osc_pt2pt_module_complete(ompi_win_t *win)
ret = ompi_osc_pt2pt_sendreq_send(P2P_MODULE(win), req); ret = ompi_osc_pt2pt_sendreq_send(P2P_MODULE(win), req);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
opal_output(0, "complete: failure in starting sendreq (%d). Will try later.", opal_output_verbose(5, ompi_osc_base_output,
ret); "complete: failure in starting sendreq (%d). Will try later.",
ret);
opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item); opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item);
} }
} }
@ -414,8 +417,9 @@ ompi_osc_pt2pt_module_lock(int lock_type,
/* set our mode on the window */ /* set our mode on the window */
ompi_win_set_mode(win, OMPI_WIN_ACCESS_EPOCH | OMPI_WIN_LOCK_ACCESS); ompi_win_set_mode(win, OMPI_WIN_ACCESS_EPOCH | OMPI_WIN_LOCK_ACCESS);
opal_output(-1, "%d sending lock request to %d", opal_output_verbose(50, ompi_osc_base_output,
P2P_MODULE(win)->p2p_comm->c_my_rank, target); "%d sending lock request to %d",
P2P_MODULE(win)->p2p_comm->c_my_rank, target);
/* generate a lock request */ /* generate a lock request */
ompi_osc_pt2pt_control_send(P2P_MODULE(win), ompi_osc_pt2pt_control_send(P2P_MODULE(win),
proc, proc,
@ -459,8 +463,9 @@ ompi_osc_pt2pt_module_unlock(int target,
ret = ompi_osc_pt2pt_sendreq_send(P2P_MODULE(win), req); ret = ompi_osc_pt2pt_sendreq_send(P2P_MODULE(win), req);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
opal_output(0, "unlock: failure in starting sendreq (%d). Will try later.", opal_output_verbose(5, ompi_osc_base_output,
ret); "unlock: failure in starting sendreq (%d). Will try later.",
ret);
opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item); opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item);
} }
} }
@ -471,8 +476,9 @@ ompi_osc_pt2pt_module_unlock(int target,
} }
/* send the unlock request */ /* send the unlock request */
opal_output(-1, "%d sending unlock request to %d", opal_output_verbose(50, ompi_osc_base_output,
P2P_MODULE(win)->p2p_comm->c_my_rank, target); "%d sending unlock request to %d",
P2P_MODULE(win)->p2p_comm->c_my_rank, target);
ompi_osc_pt2pt_control_send(P2P_MODULE(win), ompi_osc_pt2pt_control_send(P2P_MODULE(win),
proc, proc,
OMPI_OSC_PT2PT_HDR_UNLOCK_REQ, OMPI_OSC_PT2PT_HDR_UNLOCK_REQ,
@ -502,8 +508,9 @@ ompi_osc_pt2pt_passive_lock(ompi_osc_pt2pt_module_t *module,
module->p2p_lock_status = MPI_LOCK_EXCLUSIVE; module->p2p_lock_status = MPI_LOCK_EXCLUSIVE;
send_ack = true; send_ack = true;
} else { } else {
opal_output(-1, "%d queuing lock request from %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, origin, lock_type); "%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 = OBJ_NEW(ompi_osc_pt2pt_pending_lock_t);
new_pending->proc = proc; new_pending->proc = proc;
new_pending->lock_type = lock_type; new_pending->lock_type = lock_type;
@ -515,8 +522,9 @@ ompi_osc_pt2pt_passive_lock(ompi_osc_pt2pt_module_t *module,
module->p2p_shared_count++; module->p2p_shared_count++;
send_ack = true; send_ack = true;
} else { } else {
opal_output(-1, "queuing lock request from %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, origin, lock_type); "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 = OBJ_NEW(ompi_osc_pt2pt_pending_lock_t);
new_pending->proc = proc; new_pending->proc = proc;
new_pending->lock_type = lock_type; new_pending->lock_type = lock_type;
@ -528,8 +536,9 @@ ompi_osc_pt2pt_passive_lock(ompi_osc_pt2pt_module_t *module,
OPAL_THREAD_UNLOCK(&(module->p2p_lock)); OPAL_THREAD_UNLOCK(&(module->p2p_lock));
if (send_ack) { if (send_ack) {
opal_output(-1, "%d sending lock ack to %d", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, origin); "%d sending lock ack to %d",
module->p2p_comm->c_my_rank, origin);
ompi_osc_pt2pt_control_send(module, proc, ompi_osc_pt2pt_control_send(module, proc,
OMPI_OSC_PT2PT_HDR_LOCK_REQ, OMPI_OSC_PT2PT_HDR_LOCK_REQ,
module->p2p_comm->c_my_rank, module->p2p_comm->c_my_rank,
@ -571,7 +580,8 @@ ompi_osc_pt2pt_passive_unlock(ompi_osc_pt2pt_module_t *module,
OPAL_THREAD_UNLOCK(&(module->p2p_lock)); OPAL_THREAD_UNLOCK(&(module->p2p_lock));
if (NULL != new_pending) { if (NULL != new_pending) {
opal_output(-1, "sending lock request to proc"); opal_output_verbose(50, ompi_osc_base_output,
"sending lock request to proc");
/* set lock state and generate a lock request */ /* set lock state and generate a lock request */
module->p2p_lock_status = new_pending->lock_type; module->p2p_lock_status = new_pending->lock_type;
ompi_osc_pt2pt_control_send(module, ompi_osc_pt2pt_control_send(module,

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

@ -29,6 +29,7 @@
#include "ompi/info/info.h" #include "ompi/info/info.h"
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/mca/osc/osc.h" #include "ompi/mca/osc/osc.h"
#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/btl/btl.h" #include "ompi/mca/btl/btl.h"
#include "ompi/mca/bml/bml.h" #include "ompi/mca/bml/bml.h"
#include "ompi/mca/bml/base/base.h" #include "ompi/mca/bml/base/base.h"
@ -202,7 +203,8 @@ ompi_osc_rdma_component_finalize(void)
if (0 != if (0 !=
(num_modules = opal_hash_table_get_size(&mca_osc_rdma_component.p2p_c_modules))) { (num_modules = opal_hash_table_get_size(&mca_osc_rdma_component.p2p_c_modules))) {
opal_output(0, "WARNING: There were %d Windows created but not freed.", opal_output(ompi_osc_base_output,
"WARNING: There were %d Windows created but not freed.",
num_modules); num_modules);
} }
@ -345,7 +347,8 @@ ompi_osc_rdma_component_select(ompi_win_t *win,
} else if (0 == strcmp(sync_string, "alltoall")) { } else if (0 == strcmp(sync_string, "alltoall")) {
module->p2p_fence_sync_type = OSC_SYNC_ALLTOALL; module->p2p_fence_sync_type = OSC_SYNC_ALLTOALL;
} else { } else {
opal_output(0, "invalid value for fence_sync_method parameter: %s\n", sync_string); opal_output(ompi_osc_base_output,
"invalid value for fence_sync_method parameter: %s\n", sync_string);
return OMPI_ERROR; return OMPI_ERROR;
} }
@ -613,7 +616,7 @@ ompi_osc_rdma_component_fragment_cb(struct mca_btl_base_module_t *btl,
default: default:
/* BWB - FIX ME - this sucks */ /* BWB - FIX ME - this sucks */
opal_output(0, "received packet for Window with unknown type"); opal_output(ompi_osc_base_output,
abort(); "received packet for Window with unknown type");
} }
} }

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

@ -27,6 +27,7 @@
#include "ompi/mca/bml/bml.h" #include "ompi/mca/bml/bml.h"
#include "ompi/mca/bml/base/base.h" #include "ompi/mca/bml/base/base.h"
#include "ompi/mca/btl/btl.h" #include "ompi/mca/btl/btl.h"
#include "ompi/mca/osc/base/base.h"
#include "ompi/datatype/datatype.h" #include "ompi/datatype/datatype.h"
#include "ompi/datatype/dt_arch.h" #include "ompi/datatype/dt_arch.h"
@ -66,9 +67,10 @@ ompi_osc_rdma_sendreq_send_long_cb(ompi_osc_rdma_longreq_t *longreq)
ompi_osc_rdma_sendreq_t *sendreq = ompi_osc_rdma_sendreq_t *sendreq =
(ompi_osc_rdma_sendreq_t*) longreq->req_comp_cbdata; (ompi_osc_rdma_sendreq_t*) longreq->req_comp_cbdata;
opal_output(-1, "%d completed long sendreq to %d", opal_output_verbose(50, ompi_osc_base_output,
sendreq->req_module->p2p_comm->c_my_rank, "%d completed long sendreq to %d",
sendreq->req_target_rank); sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
opal_list_remove_item(&(sendreq->req_module->p2p_long_msgs), opal_list_remove_item(&(sendreq->req_module->p2p_long_msgs),
&(longreq->super.super)); &(longreq->super.super));
@ -122,10 +124,11 @@ ompi_osc_rdma_sendreq_send_cb(struct mca_btl_base_module_t* btl,
longreq->req_comp_cb = ompi_osc_rdma_sendreq_send_long_cb; longreq->req_comp_cb = ompi_osc_rdma_sendreq_send_long_cb;
longreq->req_comp_cbdata = sendreq; longreq->req_comp_cbdata = sendreq;
opal_output(-1, "%d starting long sendreq to %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
sendreq->req_module->p2p_comm->c_my_rank, "%d starting long sendreq to %d (%d)",
sendreq->req_target_rank, sendreq->req_module->p2p_comm->c_my_rank,
header->hdr_origin_tag); sendreq->req_target_rank,
header->hdr_origin_tag);
mca_pml.pml_isend(sendreq->req_origin_convertor.pBaseBuf, mca_pml.pml_isend(sendreq->req_origin_convertor.pBaseBuf,
sendreq->req_origin_convertor.count, sendreq->req_origin_convertor.count,
@ -278,9 +281,10 @@ ompi_osc_rdma_sendreq_send(ompi_osc_rdma_module_t *module,
#endif #endif
/* send fragment */ /* send fragment */
opal_output(-1, "%d sending sendreq to %d", opal_output_verbose(50, ompi_osc_base_output,
sendreq->req_module->p2p_comm->c_my_rank, "%d sending sendreq to %d",
sendreq->req_target_rank); sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
ret = mca_bml_base_send(bml_btl, descriptor, MCA_BTL_TAG_OSC_RDMA); ret = mca_bml_base_send(bml_btl, descriptor, MCA_BTL_TAG_OSC_RDMA);
goto done; goto done;
@ -587,9 +591,10 @@ ompi_osc_rdma_sendreq_recv_accum_long_cb(ompi_osc_rdma_longreq_t *longreq)
/* unlock the window for accumulates */ /* unlock the window for accumulates */
OPAL_THREAD_UNLOCK(&longreq->req_module->p2p_acc_lock); OPAL_THREAD_UNLOCK(&longreq->req_module->p2p_acc_lock);
opal_output(-1, "%d finished receiving long accum message from %d", opal_output_verbose(50, ompi_osc_base_output,
longreq->req_module->p2p_comm->c_my_rank, "%d finished receiving long accum message from %d",
header->hdr_origin); longreq->req_module->p2p_comm->c_my_rank,
header->hdr_origin);
/* free the temp buffer */ /* free the temp buffer */
free(longreq->req_comp_cbdata); free(longreq->req_comp_cbdata);
@ -632,9 +637,10 @@ ompi_osc_rdma_sendreq_recv_accum(ompi_osc_rdma_module_t *module,
OPAL_THREAD_ADD32(&(module->p2p_num_pending_in), -1); OPAL_THREAD_ADD32(&(module->p2p_num_pending_in), -1);
opal_output(-1, "%d received accum message from %d", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, "%d received accum message from %d",
header->hdr_origin); module->p2p_comm->c_my_rank,
header->hdr_origin);
} else { } else {
ompi_osc_rdma_longreq_t *longreq; ompi_osc_rdma_longreq_t *longreq;
@ -671,10 +677,11 @@ ompi_osc_rdma_sendreq_recv_accum(ompi_osc_rdma_module_t *module,
module->p2p_comm, module->p2p_comm,
&(longreq->req_pml_req)); &(longreq->req_pml_req));
opal_output(-1, "%d started long recv accum message from %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, "%d started long recv accum message from %d (%d)",
header->hdr_origin, module->p2p_comm->c_my_rank,
header->hdr_origin_tag); header->hdr_origin,
header->hdr_origin_tag);
/* put the send request in the waiting list */ /* put the send request in the waiting list */
OPAL_THREAD_LOCK(&(module->p2p_lock)); OPAL_THREAD_LOCK(&(module->p2p_lock));

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

@ -26,6 +26,7 @@
#include "opal/runtime/opal_progress.h" #include "opal/runtime/opal_progress.h"
#include "opal/threads/mutex.h" #include "opal/threads/mutex.h"
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/mca/osc/base/base.h"
/* should have p2p_lock before calling */ /* should have p2p_lock before calling */
@ -177,9 +178,10 @@ ompi_osc_rdma_module_fence(int assert, ompi_win_t *win)
OPAL_THREAD_ADD32(&(P2P_MODULE(win)->p2p_num_pending_out), OPAL_THREAD_ADD32(&(P2P_MODULE(win)->p2p_num_pending_out),
opal_list_get_size(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs))); opal_list_get_size(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs)));
opal_output(-1, "fence: waiting on %d in and %d out", opal_output_verbose(50, ompi_osc_base_output,
P2P_MODULE(win)->p2p_num_pending_in, "fence: waiting on %d in and %d out",
P2P_MODULE(win)->p2p_num_pending_out); P2P_MODULE(win)->p2p_num_pending_in,
P2P_MODULE(win)->p2p_num_pending_out);
/* try to start all the requests. We've copied everything we /* try to start all the requests. We've copied everything we
need out of pending_sendreqs, so don't need the lock need out of pending_sendreqs, so don't need the lock
@ -192,7 +194,8 @@ ompi_osc_rdma_module_fence(int assert, ompi_win_t *win)
ret = ompi_osc_rdma_sendreq_send(P2P_MODULE(win), req); ret = ompi_osc_rdma_sendreq_send(P2P_MODULE(win), req);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
opal_output(0, "fence: failure in starting sendreq (%d). Will try later.", opal_output_verbose(5, ompi_osc_base_output,
"fence: failure in starting sendreq (%d). Will try later.",
ret); ret);
opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item); opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item);
} }
@ -303,8 +306,9 @@ ompi_osc_rdma_module_complete(ompi_win_t *win)
ret = ompi_osc_rdma_sendreq_send(P2P_MODULE(win), req); ret = ompi_osc_rdma_sendreq_send(P2P_MODULE(win), req);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
opal_output(0, "complete: failure in starting sendreq (%d). Will try later.", opal_output_verbose(5, ompi_osc_base_output,
ret); "complete: failure in starting sendreq (%d). Will try later.",
ret);
opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item); opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item);
} }
} }
@ -448,8 +452,9 @@ ompi_osc_rdma_module_lock(int lock_type,
/* set our mode on the window */ /* set our mode on the window */
ompi_win_set_mode(win, OMPI_WIN_ACCESS_EPOCH | OMPI_WIN_LOCK_ACCESS); ompi_win_set_mode(win, OMPI_WIN_ACCESS_EPOCH | OMPI_WIN_LOCK_ACCESS);
opal_output(-1, "%d sending lock request to %d", opal_output_verbose(50, ompi_osc_base_output,
P2P_MODULE(win)->p2p_comm->c_my_rank, target); "%d sending lock request to %d",
P2P_MODULE(win)->p2p_comm->c_my_rank, target);
/* generate a lock request */ /* generate a lock request */
ompi_osc_rdma_control_send(P2P_MODULE(win), ompi_osc_rdma_control_send(P2P_MODULE(win),
proc, proc,
@ -493,8 +498,9 @@ ompi_osc_rdma_module_unlock(int target,
ret = ompi_osc_rdma_sendreq_send(P2P_MODULE(win), req); ret = ompi_osc_rdma_sendreq_send(P2P_MODULE(win), req);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
opal_output(0, "unlock: failure in starting sendreq (%d). Will try later.", opal_output_verbose(5, ompi_osc_base_output,
ret); "unlock: failure in starting sendreq (%d). Will try later.",
ret);
opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item); opal_list_append(&(P2P_MODULE(win)->p2p_copy_pending_sendreqs), item);
} }
} }
@ -505,8 +511,9 @@ ompi_osc_rdma_module_unlock(int target,
} }
/* send the unlock request */ /* send the unlock request */
opal_output(-1, "%d sending unlock request to %d", opal_output_verbose(50, ompi_osc_base_output,
P2P_MODULE(win)->p2p_comm->c_my_rank, target); "%d sending unlock request to %d",
P2P_MODULE(win)->p2p_comm->c_my_rank, target);
ompi_osc_rdma_control_send(P2P_MODULE(win), ompi_osc_rdma_control_send(P2P_MODULE(win),
proc, proc,
OMPI_OSC_RDMA_HDR_UNLOCK_REQ, OMPI_OSC_RDMA_HDR_UNLOCK_REQ,
@ -536,8 +543,9 @@ ompi_osc_rdma_passive_lock(ompi_osc_rdma_module_t *module,
module->p2p_lock_status = MPI_LOCK_EXCLUSIVE; module->p2p_lock_status = MPI_LOCK_EXCLUSIVE;
send_ack = true; send_ack = true;
} else { } else {
opal_output(-1, "%d queuing lock request from %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, origin, lock_type); "%d queuing lock request from %d (%d)",
module->p2p_comm->c_my_rank, origin, lock_type);
new_pending = OBJ_NEW(ompi_osc_rdma_pending_lock_t); new_pending = OBJ_NEW(ompi_osc_rdma_pending_lock_t);
new_pending->proc = proc; new_pending->proc = proc;
new_pending->lock_type = lock_type; new_pending->lock_type = lock_type;
@ -549,8 +557,9 @@ ompi_osc_rdma_passive_lock(ompi_osc_rdma_module_t *module,
module->p2p_shared_count++; module->p2p_shared_count++;
send_ack = true; send_ack = true;
} else { } else {
opal_output(-1, "queuing lock request from %d (%d)", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, origin, lock_type); "queuing lock request from %d (%d)",
module->p2p_comm->c_my_rank, origin, lock_type);
new_pending = OBJ_NEW(ompi_osc_rdma_pending_lock_t); new_pending = OBJ_NEW(ompi_osc_rdma_pending_lock_t);
new_pending->proc = proc; new_pending->proc = proc;
new_pending->lock_type = lock_type; new_pending->lock_type = lock_type;
@ -562,8 +571,9 @@ ompi_osc_rdma_passive_lock(ompi_osc_rdma_module_t *module,
OPAL_THREAD_UNLOCK(&(module->p2p_lock)); OPAL_THREAD_UNLOCK(&(module->p2p_lock));
if (send_ack) { if (send_ack) {
opal_output(-1, "%d sending lock ack to %d", opal_output_verbose(50, ompi_osc_base_output,
module->p2p_comm->c_my_rank, origin); "%d sending lock ack to %d",
module->p2p_comm->c_my_rank, origin);
ompi_osc_rdma_control_send(module, proc, ompi_osc_rdma_control_send(module, proc,
OMPI_OSC_RDMA_HDR_LOCK_REQ, OMPI_OSC_RDMA_HDR_LOCK_REQ,
module->p2p_comm->c_my_rank, module->p2p_comm->c_my_rank,
@ -605,7 +615,8 @@ ompi_osc_rdma_passive_unlock(ompi_osc_rdma_module_t *module,
OPAL_THREAD_UNLOCK(&(module->p2p_lock)); OPAL_THREAD_UNLOCK(&(module->p2p_lock));
if (NULL != new_pending) { if (NULL != new_pending) {
opal_output(-1, "sending lock request to proc"); opal_output_verbose(50, ompi_osc_base_output,
"sending lock request to proc");
/* set lock state and generate a lock request */ /* set lock state and generate a lock request */
module->p2p_lock_status = new_pending->lock_type; module->p2p_lock_status = new_pending->lock_type;
ompi_osc_rdma_control_send(module, ompi_osc_rdma_control_send(module,