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_avail_components;
extern int ompi_osc_base_output;
#if defined(c_plusplus) || defined(__cplusplus)
}

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

@ -50,7 +50,8 @@ ompi_osc_base_close(void)
opal_list_get_end(&ompi_osc_base_open_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_avail_components);

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

@ -35,7 +35,7 @@
opal_list_t ompi_osc_base_open_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;
/* setup the output stream */
ompi_mtl_base_output = opal_output_open(NULL);
/* initialize the base code */
OBJ_CONSTRUCT(&ompi_osc_base_open_components, opal_list_t);
OBJ_CONSTRUCT(&ompi_osc_base_avail_components, opal_list_t);
/* Open up all available components */
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,
&ompi_osc_base_open_components, true))) {
return ret;

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

@ -30,6 +30,7 @@
#include "ompi/info/info.h"
#include "ompi/communicator/communicator.h"
#include "ompi/mca/osc/osc.h"
#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/datatype/dt_arch.h"
@ -193,7 +194,8 @@ ompi_osc_pt2pt_component_finalize(void)
if (0 !=
(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);
}
@ -581,9 +583,8 @@ ompi_osc_pt2pt_component_fragment_cb(ompi_osc_pt2pt_module_t *module,
break;
default:
/* BWB - FIX ME - this sucks */
opal_output(0, "received packet for Window with unknown type");
abort();
opal_output_verbose(5, ompi_osc_base_output,
"received packet for Window with unknown type");
}
}

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

@ -28,6 +28,7 @@
#include "ompi/mca/pml/pml.h"
#include "ompi/datatype/datatype.h"
#include "ompi/datatype/dt_arch.h"
#include "ompi/mca/osc/base/base.h"
static inline int32_t
@ -66,7 +67,8 @@ ompi_osc_pt2pt_sendreq_send_long_cb(ompi_osc_pt2pt_longreq_t *longreq)
ompi_osc_pt2pt_sendreq_t *sendreq =
(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,
"%d completed long sendreq to %d",
sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
@ -112,7 +114,8 @@ 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_cbdata = sendreq;
opal_output(-1, "%d starting long sendreq to %d (%d)",
opal_output_verbose(50, ompi_osc_base_output,
"%d starting long sendreq to %d (%d)",
sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank,
header->hdr_origin_tag);
@ -262,7 +265,8 @@ ompi_osc_pt2pt_sendreq_send(ompi_osc_pt2pt_module_t *module,
#endif
/* send fragment */
opal_output(-1, "%d sending sendreq to %d",
opal_output_verbose(50, ompi_osc_base_output,
"%d sending sendreq to %d",
sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
@ -579,7 +583,8 @@ ompi_osc_pt2pt_sendreq_recv_accum_long_cb(ompi_osc_pt2pt_longreq_t *longreq)
/* unlock the window for accumulates */
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,
"%d finished receiving long accum message from %d",
longreq->req_module->p2p_comm->c_my_rank,
header->hdr_origin);
@ -624,7 +629,8 @@ ompi_osc_pt2pt_sendreq_recv_accum(ompi_osc_pt2pt_module_t *module,
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,
"%d received accum message from %d",
module->p2p_comm->c_my_rank,
header->hdr_origin);
@ -663,7 +669,8 @@ ompi_osc_pt2pt_sendreq_recv_accum(ompi_osc_pt2pt_module_t *module,
module->p2p_comm,
&(longreq->req_pml_req));
opal_output(-1, "%d started long recv accum message from %d (%d)",
opal_output_verbose(50, ompi_osc_base_output,
"%d started long recv accum message from %d (%d)",
module->p2p_comm->c_my_rank,
header->hdr_origin,
header->hdr_origin_tag);

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

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

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

@ -29,6 +29,7 @@
#include "ompi/info/info.h"
#include "ompi/communicator/communicator.h"
#include "ompi/mca/osc/osc.h"
#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/btl/btl.h"
#include "ompi/mca/bml/bml.h"
#include "ompi/mca/bml/base/base.h"
@ -202,7 +203,8 @@ ompi_osc_rdma_component_finalize(void)
if (0 !=
(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);
}
@ -345,7 +347,8 @@ ompi_osc_rdma_component_select(ompi_win_t *win,
} else if (0 == strcmp(sync_string, "alltoall")) {
module->p2p_fence_sync_type = OSC_SYNC_ALLTOALL;
} 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;
}
@ -613,7 +616,7 @@ ompi_osc_rdma_component_fragment_cb(struct mca_btl_base_module_t *btl,
default:
/* BWB - FIX ME - this sucks */
opal_output(0, "received packet for Window with unknown type");
abort();
opal_output(ompi_osc_base_output,
"received packet for Window with unknown type");
}
}

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

@ -27,6 +27,7 @@
#include "ompi/mca/bml/bml.h"
#include "ompi/mca/bml/base/base.h"
#include "ompi/mca/btl/btl.h"
#include "ompi/mca/osc/base/base.h"
#include "ompi/datatype/datatype.h"
#include "ompi/datatype/dt_arch.h"
@ -66,7 +67,8 @@ ompi_osc_rdma_sendreq_send_long_cb(ompi_osc_rdma_longreq_t *longreq)
ompi_osc_rdma_sendreq_t *sendreq =
(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,
"%d completed long sendreq to %d",
sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
@ -122,7 +124,8 @@ 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_cbdata = sendreq;
opal_output(-1, "%d starting long sendreq to %d (%d)",
opal_output_verbose(50, ompi_osc_base_output,
"%d starting long sendreq to %d (%d)",
sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank,
header->hdr_origin_tag);
@ -278,7 +281,8 @@ ompi_osc_rdma_sendreq_send(ompi_osc_rdma_module_t *module,
#endif
/* send fragment */
opal_output(-1, "%d sending sendreq to %d",
opal_output_verbose(50, ompi_osc_base_output,
"%d sending sendreq to %d",
sendreq->req_module->p2p_comm->c_my_rank,
sendreq->req_target_rank);
@ -587,7 +591,8 @@ ompi_osc_rdma_sendreq_recv_accum_long_cb(ompi_osc_rdma_longreq_t *longreq)
/* unlock the window for accumulates */
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,
"%d finished receiving long accum message from %d",
longreq->req_module->p2p_comm->c_my_rank,
header->hdr_origin);
@ -632,7 +637,8 @@ ompi_osc_rdma_sendreq_recv_accum(ompi_osc_rdma_module_t *module,
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,
"%d received accum message from %d",
module->p2p_comm->c_my_rank,
header->hdr_origin);
@ -671,7 +677,8 @@ ompi_osc_rdma_sendreq_recv_accum(ompi_osc_rdma_module_t *module,
module->p2p_comm,
&(longreq->req_pml_req));
opal_output(-1, "%d started long recv accum message from %d (%d)",
opal_output_verbose(50, ompi_osc_base_output,
"%d started long recv accum message from %d (%d)",
module->p2p_comm->c_my_rank,
header->hdr_origin,
header->hdr_origin_tag);

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

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