@@ -242,15 +242,19 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
242242     * already (e.g., during the call to comm_spawn), then we don't 
243243     * override it */ 
244244    if  (!OPAL_BINDING_POLICY_IS_SET (jdata -> map -> binding )) {
245-         /* if the user specified a default binding policy via 
246-          * MCA param, then we use it */ 
247-         if  (OPAL_BINDING_POLICY_IS_SET (opal_hwloc_binding_policy )) {
245+         /* if the user specified that we allow oversubscription, then do not bind. 
246+          * otherwise, if the user explicitly mapped-by some object, then we default 
247+          * to binding to that object */ 
248+         if  ((ORTE_MAPPING_SUBSCRIBE_GIVEN  &  ORTE_GET_MAPPING_DIRECTIVE (orte_rmaps_base .mapping )) && 
249+             !(ORTE_MAPPING_NO_OVERSUBSCRIBE  &  ORTE_GET_MAPPING_DIRECTIVE (orte_rmaps_base .mapping ))) {
250+             OPAL_SET_BINDING_POLICY (jdata -> map -> binding , OPAL_BIND_TO_NONE );
251+         } else  if  (OPAL_BINDING_POLICY_IS_SET (opal_hwloc_binding_policy )) {
252+             /* if the user specified a default binding policy via 
253+              * MCA param, then we use it */ 
248254            jdata -> map -> binding  =  opal_hwloc_binding_policy ;
249255        } else  {
250256            orte_mapping_policy_t  mpol ;
251257            mpol  =  ORTE_GET_MAPPING_POLICY (orte_rmaps_base .mapping );
252-             /* if the user explicitly mapped-by some object, then we default 
253-              * to binding to that object */ 
254258            if  (ORTE_MAPPING_POLICY_IS_SET (jdata -> map -> mapping ) && 
255259                ORTE_MAPPING_BYBOARD  <  mpol  &&  mpol  <  ORTE_MAPPING_BYSLOT ) {
256260                if  (ORTE_MAPPING_BYHWTHREAD  ==  mpol ) {
0 commit comments