Skip to content

Commit 64b6956

Browse files
author
Ralph Castain
committed
Cleanup warnings in opal and orte layers when building optimized on Mac
1 parent d668612 commit 64b6956

File tree

11 files changed

+45
-18
lines changed

11 files changed

+45
-18
lines changed

opal/datatype/opal_convertor.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,10 @@ int32_t opal_convertor_set_position_nocheck( opal_convertor_t* convertor,
474474
}
475475
#else
476476
#define OPAL_CONVERTOR_COMPUTE_REMOTE_SIZE(convertor, datatype, bdt_mask) \
477-
assert(0 == (bdt_mask))
477+
{ \
478+
assert(0 == (bdt_mask)); \
479+
(void)bdt_mask; /* silence compiler warning */ \
480+
}
478481
#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT */
479482

480483
/**

opal/mca/hwloc/hwloc1111/hwloc/src/topology.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ hwloc_topology_dup(hwloc_topology_t *newp,
499499
return -1;
500500
}
501501

502-
hwloc_topology_init(&new);
502+
if (0 != hwloc_topology_init(&new)) {
503+
return -1;
504+
}
503505

504506
new->flags = old->flags;
505507
memcpy(new->ignored_types, old->ignored_types, sizeof(old->ignored_types));
@@ -3046,6 +3048,7 @@ hwloc__check_children(struct hwloc_obj *parent)
30463048
assert(prev_firstchild < firstchild);
30473049
prev_firstchild = firstchild;
30483050
}
3051+
(void)prev_firstchild; // silence compiler warning
30493052
}
30503053

30513054
/* checks for all children */

opal/mca/pmix/pmix112/pmix1_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static void myerr(pmix_status_t status,
6363
iptr = OBJ_NEW(opal_value_t);
6464
iptr->key = strdup(info[n].key);
6565
pmix1_value_unload(iptr, &info[n].value);
66-
opal_list_append(&plist, &nm->super);
66+
opal_list_append(&plist, &iptr->super);
6767
}
6868

6969
/* call the base errhandler */

opal/mca/pmix/pmix112/pmix1_server_south.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static void myerr(pmix_status_t status,
7777
iptr = OBJ_NEW(opal_value_t);
7878
iptr->key = strdup(info[n].key);
7979
pmix1_value_unload(iptr, &info[n].value);
80-
opal_list_append(&plist, &nm->super);
80+
opal_list_append(&plist, &iptr->super);
8181
}
8282

8383
/* call the base errhandler */

