1
1
removed debug output

This commit was SVN r2566.
Этот коммит содержится в:
Tim Woodall 2004-09-09 19:21:34 +00:00
родитель 3b3693b029
Коммит 92ae84828f
7 изменённых файлов: 73 добавлений и 71 удалений

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

@ -267,14 +267,16 @@ static void mca_oob_tcp_recv_handler(int sd, short flags, void* user)
/* recv the process identifier */
while((rc = recv(sd, guid, sizeof(guid), 0)) != sizeof(guid)) {
if(rc >= 0) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_recv_handler: peer closed connection",
OMPI_NAME_COMPONENTS(mca_oob_name_self));
if(mca_oob_tcp_component.tcp_debug > 3) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_recv_handler: peer closed connection",
OMPI_NAME_ARGS(mca_oob_name_self));
}
close(sd);
return;
}
if(errno != EINTR) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_recv_handler: recv() failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self), errno);
OMPI_NAME_ARGS(mca_oob_name_self), errno);
close(sd);
return;
}
@ -285,12 +287,12 @@ static void mca_oob_tcp_recv_handler(int sd, short flags, void* user)
/* now set socket up to be non-blocking */
if((flags = fcntl(sd, F_GETFL, 0)) < 0) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_recv_handler: fcntl(F_GETFL) failed with errno=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self), errno);
OMPI_NAME_ARGS(mca_oob_name_self), errno);
} else {
flags |= O_NONBLOCK;
if(fcntl(sd, F_SETFL, flags) < 0) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_recv_handler: fcntl(F_SETFL) failed with errno=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self), errno);
OMPI_NAME_ARGS(mca_oob_name_self), errno);
}
}
@ -307,7 +309,7 @@ static void mca_oob_tcp_recv_handler(int sd, short flags, void* user)
peer = mca_oob_tcp_peer_lookup(guid);
if(NULL == peer) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_recv_handler: unable to locate peer",
OMPI_NAME_COMPONENTS(mca_oob_name_self));
OMPI_NAME_ARGS(mca_oob_name_self));
close(sd);
return;
}
@ -315,9 +317,9 @@ static void mca_oob_tcp_recv_handler(int sd, short flags, void* user)
if(mca_oob_tcp_peer_accept(peer, sd) == false) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_recv_handler: "
"rejected connection from [%d,%d,%d] connection state %d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_COMPONENTS(guid[0]),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
OMPI_NAME_ARGS(guid[0]),
peer->peer_state);
close(sd);
return;
@ -379,7 +381,7 @@ static void mca_oob_tcp_registry_callback(
ompi_list_item_t* item;
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_registry_callback\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self));
OMPI_NAME_ARGS(mca_oob_name_self));
}
/* process the callback */
@ -399,15 +401,15 @@ static void mca_oob_tcp_registry_callback(
ompi_buffer_free(buffer);
if(NULL == addr) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_registry_callback: unable to unpack peer address\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self));
OMPI_NAME_ARGS(mca_oob_name_self));
OBJ_RELEASE(item);
continue;
}
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_registry_callback: received peer [%d,%d,%d]\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(addr->addr_name));
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(addr->addr_name));
}
/* check for existing cache entry */
@ -524,7 +526,7 @@ int mca_oob_tcp_init(void)
sprintf(segment, "oob-tcp-%u", mca_oob_name_self.jobid);
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_init: calling ompi_registry.synchro(%s,%d)\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_ARGS(mca_oob_name_self),
segment,
npeers);
}
@ -554,7 +556,7 @@ int mca_oob_tcp_init(void)
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_init: calling ompi_registry.put(%s,%s)\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_ARGS(mca_oob_name_self),
segment,
keys[0]);
}
@ -566,7 +568,7 @@ int mca_oob_tcp_init(void)
ompi_buffer_free(buffer);
if(rc != OMPI_SUCCESS) {
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_init: registry put failed with error code %d.",
OMPI_NAME_COMPONENTS(mca_oob_name_self), rc);
OMPI_NAME_ARGS(mca_oob_name_self), rc);
return rc;
}
return OMPI_SUCCESS;

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

