diff --git a/opal/datatype/opal_convertor.c b/opal/datatype/opal_convertor.c index 1c10efd1aa..d548128318 100644 --- a/opal/datatype/opal_convertor.c +++ b/opal/datatype/opal_convertor.c @@ -474,7 +474,10 @@ int32_t opal_convertor_set_position_nocheck( opal_convertor_t* convertor, } #else #define OPAL_CONVERTOR_COMPUTE_REMOTE_SIZE(convertor, datatype, bdt_mask) \ - assert(0 == (bdt_mask)) +{ \ + assert(0 == (bdt_mask)); \ + (void)bdt_mask; /* silence compiler warning */ \ +} #endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT */ /** diff --git a/opal/mca/event/external/external.h b/opal/mca/event/external/external.h index 792ad2e794..1cdfbe688b 100644 --- a/opal/mca/event/external/external.h +++ b/opal/mca/event/external/external.h @@ -2,6 +2,8 @@ * Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ * @@ -17,6 +19,8 @@ #ifndef MCA_OPAL_EVENT_EXTERNAL_H #define MCA_OPAL_EVENT_EXTERNAL_H +#include "opal_config.h" + #include "event.h" #include "event2/event.h" #include "event2/thread.h" diff --git a/opal/mca/hwloc/hwloc1112/hwloc/src/topology.c b/opal/mca/hwloc/hwloc1112/hwloc/src/topology.c index 028c226bdb..a6d6d921f2 100644 --- a/opal/mca/hwloc/hwloc1112/hwloc/src/topology.c +++ b/opal/mca/hwloc/hwloc1112/hwloc/src/topology.c @@ -523,7 +523,9 @@ hwloc_topology_dup(hwloc_topology_t *newp, return -1; } - hwloc_topology_init(&new); + if (0 != hwloc_topology_init(&new)) { + return -1; + } new->flags = old->flags; memcpy(new->ignored_types, old->ignored_types, sizeof(old->ignored_types)); @@ -3128,6 +3130,7 @@ hwloc__check_children(struct hwloc_obj *parent) assert(prev_firstchild < firstchild); prev_firstchild = firstchild; } + (void)prev_firstchild; // silence compiler warning } /* checks for all children */ diff --git a/opal/runtime/opal_progress.c b/opal/runtime/opal_progress.c index d0fe0d71b3..aa2e713336 100644 --- a/opal/runtime/opal_progress.c +++ b/opal/runtime/opal_progress.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ @@ -217,10 +217,14 @@ opal_progress_set_event_flag(int flag) void opal_progress_event_users_increment(void) { +#if OPAL_ENABLE_DEBUG int32_t val; val = opal_atomic_add_32(&num_event_users, 1); OPAL_OUTPUT((debug_output, "progress: event_users_increment setting count to %d", val)); +#else + (void)opal_atomic_add_32(&num_event_users, 1); +#endif #if OPAL_PROGRESS_USE_TIMERS /* force an update next round (we'll be past the delta) */ @@ -235,10 +239,14 @@ opal_progress_event_users_increment(void) void opal_progress_event_users_decrement(void) { +#if OPAL_ENABLE_DEBUG || ! OPAL_PROGRESS_USE_TIMERS int32_t val; val = opal_atomic_sub_32(&num_event_users, 1); OPAL_OUTPUT((debug_output, "progress: event_users_decrement setting count to %d", val)); +#else + (void)opal_atomic_sub_32(&num_event_users, 1); +#endif #if !OPAL_PROGRESS_USE_TIMERS /* start now in delaying if it's easy */ diff --git a/orte/mca/ess/lsf/ess_lsf_module.c b/orte/mca/ess/lsf/ess_lsf_module.c index 55f1720c21..f9aef64269 100644 --- a/orte/mca/ess/lsf/ess_lsf_module.c +++ b/orte/mca/ess/lsf/ess_lsf_module.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. + * Copyright (c) 2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,6 +33,7 @@ #include #include "opal/util/opal_environ.h" +#include "opal/util/argv.h" #include "orte/util/show_help.h" #include "orte/util/name_fns.h" diff --git a/orte/mca/iof/base/iof_base_setup.c b/orte/mca/iof/base/iof_base_setup.c index 76c75e77b7..d03895ca9d 100644 --- a/orte/mca/iof/base/iof_base_setup.c +++ b/orte/mca/iof/base/iof_base_setup.c @@ -58,6 +58,7 @@ #include "opal/util/opal_pty.h" #include "opal/util/opal_environ.h" #include "opal/util/output.h" +#include "opal/util/argv.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/util/name_fns.h" diff --git a/orte/mca/plm/slurm/configure.m4 b/orte/mca/plm/slurm/configure.m4 index dcc0f381ad..28900fa240 100644 --- a/orte/mca/plm/slurm/configure.m4 +++ b/orte/mca/plm/slurm/configure.m4 @@ -40,8 +40,10 @@ AC_DEFUN([MCA_orte_plm_slurm_CONFIG],[ # check to see if this is a Cray nativized slurm env. + slurm_cray_env=0 ORTE_CHECK_ALPS([plm_slurm_cray], - [AC_DEFINE_UNQUOTED([SLURM_CRAY_ENV],[1], - [defined to 1 if slurm cray env, 0 otherwise])]) + [slurm_cray_env=1]) + AC_DEFINE_UNQUOTED([SLURM_CRAY_ENV],[$slurm_cray_env], + [defined to 1 if slurm cray env, 0 otherwise]) ])dnl diff --git a/orte/mca/ras/slurm/ras_slurm_module.c b/orte/mca/ras/slurm/ras_slurm_module.c index 8cce4bc1c2..db652fd61c 100644 --- a/orte/mca/ras/slurm/ras_slurm_module.c +++ b/orte/mca/ras/slurm/ras_slurm_module.c @@ -922,7 +922,16 @@ static void recv_data(int fd, short args, void *cbdata) OBJ_DESTRUCT(&ndtmp); if (NULL != dash_host) { tpn = opal_argv_join(dash_host, ','); - orte_set_attribute(&app->attributes, ORTE_APP_DASH_HOST, ORTE_ATTR_LOCAL, (void*)tpn, OPAL_STRING); + for (idx=0; idx < jdata->apps->size; idx++) { + if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, idx))) { + orte_show_help("help-ras-slurm.txt", "slurm-dyn-alloc-failed", true, jtrk->cmd); + ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_ALLOC_FAILED); + opal_argv_free(dash_host); + free(tpn); + return; + } + orte_set_attribute(&app->attributes, ORTE_APP_DASH_HOST, ORTE_ATTR_LOCAL, (void*)tpn, OPAL_STRING); + } opal_argv_free(dash_host); free(tpn); } diff --git a/orte/runtime/data_type_support/orte_dt_unpacking_fns.c b/orte/runtime/data_type_support/orte_dt_unpacking_fns.c index 920b60cacd..f0a4fb5342 100644 --- a/orte/runtime/data_type_support/orte_dt_unpacking_fns.c +++ b/orte/runtime/data_type_support/orte_dt_unpacking_fns.c @@ -28,6 +28,7 @@ #include "opal/dss/dss.h" #include "opal/dss/dss_internal.h" #include "opal/mca/hwloc/hwloc.h" +#include "opal/util/argv.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/data_type_support/orte_dt_support.h" diff --git a/orte/runtime/orte_data_server.c b/orte/runtime/orte_data_server.c index 7e79f47172..c43dca06a8 100644 --- a/orte/runtime/orte_data_server.c +++ b/orte/runtime/orte_data_server.c @@ -378,6 +378,7 @@ void orte_data_server(int status, orte_process_name_t* sender, /* unpack any info elements */ count = 1; + uid = UINT32_MAX; while (ORTE_SUCCESS == (rc = opal_dss.unpack(buffer, &iptr, &count, OPAL_VALUE))) { /* if this is the userid, separate it out */ if (0 == strcmp(iptr->key, OPAL_PMIX_USERID)) { @@ -389,7 +390,7 @@ void orte_data_server(int status, orte_process_name_t* sender, /* ignore anything else for now */ OBJ_RELEASE(iptr); } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc || UINT32_MAX == uid) { ORTE_ERROR_LOG(rc); opal_argv_free(keys); goto SEND_ERROR; @@ -539,6 +540,7 @@ void orte_data_server(int status, orte_process_name_t* sender, /* unpack any info elements */ count = 1; + uid = UINT32_MAX; while (ORTE_SUCCESS == (rc = opal_dss.unpack(buffer, &iptr, &count, OPAL_VALUE))) { /* if this is the userid, separate it out */ if (0 == strcmp(iptr->key, OPAL_PMIX_USERID)) { @@ -547,7 +549,7 @@ void orte_data_server(int status, orte_process_name_t* sender, /* ignore anything else for now */ OBJ_RELEASE(iptr); } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc || UINT32_MAX == uid) { ORTE_ERROR_LOG(rc); opal_argv_free(keys); goto SEND_ERROR; diff --git a/orte/test/system/regex.c b/orte/test/system/regex.c index 8e77de9a05..1fb3496f3b 100644 --- a/orte/test/system/regex.c +++ b/orte/test/system/regex.c @@ -10,6 +10,8 @@ #include #include +#include "opal/util/argv.h" + #include "orte/util/proc_info.h" #include "orte/util/regex.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/util/dash_host/dash_host.c b/orte/util/dash_host/dash_host.c index b1de288190..b81d791a62 100644 --- a/orte/util/dash_host/dash_host.c +++ b/orte/util/dash_host/dash_host.c @@ -274,10 +274,6 @@ int orte_util_add_dash_host_nodes(opal_list_t *nodes, if (ORTE_FLAG_TEST(nd, ORTE_NODE_FLAG_SLOTS_GIVEN)) { ORTE_FLAG_SET(node, ORTE_NODE_FLAG_SLOTS_GIVEN); } - /* don't ignore a slots directive */ - if (slots_given) { - node->slots = slots; - } break; } }