opal/runtime/opal_progress.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,12 @@ opal_progress_set_event_flag(int flag)
217217
void
218218
opal_progress_event_users_increment(void)
219219
{
220+
#if OPAL_ENABLE_DEBUG
220221
int32_t val;
221222
val = opal_atomic_add_32(&num_event_users, 1);
222223

223224
OPAL_OUTPUT((debug_output, "progress: event_users_increment setting count to %d", val));
225+
#endif
224226

225227
#if OPAL_PROGRESS_USE_TIMERS
226228
/* force an update next round (we'll be past the delta) */
@@ -235,10 +237,12 @@ opal_progress_event_users_increment(void)
235237
void
236238
opal_progress_event_users_decrement(void)
237239
{
240+
#if OPAL_ENABLE_DEBUG
238241
int32_t val;
239242
val = opal_atomic_sub_32(&num_event_users, 1);
240243

241244
OPAL_OUTPUT((debug_output, "progress: event_users_decrement setting count to %d", val));
245+
#endif
242246

243247
#if !OPAL_PROGRESS_USE_TIMERS
244248
/* start now in delaying if it's easy */

orte/mca/plm/slurm/configure.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ AC_DEFUN([MCA_orte_plm_slurm_CONFIG],[
4040

4141
# check to see if this is a Cray nativized slurm env.
4242

43+
slurm_cray_env=0
4344
ORTE_CHECK_ALPS([plm_slurm_cray],
44-
[AC_DEFINE_UNQUOTED([SLURM_CRAY_ENV],[1],
45-
[defined to 1 if slurm cray env, 0 otherwise])])
45+
[slurm_cray_env=1])
4646

47+
AC_DEFINE_UNQUOTED([SLURM_CRAY_ENV],[$slurm_cray_env],
48+
[defined to 1 if slurm cray env, 0 otherwise])
4749
])dnl

orte/mca/qos/ack/qos_ack_component.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ static inline int process_out_of_order_msg ( orte_qos_ack_channel_t *ack_chan,
329329
rc = ORTE_ERR_DUPLICATE_MSG;
330330
}
331331
else {
332-
opal_hotel_checkin(&ack_chan->outstanding_msgs, (void*)msg, &room_num);
332+
if (OPAL_SUCCESS != (rc = opal_hotel_checkin(&ack_chan->outstanding_msgs, (void*)msg, &room_num))) {
333+
return rc;
334+
}
333335
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
334336
"process_out_of_order_msg checked in msg %d in room %d\n",
335337
msg->seq_num, room_num));
@@ -484,17 +486,19 @@ static int ack_cmp (void *channel, opal_list_t *attributes) {
484486

485487
static void ack_send_callback (orte_rml_send_t *msg)
486488
{
487-
orte_qos_ack_channel_t *ack_chan;
488489
/* complete the request back to the user only upon receiving the ack
489490
nothing to do here, just make sure that the request is in the hotel */
490491
OPAL_OUTPUT_VERBOSE((1, orte_qos_base_framework.framework_output,
491492
"%s ack_send_callback for msg = %p seq num =%d\n",
492493
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
493494
(void*)msg, msg->seq_num));
494-
ack_chan = (orte_qos_ack_channel_t *) msg->channel->qos_channel_ptr;
495495
/* if msg->status != SUCCESS - then evict all messages in the window and
496496
complete them?? */
497497
if(ORTE_SUCCESS == msg->status) {
498+
#if OPAL_ENABLE_DEBUG
499+
orte_qos_ack_channel_t *ack_chan;
500+
ack_chan = (orte_qos_ack_channel_t *) msg->channel->qos_channel_ptr;
501+
#endif
498502
// nothing to do
499503
assert((orte_qos_ack_channel_get_msg_room(ack_chan, msg->seq_num)) != -1);
500504
} else {
@@ -531,7 +535,9 @@ void orte_qos_ack_msg_ack_timeout_callback (struct opal_hotel_t *hotel,
531535
void orte_qos_ack_recv_msg_timeout_callback (struct opal_hotel_t *hotel,
532536
int room_num, void *occupant)
533537
{
538+
#if OPAL_ENABLE_DEBUG
534539
orte_rml_recv_t *msg = (orte_rml_recv_t *) occupant;
540+
#endif
535541
#if 0
536542
orte_qos_ack_channel_t *ack_chan;
537543
orte_rml_channel_t *channel;
@@ -664,7 +670,9 @@ void orte_qos_ack_msg_send_callback ( int status,
664670
orte_rml_tag_t tag,
665671
void* cbdata)
666672
{
673+
#if OPAL_ENABLE_DEBUG
667674
orte_rml_channel_t *channel = (orte_rml_channel_t*) cbdata;
675+
#endif
668676
OPAL_OUTPUT_VERBOSE ((0, orte_qos_base_framework.framework_output,
669677
" orte_qos_ack_msg_send_callback channel num =%d status =%d",
670678
channel->channel_num, status));

orte/mca/ras/slurm/ras_slurm_module.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,16 @@ static void recv_data(int fd, short args, void *cbdata)
922922
OBJ_DESTRUCT(&ndtmp);
923923
if (NULL != dash_host) {
924924
tpn = opal_argv_join(dash_host, ',');
925-
orte_set_attribute(&app->attributes, ORTE_APP_DASH_HOST, ORTE_ATTR_LOCAL, (void*)tpn, OPAL_STRING);
925+
for (idx=0; idx < jdata->apps->size; idx++) {
926+
if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, idx))) {
927+
orte_show_help("help-ras-slurm.txt", "slurm-dyn-alloc-failed", true, jtrk->cmd);
928+
ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_ALLOC_FAILED);
929+
opal_argv_free(dash_host);
930+
free(tpn);
931+
return;
932+
}
933+
orte_set_attribute(&app->attributes, ORTE_APP_DASH_HOST, ORTE_ATTR_LOCAL, (void*)tpn, OPAL_STRING);
934+
}
926935
opal_argv_free(dash_host);
927936
free(tpn);
928937
}

orte/mca/rml/base/rml_base_channel_handlers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ void orte_rml_base_close_channel_send_callback ( int status,
9393
// this is the send call back for open channel request
9494
orte_rml_close_channel_t *req = (orte_rml_close_channel_t*) cbdata;
9595
orte_process_name_t peer = req->channel->peer;
96-
OPAL_OUTPUT_VERBOSE((1, orte_rml_base_framework.framework_output,
96+
opal_output_verbose(5, orte_rml_base_framework.framework_output,
9797
"%s rml_close_channel_send_callback to peer %s status = %d",
9898
ORTE_NAME_PRINT(sender),
99-
ORTE_NAME_PRINT(&peer), status));
99+
ORTE_NAME_PRINT(&peer), status);
100100
req->status = status;
101101
// if the message could not be sent log error
102102
if (ORTE_SUCCESS != req->status)

orte/runtime/orte_data_server.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ void orte_data_server(int status, orte_process_name_t* sender,
378378

379379
/* unpack any info elements */
380380
count = 1;
381+
uid = UINT32_MAX;
381382
while (ORTE_SUCCESS == (rc = opal_dss.unpack(buffer, &iptr, &count, OPAL_VALUE))) {
382383
/* if this is the userid, separate it out */
383384
if (0 == strcmp(iptr->key, OPAL_PMIX_USERID)) {
@@ -389,7 +390,7 @@ void orte_data_server(int status, orte_process_name_t* sender,
389390
/* ignore anything else for now */
390391
OBJ_RELEASE(iptr);
391392
}
392-
if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
393+
if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc || UINT32_MAX == uid) {
393394
ORTE_ERROR_LOG(rc);
394395
opal_argv_free(keys);
395396
goto SEND_ERROR;
@@ -539,6 +540,7 @@ void orte_data_server(int status, orte_process_name_t* sender,
539540

540541
/* unpack any info elements */
541542
count = 1;
543+
uid = UINT32_MAX;
542544
while (ORTE_SUCCESS == (rc = opal_dss.unpack(buffer, &iptr, &count, OPAL_VALUE))) {
543545
/* if this is the userid, separate it out */
544546
if (0 == strcmp(iptr->key, OPAL_PMIX_USERID)) {
@@ -547,7 +549,7 @@ void orte_data_server(int status, orte_process_name_t* sender,
547549
/* ignore anything else for now */
548550
OBJ_RELEASE(iptr);
549551
}
550-
if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
552+
if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc || UINT32_MAX == uid) {
551553
ORTE_ERROR_LOG(rc);
552554
opal_argv_free(keys);
553555
goto SEND_ERROR;

orte/util/dash_host/dash_host.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,6 @@ int orte_util_add_dash_host_nodes(opal_list_t *nodes,
272272
if (ORTE_FLAG_TEST(nd, ORTE_NODE_FLAG_SLOTS_GIVEN)) {
273273
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_SLOTS_GIVEN);
274274
}
275-
/* don't ignore a slots directive */
276-
if (slots_given) {
277-
node->slots = slots;
278-
}
279275
break;
280276
}
281277
}

0 commit comments

Comments
 (0)