@ -26,7 +26,7 @@ extern "C" {
#endif
#define OMPI_NAME_COMPONENTS(n) (n).cellid,(n).jobid,(n).vpid
#define OMPI_NAME_ARGS(n) (n).cellid,(n).jobid,(n).vpid
/*

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

@ -161,8 +161,8 @@ bool mca_oob_tcp_msg_send_handler(mca_oob_tcp_msg_t* msg, struct mca_oob_tcp_pee
return false;
else {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_msg_send_handler: writev failed with errno=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
return false;
@ -207,8 +207,8 @@ bool mca_oob_tcp_msg_recv_handler(mca_oob_tcp_msg_t* msg, struct mca_oob_tcp_pee
msg->msg_rwbuf = malloc(msg->msg_hdr.msg_size);
if(NULL == msg->msg_rwbuf) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_msg_recv_handler: malloc(%d) failed\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
msg->msg_hdr.msg_size);
mca_oob_tcp_peer_close(peer);
return false;
@ -251,8 +251,8 @@ static bool mca_oob_tcp_msg_recv(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee
return false;
else {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_msg_recv: readv failed with errno=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
return false;
@ -260,8 +260,8 @@ static bool mca_oob_tcp_msg_recv(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee
} else if (rc == 0) {
if(mca_oob_tcp_component.tcp_debug > 3) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_msg_recv: peer closed connection",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
}
mca_oob_tcp_peer_close(peer);
@ -303,7 +303,7 @@ void mca_oob_tcp_msg_recv_complete(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* p
break;
default:
ompi_output(0, "[%d,%d,%d] mca_oob_tcp_msg_recv_complete: invalid message type: %d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self), msg->msg_hdr.msg_type);
OMPI_NAME_ARGS(mca_oob_name_self), msg->msg_hdr.msg_type);
MCA_OOB_TCP_MSG_RETURN(msg);
break;
}

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

@ -228,8 +228,8 @@ static int mca_oob_tcp_peer_start_connect(mca_oob_tcp_peer_t* peer)
struct timeval tv = { 1,0 };
ompi_output(0,
"[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_start_connect: socket() failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
ompi_evtimer_add(&peer->peer_timer_event, &tv);
@ -242,31 +242,31 @@ static int mca_oob_tcp_peer_start_connect(mca_oob_tcp_peer_t* peer)
/* setup the socket as non-blocking */
if((flags = fcntl(peer->peer_sd, F_GETFL, 0)) < 0) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_connect: fcntl(F_GETFL) failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
} else {
flags |= O_NONBLOCK;
if(fcntl(peer->peer_sd, F_SETFL, flags) < 0)
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_connect: fcntl(F_SETFL) failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
}
/* pick an address in round-robin fashion from the list exported by the peer */
if((rc = mca_oob_tcp_addr_get_next(peer->peer_addr, &inaddr)) != OMPI_SUCCESS) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_start_connect: mca_oob_tcp_addr_get_next failed with error=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
rc);
return rc;
}
if(mca_oob_tcp_component.tcp_debug > 2) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_start_connect: connecting to: %s:%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
inet_ntoa(inaddr.sin_addr),
ntohs(inaddr.sin_port));
}
@ -279,8 +279,8 @@ static int mca_oob_tcp_peer_start_connect(mca_oob_tcp_peer_t* peer)
return OMPI_SUCCESS;
}
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_start_connect: connect failed with errno=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
return OMPI_ERR_UNREACH;
@ -294,8 +294,8 @@ static int mca_oob_tcp_peer_start_connect(mca_oob_tcp_peer_t* peer)
ompi_output(0,
"[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_start_connect: "
"mca_oob_tcp_peer_send_connect_ack failed with errno=%d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
rc);
mca_oob_tcp_peer_close(peer);
}
@ -319,8 +319,8 @@ static void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t* peer)
/* check connect completion status */
if(getsockopt(peer->peer_sd, SOL_SOCKET, SO_ERROR, &so_error, &so_length) < 0) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_complete_connect: getsockopt() failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
return;
@ -332,8 +332,8 @@ static void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t* peer)
struct timeval tv = { 1,0 };
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_complete_connect: "
"connection refused - retrying\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name));
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name));
mca_oob_tcp_peer_close(peer);
if(peer->peer_retries > mca_oob_tcp_component.tcp_peer_retries) {
return;
@ -342,8 +342,8 @@ static void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t* peer)
return;
} else if(so_error != 0) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_complete_connect: connect() failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
so_error);
mca_oob_tcp_peer_close(peer);
return;
@ -354,8 +354,8 @@ static void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t* peer)
ompi_event_add(&peer->peer_recv_event, 0);
} else {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_complete_connect: unable to send connect ack.",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name));
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name));
mca_oob_tcp_peer_close(peer);
}
}
@ -386,8 +386,8 @@ void mca_oob_tcp_peer_close(mca_oob_tcp_peer_t* peer)
{
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d] closing peer [%d,%d,%d] sd %d state %d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
peer->peer_sd,
peer->peer_state);
}
@ -453,9 +453,9 @@ static int mca_oob_tcp_peer_recv_connect_ack(mca_oob_tcp_peer_t* peer)
if(memcmp(&peer->peer_name, &guid[0], sizeof(ompi_process_name_t)) != 0) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_connect: "
"received unexpected process identifier [%d,%d,%d]\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_COMPONENTS(guid[0]));
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
OMPI_NAME_ARGS(guid[0]));
mca_oob_tcp_peer_close(peer);
return OMPI_ERR_UNREACH;
}
@ -489,8 +489,8 @@ static int mca_oob_tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, void* data,
if(mca_oob_tcp_component.tcp_debug > 3) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_recv_blocking: "
"peer closed connection: peer state %d",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
peer->peer_state);
}
mca_oob_tcp_peer_close(peer);
@ -501,8 +501,8 @@ static int mca_oob_tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, void* data,
if(retval < 0) {
if(errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_recv_blocking: recv() failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
return -1;
@ -527,8 +527,8 @@ static int mca_oob_tcp_peer_send_blocking(mca_oob_tcp_peer_t* peer, void* data,
if(retval < 0) {
if(errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_send_blocking: send() failed with errno=%d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
errno);
mca_oob_tcp_peer_close(peer);
return -1;
@ -592,8 +592,8 @@ static void mca_oob_tcp_peer_recv_handler(int sd, short flags, void* user)
MCA_OOB_TCP_MSG_ALLOC(msg, rc);
if(NULL == msg) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_recv_handler: unable to allocate recv message\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name));
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name));
return;
}
msg->msg_type = MCA_OOB_TCP_UNEXPECTED;
@ -670,8 +670,8 @@ static void mca_oob_tcp_peer_send_handler(int sd, short flags, void* user)
}
default:
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_peer_send_handler: invalid connection state (%d)",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
peer->peer_state);
ompi_event_del(&peer->peer_send_event);
break;
@ -728,8 +728,8 @@ static void mca_oob_tcp_peer_dump(mca_oob_tcp_peer_t* peer, const char* msg)
#endif
sprintf(buff, "[%d,%d,%d]-[%d,%d,%d] %s: %s - %s nodelay %d sndbuf %d rcvbuf %d flags %08x\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
msg, src, dst, nodelay, sndbuf, rcvbuf, flags);
ompi_output(0, buff);
}

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

@ -23,8 +23,8 @@ int mca_oob_tcp_ping(
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_ping: timout %d secs %d usecs\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
timeout->tv_sec, timeout->tv_usec);
}
if(NULL == peer)

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

@ -28,8 +28,8 @@ int mca_oob_tcp_recv(
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_recv: tag %d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(*peer),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(*peer),
tag);
}

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

@ -27,8 +27,8 @@ int mca_oob_tcp_send(
if(mca_oob_tcp_component.tcp_debug > 1) {
ompi_output(0, "[%d,%d,%d]-[%d,%d,%d] mca_oob_tcp_send: tag %d\n",
OMPI_NAME_COMPONENTS(mca_oob_name_self),
OMPI_NAME_COMPONENTS(peer->peer_name),
OMPI_NAME_ARGS(mca_oob_name_self),
OMPI_NAME_ARGS(peer->peer_name),
tag);
}
if(NULL == peer)