From e6ad1ad6211f31830820f270523fdf62504a8c16 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 28 Apr 2016 13:21:10 -0700 Subject: [PATCH] Up-port of change for 2.x: if user directs oversubscribe, then do not bind as we will otherwise overload resources --- orte/mca/rmaps/base/rmaps_base_map_job.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/orte/mca/rmaps/base/rmaps_base_map_job.c b/orte/mca/rmaps/base/rmaps_base_map_job.c index 168165ced4..9bfc09df2a 100644 --- a/orte/mca/rmaps/base/rmaps_base_map_job.c +++ b/orte/mca/rmaps/base/rmaps_base_map_job.c @@ -258,10 +258,14 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata) } else { orte_mapping_policy_t mpol; mpol = ORTE_GET_MAPPING_POLICY(jdata->map->mapping); - /* if the user explicitly mapped-by some object, then we default + /* if the user specified that we allow oversubscription, then do not bind. + * otherwise, if the user explicitly mapped-by some object, then we default * to binding to that object */ - if (ORTE_MAPPING_POLICY_IS_SET(jdata->map->mapping) && - ORTE_MAPPING_BYBOARD < mpol && mpol < ORTE_MAPPING_BYSLOT) { + if ((ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping)) && + !(ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) { + OPAL_SET_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NONE); + } else if (ORTE_MAPPING_POLICY_IS_SET(jdata->map->mapping) && + ORTE_MAPPING_BYBOARD < mpol && mpol < ORTE_MAPPING_BYSLOT) { if (ORTE_MAPPING_BYHWTHREAD == mpol) { opal_output_verbose(5, orte_rmaps_base_framework.framework_output, "mca:rmaps[%d] binding not given - using byhwthread", __LINE__);