12
12
* Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
13
13
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
14
14
* All rights reserved.
15
- * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
15
+ * Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
16
16
* Copyright (c) 2014-2015 Research Organization for Information Science
17
17
* and Technology (RIST). All rights reserved.
18
18
* $COPYRIGHT$
@@ -149,7 +149,7 @@ static int orte_rmaps_base_register(mca_base_register_flag_t flags)
149
149
MCA_BASE_VAR_SCOPE_READONLY , & rmaps_base_bynode );
150
150
151
151
/* #cpus/rank to use */
152
- orte_rmaps_base .cpus_per_rank = 1 ;
152
+ orte_rmaps_base .cpus_per_rank = 0 ;
153
153
var_id = mca_base_var_register ("orte" , "rmaps" , "base" , "cpus_per_proc" ,
154
154
"Number of cpus to use for each rank [1-2**15 (default=1)]" ,
155
155
MCA_BASE_VAR_TYPE_INT , NULL , 0 , 0 ,
@@ -280,7 +280,7 @@ static int orte_rmaps_base_open(mca_base_open_flag_t flags)
280
280
return ORTE_ERR_SILENT ;
281
281
}
282
282
}
283
- if (1 < orte_rmaps_base .cpus_per_rank ) {
283
+ if (0 < orte_rmaps_base .cpus_per_rank ) {
284
284
orte_show_help ("help-orte-rmaps-base.txt" , "deprecated" , true,
285
285
"--cpus-per-proc, -cpus-per-proc, --cpus-per-rank, -cpus-per-rank" ,
286
286
"--map-by <obj>:PE=N, default <obj>=NUMA" ,
@@ -376,8 +376,8 @@ static int orte_rmaps_base_open(mca_base_open_flag_t flags)
376
376
ORTE_SET_RANKING_DIRECTIVE (orte_rmaps_base .ranking , ORTE_RANKING_GIVEN );
377
377
}
378
378
379
- if (1 < orte_rmaps_base .cpus_per_rank ) {
380
- /* if we were asked for multiple cpus/proc, then we have to
379
+ if (0 < orte_rmaps_base .cpus_per_rank ) {
380
+ /* if we were asked for cpus/proc, then we have to
381
381
* bind to those cpus - any other binding policy is an
382
382
* error
383
383
*/
@@ -403,24 +403,27 @@ static int orte_rmaps_base_open(mca_base_open_flag_t flags)
403
403
if (opal_hwloc_use_hwthreads_as_cpus ) {
404
404
OPAL_SET_BINDING_POLICY (opal_hwloc_binding_policy , OPAL_BIND_TO_HWTHREAD );
405
405
} else {
406
+ opal_output (0 , "SETTING BINDING TO CORE" );
406
407
OPAL_SET_BINDING_POLICY (opal_hwloc_binding_policy , OPAL_BIND_TO_CORE );
407
408
}
408
409
}
409
- /* we also need to ensure we are mapping to a high-enough level to have
410
- * multiple cpus beneath it - by default, we'll go to the NUMA level */
411
- if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE (orte_rmaps_base .mapping )) {
412
- if (ORTE_GET_MAPPING_POLICY (orte_rmaps_base .mapping ) == ORTE_MAPPING_BYHWTHREAD ||
413
- (ORTE_GET_MAPPING_POLICY (orte_rmaps_base .mapping ) == ORTE_MAPPING_BYCORE &&
414
- !opal_hwloc_use_hwthreads_as_cpus )) {
415
- orte_show_help ("help-orte-rmaps-base.txt" , "mapping-too-low-init" , true);
416
- return ORTE_ERR_SILENT ;
410
+ if (1 < orte_rmaps_base .cpus_per_rank ) {
411
+ /* we need to ensure we are mapping to a high-enough level to have
412
+ * multiple cpus beneath it - by default, we'll go to the NUMA level */
413
+ if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE (orte_rmaps_base .mapping )) {
414
+ if (ORTE_GET_MAPPING_POLICY (orte_rmaps_base .mapping ) == ORTE_MAPPING_BYHWTHREAD ||
415
+ (ORTE_GET_MAPPING_POLICY (orte_rmaps_base .mapping ) == ORTE_MAPPING_BYCORE &&
416
+ !opal_hwloc_use_hwthreads_as_cpus )) {
417
+ orte_show_help ("help-orte-rmaps-base.txt" , "mapping-too-low-init" , true);
418
+ return ORTE_ERR_SILENT ;
419
+ }
420
+ } else {
421
+ opal_output_verbose (5 , orte_rmaps_base_framework .framework_output ,
422
+ "%s rmaps:base pe/rank set - setting mapping to BYNUMA" ,
423
+ ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
424
+ ORTE_SET_MAPPING_POLICY (orte_rmaps_base .mapping , ORTE_MAPPING_BYNUMA );
425
+ ORTE_SET_MAPPING_DIRECTIVE (orte_rmaps_base .mapping , ORTE_MAPPING_GIVEN );
417
426
}
418
- } else {
419
- opal_output_verbose (5 , orte_rmaps_base_framework .framework_output ,
420
- "%s rmaps:base pe/rank set - setting mapping to BYNUMA" ,
421
- ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
422
- ORTE_SET_MAPPING_POLICY (orte_rmaps_base .mapping , ORTE_MAPPING_BYNUMA );
423
- ORTE_SET_MAPPING_DIRECTIVE (orte_rmaps_base .mapping , ORTE_MAPPING_GIVEN );
424
427
}
425
428
}
426
429
0 commit comments