Skip to content

Commit 9cb2fcf

Browse files
author
Ralph Castain
committed
Cleanup the qos code when --enable-timings is given
1 parent 01a9bdf commit 9cb2fcf

File tree

9 files changed

+121
-108
lines changed

9 files changed

+121
-108
lines changed

opal/util/timings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static get_ts_t _init_timestamping(opal_timer_type_t type)
201201
}
202202
}
203203

204-
opal_timing_event_t *opal_timing_event_alloc(opal_timing_t *t)
204+
static opal_timing_event_t *opal_timing_event_alloc(opal_timing_t *t)
205205
{
206206
if( t->buffer_offset >= t->buffer_size ){
207207
// notch timings overhead

orte/mca/qos/ack/qos_ack.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
2+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
33
* $COPYRIGHT$
44
*
55
* Additional copyrights may follow
@@ -79,14 +79,14 @@ typedef struct orte_qos_ack_channel {
7979
OBJ_CLASS_DECLARATION(orte_qos_ack_channel_t);
8080

8181
extern orte_qos_module_t orte_qos_ack_module;
82-
int orte_qos_ack_channel_get_msg_room (orte_qos_ack_channel_t * ack_chan,
82+
static inline int orte_qos_ack_channel_get_msg_room (orte_qos_ack_channel_t * ack_chan,
8383
uint32_t seq_num)
8484
{
8585
return ack_chan->seq_num_to_room_num[(seq_num % QOS_ACK_MAX_OUTSTANDING_MSGS)];
8686
}
8787

88-
void orte_qos_ack_channel_set_msg_room (orte_qos_ack_channel_t * ack_chan,
89-
uint32_t seq_num, int room_num)
88+
static inline void orte_qos_ack_channel_set_msg_room (orte_qos_ack_channel_t * ack_chan,
89+
uint32_t seq_num, int room_num)
9090
{
9191
ack_chan->seq_num_to_room_num[(seq_num % QOS_ACK_MAX_OUTSTANDING_MSGS)] = room_num;
9292
}

orte/mca/qos/ack/qos_ack_component.c

Lines changed: 81 additions & 80 deletions
Large diffs are not rendered by default.

orte/mca/qos/base/qos_base_channel_handlers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
44
* $COPYRIGHT$
55
*
66
* Additional copyrights may follow
@@ -89,7 +89,7 @@ void* orte_qos_get_module (opal_list_t *qos_attributes)
8989
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
9090
"%s qos_base_get_module returning qos module %p type =%d",
9191
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
92-
&qos_comp->mod, type_val));
92+
(void*)&qos_comp->mod, type_val));
9393
return (void*)(&qos_comp->mod);
9494
} else {
9595
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,

orte/mca/qos/base/qos_base_frame.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
44
* $COPYRIGHT$
55
*
66
* Additional copyrights may follow
@@ -42,7 +42,7 @@ static int orte_qos_base_register(mca_base_register_flag_t flags)
4242
#if OPAL_ENABLE_TIMING
4343
/* Detailed timing setup */
4444
orte_qos_base.timing = false;
45-
(void) mca_base_var_rtegister ("orte", "qos", "base", "timing",
45+
(void) mca_base_var_register ("orte", "qos", "base", "timing",
4646
"Enable QOS timings",
4747
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
4848
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,

orte/mca/qos/noop/qos_noop_component.c

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014 - 2015 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
44
* $COPYRIGHT$
55
*
66
* Additional copyrights may follow
@@ -87,8 +87,10 @@ static void qos_noop_shutdown (void) {
8787

8888
static void* noop_create (opal_list_t *qos_attributes, uint32_t channel_num) {
8989
orte_qos_base_channel_t * noop_chan;
90-
int32_t rc, *window, *type, window_val;
90+
int32_t rc, *window, window_val;
9191
orte_qos_type_t type_val = orte_qos_noop;
92+
orte_qos_type_t *type;
93+
9294
noop_chan = OBJ_NEW (orte_qos_base_channel_t);
9395
noop_chan->channel_num = channel_num;
9496
type = &type_val;
@@ -118,7 +120,8 @@ static void* noop_create (opal_list_t *qos_attributes, uint32_t channel_num) {
118120
return noop_chan;
119121
}
120122

121-
static int noop_open (void *qos_channel, opal_buffer_t * buf) {
123+
static int noop_open (void *qos_channel, opal_buffer_t * buf)
124+
{
122125
int32_t rc = ORTE_SUCCESS;
123126
orte_qos_base_channel_t *noop_chan;
124127
noop_chan = (orte_qos_base_channel_t*) (qos_channel);
@@ -129,24 +132,27 @@ static int noop_open (void *qos_channel, opal_buffer_t * buf) {
129132
return rc;
130133
}
131134

132-
static int noop_send ( void *qos_channel, orte_rml_send_t *msg) {
135+
static int noop_send ( void *qos_channel, orte_rml_send_t *msg)
136+
{
133137
//nothing to do
134138
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
135139
"%s noop_send msg = %p to peer = %s\n",
136140
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
137-
msg, ORTE_NAME_PRINT(&msg->dst)));
141+
(void*)msg, ORTE_NAME_PRINT(&msg->dst)));
138142
return ORTE_SUCCESS;
139143
}
140144

141-
static int noop_recv (void *qos_channel, orte_rml_recv_t *msg) {
145+
static int noop_recv (void *qos_channel, orte_rml_recv_t *msg)
146+
{
142147
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
143148
"%s noop_recv msg = %p from peer = %s\n",
144149
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
145-
msg, ORTE_NAME_PRINT(&msg->sender)));
150+
(void*)msg, ORTE_NAME_PRINT(&msg->sender)));
146151
return ORTE_SUCCESS;
147152
}
148153

149-
static int noop_close (void * channel) {
154+
static int noop_close (void * channel)
155+
{
150156
orte_qos_base_channel_t *noop_chan;
151157
if(NULL != channel) {
152158
noop_chan = (orte_qos_base_channel_t*) channel;
@@ -157,11 +163,13 @@ static int noop_close (void * channel) {
157163

158164
}
159165

160-
static int noop_init_recv (void *channel, opal_list_t *attributes) {
166+
static int noop_init_recv (void *channel, opal_list_t *attributes)
167+
{
161168
return ORTE_SUCCESS;
162169
}
163170

164-
static int noop_cmp (void *channel, opal_list_t *attributes) {
171+
static int noop_cmp (void *channel, opal_list_t *attributes)
172+
{
165173
int32_t chan_typea, chan_typeb, *ptr, window_sizea, window_sizeb;
166174
orte_qos_base_channel_t *noop_chan = (orte_qos_base_channel_t*) channel;
167175
ptr = &chan_typea;
@@ -183,7 +191,8 @@ static int noop_cmp (void *channel, opal_list_t *attributes) {
183191
return ORTE_ERROR;
184192
}
185193

186-
static void noop_send_callback (orte_rml_send_t *msg) {
194+
static void noop_send_callback (orte_rml_send_t *msg)
195+
{
187196
// nothing to do for noop
188197
ORTE_RML_SEND_COMPLETE(msg);
189198
}

orte/mca/rml/base/rml_base_channel_handlers.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
12
/*
23
*
3-
* Copyright (c) 2015 Intel, Inc. All rights reserved.
4+
* Copyright (c) 2015 Intel, Inc. All rights reserved.
45
* $COPYRIGHT$
56
*
67
* Additional copyrights may follow
@@ -54,7 +55,7 @@ void orte_rml_base_close_channel(int fd, short flags, void *cbdata)
5455
"%s rml_close_channel to peer %s",
5556
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
5657
ORTE_NAME_PRINT(&req->post.close_channel.channel->peer)));
57-
OPAL_TIMING_EVENT((&tm_rml, "to %s", ORTE_NAME_PRINT(&peer)));
58+
OPAL_TIMING_EVENT((&tm_rml, "to %s", ORTE_NAME_PRINT(&req->post.close_channel.channel->peer)));
5859
close_chan = OBJ_NEW(orte_rml_close_channel_t);
5960
close_chan->channel = req->post.close_channel.channel;
6061
close_chan->cbfunc = req->post.close_channel.cbfunc;
@@ -242,7 +243,7 @@ void orte_rml_base_open_channel_resp_callback (int status,
242243
"%s rml_open_channel_resp_callback to peer %s status = %d channel = %p",
243244
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
244245
ORTE_NAME_PRINT(peer), status,
245-
channel));
246+
(void*)channel));
246247
int32_t rc;
247248
bool peer_resp = false;
248249
int32_t count = 1;
@@ -287,7 +288,7 @@ void orte_rml_base_open_channel_resp_callback (int status,
287288
"%s rml_open_channel_resp_callback to peer %s status = %d channel =%p num = %d",
288289
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
289290
ORTE_NAME_PRINT(peer), req->status,
290-
channel, channel->channel_num));
291+
(void*)channel, channel->channel_num));
291292
ORTE_RML_OPEN_CHANNEL_COMPLETE(req);
292293
OBJ_RELEASE(req);
293294
}
@@ -528,7 +529,7 @@ void orte_rml_close_channel_recv_callback (int status,
528529
OPAL_OUTPUT_VERBOSE((1, orte_rml_base_framework.framework_output,
529530
"%s rml_close_channel_recv_callback for channel num =%d channel=%p",
530531
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
531-
channel_num, channel));
532+
channel_num, (void*)channel));
532533
if (NULL != channel) {
533534
orte_qos_close_channel ( channel->qos, channel->qos_channel_ptr);
534535
opal_pointer_array_set_item ( &orte_rml_base.open_channels, channel->channel_num, NULL);

orte/mca/rml/oob/rml_oob_component.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
1515
* All rights reserved.
16-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
1717
* $COPYRIGHT$
1818
*
1919
* Additional copyrights may follow
@@ -79,6 +79,7 @@ orte_rml_component_t mca_rml_oob_component = {
7979
};
8080

8181
orte_rml_oob_module_t orte_rml_oob_module = {
82+
{
8283
orte_rml_oob_init,
8384
orte_rml_oob_fini,
8485

@@ -104,6 +105,7 @@ orte_rml_oob_module_t orte_rml_oob_module = {
104105
orte_rml_oob_send_channel_nb,
105106
orte_rml_oob_send_buffer_channel_nb,
106107
orte_rml_oob_close_channel
108+
}
107109
};
108110

109111
/* Local variables */

orte/mca/rml/oob/rml_oob_send.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
1414
* reserved.
15-
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
15+
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
1616
* $COPYRIGHT$
1717
*
1818
* Additional copyrights may follow
@@ -365,7 +365,7 @@ int orte_rml_oob_send_channel_nb (orte_rml_channel_num_t channel_num,
365365
req->post.send.iov = msg;
366366
req->post.send.count = count;
367367
req->post.send.tag = tag;
368-
req->post.send.cbfunc.iov = cbfunc;
368+
req->post.send.cbfunc.iov_chan = cbfunc;
369369
req->post.send.cbdata = cbdata;
370370
req->post.send.channel = channel;
371371
/* setup the event for the send callback */

0 commit comments

Comments
 (0)