1
1

Cleanup the qos code when --enable-timings is given

Этот коммит содержится в:
Ralph Castain 2015-05-06 20:24:27 -07:00
родитель 01a9bdf4cf
Коммит 9cb2fcfa5c
9 изменённых файлов: 122 добавлений и 109 удалений

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

@ -201,7 +201,7 @@ static get_ts_t _init_timestamping(opal_timer_type_t type)
} }
} }
opal_timing_event_t *opal_timing_event_alloc(opal_timing_t *t) static opal_timing_event_t *opal_timing_event_alloc(opal_timing_t *t)
{ {
if( t->buffer_offset >= t->buffer_size ){ if( t->buffer_offset >= t->buffer_size ){
// notch timings overhead // notch timings overhead

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

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -79,13 +79,13 @@ typedef struct orte_qos_ack_channel {
OBJ_CLASS_DECLARATION(orte_qos_ack_channel_t); OBJ_CLASS_DECLARATION(orte_qos_ack_channel_t);
extern orte_qos_module_t orte_qos_ack_module; extern orte_qos_module_t orte_qos_ack_module;
int orte_qos_ack_channel_get_msg_room (orte_qos_ack_channel_t * ack_chan, static inline int orte_qos_ack_channel_get_msg_room (orte_qos_ack_channel_t * ack_chan,
uint32_t seq_num) uint32_t seq_num)
{ {
return ack_chan->seq_num_to_room_num[(seq_num % QOS_ACK_MAX_OUTSTANDING_MSGS)]; return ack_chan->seq_num_to_room_num[(seq_num % QOS_ACK_MAX_OUTSTANDING_MSGS)];
} }
void orte_qos_ack_channel_set_msg_room (orte_qos_ack_channel_t * ack_chan, static inline void orte_qos_ack_channel_set_msg_room (orte_qos_ack_channel_t * ack_chan,
uint32_t seq_num, int room_num) uint32_t seq_num, int room_num)
{ {
ack_chan->seq_num_to_room_num[(seq_num % QOS_ACK_MAX_OUTSTANDING_MSGS)] = room_num; ack_chan->seq_num_to_room_num[(seq_num % QOS_ACK_MAX_OUTSTANDING_MSGS)] = room_num;

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

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -50,7 +50,6 @@ void orte_qos_ack_msg_send_callback ( int status,
void* cbdata); void* cbdata);
static inline int process_out_of_order_msg ( orte_qos_ack_channel_t *channel, static inline int process_out_of_order_msg ( orte_qos_ack_channel_t *channel,
orte_rml_recv_t *msg); orte_rml_recv_t *msg);
static int hack = 0;
/** /**
* ack module definition * ack module definition
*/ */
@ -143,7 +142,7 @@ static void* ack_create (opal_list_t *qos_attributes, uint32_t channel_num) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_create created channel = %p window = %d timeout =%d retry = %d", "%s ack_create created channel = %p window = %d timeout =%d retry = %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ack_chan, (void*)ack_chan,
ack_chan->window, ack_chan->window,
ack_chan->timeout_secs, ack_chan->timeout_secs,
ack_chan->retry)); ack_chan->retry));
@ -158,7 +157,7 @@ static void* ack_create (opal_list_t *qos_attributes, uint32_t channel_num) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_create created channel = %p window = %d timeout =%d retry = %d", "%s ack_create created channel = %p window = %d timeout =%d retry = %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ack_chan, (void*)ack_chan,
ack_chan->window, ack_chan->window,
ack_chan->timeout_secs, ack_chan->timeout_secs,
ack_chan->retry)); ack_chan->retry));
@ -194,7 +193,7 @@ static int ack_open (void *qos_channel, opal_buffer_t * buf) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_open channel = %p init hotel timeout =%d", "%s ack_open channel = %p init hotel timeout =%d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ack_chan, eviction_timeout)); (void*)ack_chan, eviction_timeout));
/* set the message window timer event, but don't activate it */ /* set the message window timer event, but don't activate it */
/*opal_event_set(opal_event_base, /*opal_event_set(opal_event_base,
&ack_chan->msg_window_timer_event, &ack_chan->msg_window_timer_event,
@ -217,7 +216,7 @@ static int ack_send ( void *qos_channel, orte_rml_send_t *msg) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_send msg = %p to peer = %s\n begining window at seq_num = %d", "%s ack_send msg = %p to peer = %s\n begining window at seq_num = %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, ORTE_NAME_PRINT(&msg->dst), ack_chan->out_msg_seq_num)); (void*)msg, ORTE_NAME_PRINT(&msg->dst), ack_chan->out_msg_seq_num));
ack_chan->state = orte_qos_ack_channel_state_filling_window; ack_chan->state = orte_qos_ack_channel_state_filling_window;
} }
else else
@ -238,14 +237,14 @@ static int ack_send ( void *qos_channel, orte_rml_send_t *msg) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_send msg = %p to peer = %s returned with error %d\n", "%s ack_send msg = %p to peer = %s returned with error %d\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, ORTE_NAME_PRINT(&msg->dst), (void*)msg, ORTE_NAME_PRINT(&msg->dst),
ORTE_ERR_QOS_ACK_WINDOW_FULL)); ORTE_ERR_QOS_ACK_WINDOW_FULL));
return ORTE_ERR_QOS_ACK_WINDOW_FULL; return ORTE_ERR_QOS_ACK_WINDOW_FULL;
} }
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_send msg = %p to peer = %s\n", "%s ack_send msg = %p to peer = %s\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, ORTE_NAME_PRINT(&msg->dst))); (void*)msg, ORTE_NAME_PRINT(&msg->dst)));
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
@ -410,7 +409,7 @@ static int ack_recv (void *qos_channel, orte_rml_recv_t *msg) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_recv msg = %p seq_num = %d from peer = %s\n", "%s ack_recv msg = %p seq_num = %d from peer = %s\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, msg->seq_num, (void*)msg, msg->seq_num,
ORTE_NAME_PRINT(&msg->sender))); ORTE_NAME_PRINT(&msg->sender)));
/** HACK - drop every third msg to stimulate lost msg */ /** HACK - drop every third msg to stimulate lost msg */
/* if ((msg->seq_num == 3) && (hack == 0)) { /* if ((msg->seq_num == 3) && (hack == 0)) {
@ -472,7 +471,7 @@ static int ack_init_recv (void *channel, opal_list_t *attributes) {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_open channel = %p init hotel timeout =%d", "%s ack_open channel = %p init hotel timeout =%d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ack_chan, eviction_timeout)); (void*)ack_chan, eviction_timeout));
opal_event_evtimer_set (orte_event_base, &ack_chan->msg_ack_timer_event, opal_event_evtimer_set (orte_event_base, &ack_chan->msg_ack_timer_event,
orte_qos_ack_msg_window_timeout_callback, (void *) ack_chan); orte_qos_ack_msg_window_timeout_callback, (void *) ack_chan);
return rc; return rc;
@ -491,7 +490,7 @@ static void ack_send_callback (orte_rml_send_t *msg)
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_send_callback for msg = %p seq num =%d\n", "%s ack_send_callback for msg = %p seq num =%d\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, msg->seq_num)); (void*)msg, msg->seq_num));
ack_chan = (orte_qos_ack_channel_t *) msg->channel->qos_channel_ptr; ack_chan = (orte_qos_ack_channel_t *) msg->channel->qos_channel_ptr;
/* if msg->status != SUCCESS - then evict all messages in the window and /* if msg->status != SUCCESS - then evict all messages in the window and
complete them?? */ complete them?? */
@ -503,7 +502,7 @@ static void ack_send_callback (orte_rml_send_t *msg)
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s ack_send_callback for msg = %p seq num =%d SEND FAILED status = %d\n", "%s ack_send_callback for msg = %p seq num =%d SEND FAILED status = %d\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, msg->seq_num, msg->status)); (void*)msg, msg->seq_num, msg->status));
/* evict message from hotel and send end of window to receiver?? */ /* evict message from hotel and send end of window to receiver?? */
} }
@ -519,7 +518,7 @@ void orte_qos_ack_msg_ack_timeout_callback (struct opal_hotel_t *hotel,
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s orte_qos_ack_msg_ack_timeout_callback for msg = %p seq num =%d\n", "%s orte_qos_ack_msg_ack_timeout_callback for msg = %p seq num =%d\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, msg->seq_num)); (void*)msg, msg->seq_num));
/* for now complete only the msg that timed out /* for now complete only the msg that timed out
TO DO : handle the completion of all messages in the window */ TO DO : handle the completion of all messages in the window */
msg->status = ORTE_ERR_ACK_TIMEOUT_SENDER; msg->status = ORTE_ERR_ACK_TIMEOUT_SENDER;
@ -532,16 +531,19 @@ void orte_qos_ack_msg_ack_timeout_callback (struct opal_hotel_t *hotel,
void orte_qos_ack_recv_msg_timeout_callback (struct opal_hotel_t *hotel, void orte_qos_ack_recv_msg_timeout_callback (struct opal_hotel_t *hotel,
int room_num, void *occupant) int room_num, void *occupant)
{ {
orte_rml_recv_t *msg; orte_rml_recv_t *msg = (orte_rml_recv_t *) occupant;
#if 0
orte_qos_ack_channel_t *ack_chan; orte_qos_ack_channel_t *ack_chan;
orte_rml_channel_t *channel; orte_rml_channel_t *channel;
msg = (orte_rml_recv_t *) occupant;
channel = orte_rml_base_get_channel(msg->channel_num); channel = orte_rml_base_get_channel(msg->channel_num);
ack_chan = (orte_qos_ack_channel_t*) channel->qos_channel_ptr; ack_chan = (orte_qos_ack_channel_t*) channel->qos_channel_ptr;
#endif
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s OOPS received msg = %p seq num =%d timed out on ACK Queue\n", "%s OOPS received msg = %p seq num =%d timed out on ACK Queue\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, msg->seq_num)); (void*)msg, msg->seq_num));
/* Need to determine correct action here as the sender hasn't responded yet to /* Need to determine correct action here as the sender hasn't responded yet to
a lost msg event */ a lost msg event */
/* This is highly unlikely - lets assert to enable debug*/ /* This is highly unlikely - lets assert to enable debug*/
@ -566,7 +568,6 @@ void orte_qos_ack_channel_process_ack (int status, orte_process_name_t* sender,
orte_qos_ack_channel_t *ack_chan; orte_qos_ack_channel_t *ack_chan;
uint32_t *seq_num_array; uint32_t *seq_num_array;
uint32_t ack_type; uint32_t ack_type;
uint32_t num_missed_msgs;
uint32_t missed_msg_seq_num = 0; uint32_t missed_msg_seq_num = 0;
num_values = 1; num_values = 1;
/* unpack channel number first */ /* unpack channel number first */
@ -622,7 +623,7 @@ void orte_qos_ack_channel_process_ack (int status, orte_process_name_t* sender,
ORTE_RML_SEND_COMPLETE(msg); ORTE_RML_SEND_COMPLETE(msg);
} else { } else {
if (NULL != occupant) { if (NULL != occupant) {
num_missed_msgs = (seq_num_array[i] - seq_num_array [i-1] - 1); // num_missed_msgs = (seq_num_array[i] - seq_num_array [i-1] - 1);
assert( i == num_msgs_acked -1); assert( i == num_msgs_acked -1);
/* recheck the ith msg */ /* recheck the ith msg */
opal_hotel_checkin(&ack_chan->outstanding_msgs, (void*)occupant, &room_num); opal_hotel_checkin(&ack_chan->outstanding_msgs, (void*)occupant, &room_num);
@ -671,13 +672,13 @@ void orte_qos_ack_msg_send_callback ( int status,
void orte_qos_ack_msg_window_timeout_callback (int fd, short flags, void *cbdata) void orte_qos_ack_msg_window_timeout_callback (int fd, short flags, void *cbdata)
{ {
int32_t rc; // int32_t rc;
orte_qos_ack_channel_t *ack_chan = (orte_qos_ack_channel_t*) cbdata; orte_qos_ack_channel_t *ack_chan = (orte_qos_ack_channel_t*) cbdata;
OPAL_OUTPUT_VERBOSE ((0, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE ((0, orte_qos_base_framework.framework_output,
" orte_qos_ack_msg_window_timeout_callback for channel = %p last acked seq num = %d, last received seq num =%d", " orte_qos_ack_msg_window_timeout_callback for channel = %p last acked seq num = %d, last received seq num =%d",
ack_chan, ack_chan->ack_msg_seq_num, ack_chan->in_msg_seq_num )); (void*)ack_chan, ack_chan->ack_msg_seq_num, ack_chan->in_msg_seq_num ));
/* send ack message */ /* send ack message */
rc = send_ack(ack_chan, ack_chan->channel_num, ACK_TIMEOUT, ack_chan->in_msg_seq_num); send_ack(ack_chan, ack_chan->channel_num, ACK_TIMEOUT, ack_chan->in_msg_seq_num);
} }

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

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -89,7 +89,7 @@ void* orte_qos_get_module (opal_list_t *qos_attributes)
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s qos_base_get_module returning qos module %p type =%d", "%s qos_base_get_module returning qos module %p type =%d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
&qos_comp->mod, type_val)); (void*)&qos_comp->mod, type_val));
return (void*)(&qos_comp->mod); return (void*)(&qos_comp->mod);
} else { } else {
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,

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

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -42,7 +42,7 @@ static int orte_qos_base_register(mca_base_register_flag_t flags)
#if OPAL_ENABLE_TIMING #if OPAL_ENABLE_TIMING
/* Detailed timing setup */ /* Detailed timing setup */
orte_qos_base.timing = false; orte_qos_base.timing = false;
(void) mca_base_var_rtegister ("orte", "qos", "base", "timing", (void) mca_base_var_register ("orte", "qos", "base", "timing",
"Enable QOS timings", "Enable QOS timings",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,

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

@ -87,8 +87,10 @@ static void qos_noop_shutdown (void) {
static void* noop_create (opal_list_t *qos_attributes, uint32_t channel_num) { static void* noop_create (opal_list_t *qos_attributes, uint32_t channel_num) {
orte_qos_base_channel_t * noop_chan; orte_qos_base_channel_t * noop_chan;
int32_t rc, *window, *type, window_val; int32_t rc, *window, window_val;
orte_qos_type_t type_val = orte_qos_noop; orte_qos_type_t type_val = orte_qos_noop;
orte_qos_type_t *type;
noop_chan = OBJ_NEW (orte_qos_base_channel_t); noop_chan = OBJ_NEW (orte_qos_base_channel_t);
noop_chan->channel_num = channel_num; noop_chan->channel_num = channel_num;
type = &type_val; type = &type_val;
@ -118,7 +120,8 @@ static void* noop_create (opal_list_t *qos_attributes, uint32_t channel_num) {
return noop_chan; return noop_chan;
} }
static int noop_open (void *qos_channel, opal_buffer_t * buf) { static int noop_open (void *qos_channel, opal_buffer_t * buf)
{
int32_t rc = ORTE_SUCCESS; int32_t rc = ORTE_SUCCESS;
orte_qos_base_channel_t *noop_chan; orte_qos_base_channel_t *noop_chan;
noop_chan = (orte_qos_base_channel_t*) (qos_channel); noop_chan = (orte_qos_base_channel_t*) (qos_channel);
@ -129,24 +132,27 @@ static int noop_open (void *qos_channel, opal_buffer_t * buf) {
return rc; return rc;
} }
static int noop_send ( void *qos_channel, orte_rml_send_t *msg) { static int noop_send ( void *qos_channel, orte_rml_send_t *msg)
{
//nothing to do //nothing to do
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s noop_send msg = %p to peer = %s\n", "%s noop_send msg = %p to peer = %s\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, ORTE_NAME_PRINT(&msg->dst))); (void*)msg, ORTE_NAME_PRINT(&msg->dst)));
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
static int noop_recv (void *qos_channel, orte_rml_recv_t *msg) { static int noop_recv (void *qos_channel, orte_rml_recv_t *msg)
{
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
"%s noop_recv msg = %p from peer = %s\n", "%s noop_recv msg = %p from peer = %s\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
msg, ORTE_NAME_PRINT(&msg->sender))); (void*)msg, ORTE_NAME_PRINT(&msg->sender)));
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
static int noop_close (void * channel) { static int noop_close (void * channel)
{
orte_qos_base_channel_t *noop_chan; orte_qos_base_channel_t *noop_chan;
if(NULL != channel) { if(NULL != channel) {
noop_chan = (orte_qos_base_channel_t*) channel; noop_chan = (orte_qos_base_channel_t*) channel;
@ -157,11 +163,13 @@ static int noop_close (void * channel) {
} }
static int noop_init_recv (void *channel, opal_list_t *attributes) { static int noop_init_recv (void *channel, opal_list_t *attributes)
{
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
static int noop_cmp (void *channel, opal_list_t *attributes) { static int noop_cmp (void *channel, opal_list_t *attributes)
{
int32_t chan_typea, chan_typeb, *ptr, window_sizea, window_sizeb; int32_t chan_typea, chan_typeb, *ptr, window_sizea, window_sizeb;
orte_qos_base_channel_t *noop_chan = (orte_qos_base_channel_t*) channel; orte_qos_base_channel_t *noop_chan = (orte_qos_base_channel_t*) channel;
ptr = &chan_typea; ptr = &chan_typea;
@ -183,7 +191,8 @@ static int noop_cmp (void *channel, opal_list_t *attributes) {
return ORTE_ERROR; return ORTE_ERROR;
} }
static void noop_send_callback (orte_rml_send_t *msg) { static void noop_send_callback (orte_rml_send_t *msg)
{
// nothing to do for noop // nothing to do for noop
ORTE_RML_SEND_COMPLETE(msg); ORTE_RML_SEND_COMPLETE(msg);
} }

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

@ -1,3 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/* /*
* *
* Copyright (c) 2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved.
@ -54,7 +55,7 @@ void orte_rml_base_close_channel(int fd, short flags, void *cbdata)
"%s rml_close_channel to peer %s", "%s rml_close_channel to peer %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(&req->post.close_channel.channel->peer))); ORTE_NAME_PRINT(&req->post.close_channel.channel->peer)));
OPAL_TIMING_EVENT((&tm_rml, "to %s", ORTE_NAME_PRINT(&peer))); OPAL_TIMING_EVENT((&tm_rml, "to %s", ORTE_NAME_PRINT(&req->post.close_channel.channel->peer)));
close_chan = OBJ_NEW(orte_rml_close_channel_t); close_chan = OBJ_NEW(orte_rml_close_channel_t);
close_chan->channel = req->post.close_channel.channel; close_chan->channel = req->post.close_channel.channel;
close_chan->cbfunc = req->post.close_channel.cbfunc; close_chan->cbfunc = req->post.close_channel.cbfunc;
@ -242,7 +243,7 @@ void orte_rml_base_open_channel_resp_callback (int status,
"%s rml_open_channel_resp_callback to peer %s status = %d channel = %p", "%s rml_open_channel_resp_callback to peer %s status = %d channel = %p",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(peer), status, ORTE_NAME_PRINT(peer), status,
channel)); (void*)channel));
int32_t rc; int32_t rc;
bool peer_resp = false; bool peer_resp = false;
int32_t count = 1; int32_t count = 1;
@ -287,7 +288,7 @@ void orte_rml_base_open_channel_resp_callback (int status,
"%s rml_open_channel_resp_callback to peer %s status = %d channel =%p num = %d", "%s rml_open_channel_resp_callback to peer %s status = %d channel =%p num = %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(peer), req->status, ORTE_NAME_PRINT(peer), req->status,
channel, channel->channel_num)); (void*)channel, channel->channel_num));
ORTE_RML_OPEN_CHANNEL_COMPLETE(req); ORTE_RML_OPEN_CHANNEL_COMPLETE(req);
OBJ_RELEASE(req); OBJ_RELEASE(req);
} }
@ -528,7 +529,7 @@ void orte_rml_close_channel_recv_callback (int status,
OPAL_OUTPUT_VERBOSE((1, orte_rml_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((1, orte_rml_base_framework.framework_output,
"%s rml_close_channel_recv_callback for channel num =%d channel=%p", "%s rml_close_channel_recv_callback for channel num =%d channel=%p",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
channel_num, channel)); channel_num, (void*)channel));
if (NULL != channel) { if (NULL != channel) {
orte_qos_close_channel ( channel->qos, channel->qos_channel_ptr); orte_qos_close_channel ( channel->qos, channel->qos_channel_ptr);
opal_pointer_array_set_item ( &orte_rml_base.open_channels, channel->channel_num, NULL); opal_pointer_array_set_item ( &orte_rml_base.open_channels, channel->channel_num, NULL);

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

@ -13,7 +13,7 @@
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. * Copyright (c) 2011-2015 Los Alamos National Security, LLC.
* All rights reserved. * All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -79,6 +79,7 @@ orte_rml_component_t mca_rml_oob_component = {
}; };
orte_rml_oob_module_t orte_rml_oob_module = { orte_rml_oob_module_t orte_rml_oob_module = {
{
orte_rml_oob_init, orte_rml_oob_init,
orte_rml_oob_fini, orte_rml_oob_fini,
@ -104,6 +105,7 @@ orte_rml_oob_module_t orte_rml_oob_module = {
orte_rml_oob_send_channel_nb, orte_rml_oob_send_channel_nb,
orte_rml_oob_send_buffer_channel_nb, orte_rml_oob_send_buffer_channel_nb,
orte_rml_oob_close_channel orte_rml_oob_close_channel
}
}; };
/* Local variables */ /* Local variables */

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

@ -12,7 +12,7 @@
* All rights reserved. * All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -365,7 +365,7 @@ int orte_rml_oob_send_channel_nb (orte_rml_channel_num_t channel_num,
req->post.send.iov = msg; req->post.send.iov = msg;
req->post.send.count = count; req->post.send.count = count;
req->post.send.tag = tag; req->post.send.tag = tag;
req->post.send.cbfunc.iov = cbfunc; req->post.send.cbfunc.iov_chan = cbfunc;
req->post.send.cbdata = cbdata; req->post.send.cbdata = cbdata;
req->post.send.channel = channel; req->post.send.channel = channel;
/* setup the event for the send callback */ /* setup the event for the send callback */