From 50c30d62ca74a7a25f76b783de480b489b8cca29 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 5 Mar 2014 02:48:15 +0000 Subject: [PATCH] Repair builds without hwloc cmr=v1.7.5:reviewer=jsquyres This commit was SVN r30940. --- orte/mca/rmaps/base/rmaps_base_frame.c | 5 ++++- orte/mca/rmaps/base/rmaps_base_map_job.c | 2 +- orte/mca/rmaps/round_robin/rmaps_rr_mappers.c | 6 +++++- orte/runtime/orte_mca_params.c | 4 ++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/orte/mca/rmaps/base/rmaps_base_frame.c b/orte/mca/rmaps/base/rmaps_base_frame.c index 04c60a1bdb..1571a4820f 100644 --- a/orte/mca/rmaps/base/rmaps_base_frame.c +++ b/orte/mca/rmaps/base/rmaps_base_frame.c @@ -599,7 +599,10 @@ static int check_modifiers(char *ck, orte_mapping_policy_t *tmp) int orte_rmaps_base_set_mapping_policy(orte_mapping_policy_t *policy, char **device, char *inspec) { - char *ck, *ptr; + char *ck; +#if OPAL_HAVE_HWLOC + char *ptr; +#endif orte_mapping_policy_t tmp; int rc; size_t len; diff --git a/orte/mca/rmaps/base/rmaps_base_map_job.c b/orte/mca/rmaps/base/rmaps_base_map_job.c index 86a3d1a248..daba70883d 100644 --- a/orte/mca/rmaps/base/rmaps_base_map_job.c +++ b/orte/mca/rmaps/base/rmaps_base_map_job.c @@ -204,7 +204,7 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata) } #else /* in the absence of hwloc, default to map-by slot */ - ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSLOT); + ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYSLOT); #endif } /* check for oversubscribe directives */ diff --git a/orte/mca/rmaps/round_robin/rmaps_rr_mappers.c b/orte/mca/rmaps/round_robin/rmaps_rr_mappers.c index e00219ddc7..bcaf3ec9c5 100644 --- a/orte/mca/rmaps/round_robin/rmaps_rr_mappers.c +++ b/orte/mca/rmaps/round_robin/rmaps_rr_mappers.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -62,6 +62,7 @@ int orte_rmaps_rr_byslot(orte_job_t *jdata, true, app->num_procs, app->app); return ORTE_ERR_SILENT; } +#if OPAL_HAVE_HWLOC /* if we will and are allowed to oversubscribe, and binding was given, then * we really should warn the user that we cannot bind */ @@ -77,6 +78,7 @@ int orte_rmaps_rr_byslot(orte_job_t *jdata, /* don't default to bound */ OPAL_SET_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NONE); } +#endif } /* first pass: map the number of procs to each node until we @@ -244,6 +246,7 @@ int orte_rmaps_rr_bynode(orte_job_t *jdata, return ORTE_ERR_SILENT; } oversubscribed = true; +#if OPAL_HAVE_HWLOC /* if we will and are allowed to oversubscribe, and binding was given, then * we really should warn the user that we cannot bind */ @@ -259,6 +262,7 @@ int orte_rmaps_rr_bynode(orte_job_t *jdata, /* don't default to bound */ OPAL_SET_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NONE); } +#endif } nnodes = opal_list_get_size(node_list); diff --git a/orte/runtime/orte_mca_params.c b/orte/runtime/orte_mca_params.c index c5ce8ca4d4..85d7716a49 100644 --- a/orte/runtime/orte_mca_params.c +++ b/orte/runtime/orte_mca_params.c @@ -712,6 +712,7 @@ int orte_register_params(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &orte_max_vm_size); +#if OPAL_HAVE_HWLOC if (opal_hwloc_use_hwthreads_as_cpus) { orte_set_slots = strdup("hwthreads"); } else { @@ -725,6 +726,9 @@ int orte_register_params(void) MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &orte_set_slots); +#else + orte_set_slots = NULL; +#endif /* should we display the allocation after determining it? */ orte_display_allocation = false;