diff --git a/orte/mca/odls/base/odls_base_open.c b/orte/mca/odls/base/odls_base_open.c index 45d3feb210..0ff9522f1d 100644 --- a/orte/mca/odls/base/odls_base_open.c +++ b/orte/mca/odls/base/odls_base_open.c @@ -180,12 +180,6 @@ int orte_odls_base_open(void) "Time to wait for a process to die after issuing a kill signal to it", false, false, 1, &orte_odls_globals.timeout_before_sigkill); - /* see if the user wants us to report bindings */ - mca_base_param_reg_int_name("odls", "base_report_bindings", - "Report process bindings [default: no]", - false, false, (int)false, &i); - orte_odls_globals.report_bindings = OPAL_INT_TO_BOOL(i); - /* initialize ODLS globals */ OBJ_CONSTRUCT(&orte_odls_globals.mutex, opal_mutex_t); OBJ_CONSTRUCT(&orte_odls_globals.cond, opal_condition_t); @@ -224,7 +218,7 @@ int orte_odls_base_open(void) orte_odls_globals.num_sockets++; } } - if (ORTE_PROC_IS_HNP && orte_odls_globals.report_bindings) { + if (ORTE_PROC_IS_HNP && orte_report_bindings) { opal_output(0, "System has detected external process binding to cores %04lx", orte_odls_globals.my_cores.bitmask[0]); } diff --git a/orte/mca/odls/base/odls_private.h b/orte/mca/odls/base/odls_private.h index 6690b2d44c..78ea4e04a6 100644 --- a/orte/mca/odls/base/odls_private.h +++ b/orte/mca/odls/base/odls_private.h @@ -66,8 +66,6 @@ typedef struct { opal_list_t xterm_ranks; /* the xterm cmd to be used */ char **xtermcmd; - /* whether or not to report bindings */ - bool report_bindings; /* any externally provided bindings */ opal_paffinity_base_cpu_set_t my_cores; /* flag whether or not we are bound */ diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index 4a52e4ada4..e168ac744b 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -113,7 +113,7 @@ orte_odls_base_module_t orte_odls_default_module = { #define ORTE_ODLS_IF_BIND_NOT_REQD(n) \ do { \ if (ORTE_BINDING_NOT_REQUIRED(jobdat->policy)) { \ - if (orte_odls_globals.report_bindings) { \ + if (orte_report_bindings) { \ orte_show_help("help-odls-default.txt", \ "odls-default:binding-not-avail", \ true, orte_process_info.nodename, \ @@ -308,7 +308,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, "odls-default:multiple-paffinity-schemes", true, child->slot_list); ORTE_ODLS_ERROR_OUT(ORTE_ERR_FATAL); } - if (orte_odls_globals.report_bindings) { + if (orte_report_bindings) { opal_output(0, "%s odls:default:fork binding child %s to slot_list %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(child->name), child->slot_list); @@ -463,7 +463,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, /* increment logical cpu */ logical_cpu += jobdat->stride; } - if (orte_odls_globals.report_bindings) { + if (orte_report_bindings) { opal_output(0, "%s odls:default:fork binding child %s to socket %d cpus %04lx", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(child->name), target_socket, mask.bitmask[0]); @@ -510,7 +510,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, /* increment logical cpu */ logical_cpu += jobdat->stride; } - if (orte_odls_globals.report_bindings) { + if (orte_report_bindings) { opal_output(0, "%s odls:default:fork binding child %s to cpus %04lx", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(child->name), mask.bitmask[0]); @@ -722,7 +722,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, "odls-default:could-not-bind-to-socket", true); ORTE_ODLS_ERROR_OUT(ORTE_ERR_FATAL); } - if (orte_odls_globals.report_bindings) { + if (orte_report_bindings) { opal_output(0, "%s odls:default:fork binding child %s to socket %d cpus %04lx", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(child->name), target_socket, mask.bitmask[0]); diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index e812f17132..28222d1283 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -1065,6 +1065,9 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, if (orte_leave_session_attached) { opal_argv_append(argc, argv, "--leave-session-attached"); } + if (orte_report_bindings) { + opal_argv_append(argc, argv, "--report-bindings"); + } if ((int)ORTE_VPID_INVALID != orted_debug_failure) { opal_argv_append(argc, argv, "--debug-failure"); diff --git a/orte/orted/orted_main.c b/orte/orted/orted_main.c index 18a0975c8f..262cdf69a9 100644 --- a/orte/orted/orted_main.c +++ b/orte/orted/orted_main.c @@ -208,6 +208,10 @@ opal_cmd_line_init_t orte_cmd_line_opts[] = { NULL, OPAL_CMD_LINE_TYPE_BOOL, "Bootstrap the connection to the HNP" }, + { "orte", "report", "bindings", '\0', "report-bindings", "report-bindings", 0, + NULL, OPAL_CMD_LINE_TYPE_BOOL, + "Whether to report process bindings to stderr" }, + /* End of list */ { NULL, NULL, NULL, '\0', NULL, NULL, 0, NULL, OPAL_CMD_LINE_TYPE_NULL, NULL } diff --git a/orte/runtime/orte_globals.c b/orte/runtime/orte_globals.c index a689e2143e..e72113dbcb 100644 --- a/orte/runtime/orte_globals.c +++ b/orte/runtime/orte_globals.c @@ -156,6 +156,9 @@ orte_mapping_policy_t orte_default_mapping_policy = 0; bool orte_report_events = false; char *orte_report_events_uri = NULL; +/* report bindings */ +bool orte_report_bindings = false; + #endif /* !ORTE_DISABLE_FULL_RTE */ int orte_debug_output = -1; diff --git a/orte/runtime/orte_globals.h b/orte/runtime/orte_globals.h index 9ada08c201..e8c0b35cf9 100644 --- a/orte/runtime/orte_globals.h +++ b/orte/runtime/orte_globals.h @@ -624,6 +624,9 @@ ORTE_DECLSPEC extern orte_mapping_policy_t orte_default_mapping_policy; ORTE_DECLSPEC extern bool orte_report_events; ORTE_DECLSPEC extern char *orte_report_events_uri; +/* report bindings */ +ORTE_DECLSPEC extern bool orte_report_bindings; + #endif /* ORTE_DISABLE_FULL_SUPPORT */ END_C_DECLS diff --git a/orte/runtime/orte_mca_params.c b/orte/runtime/orte_mca_params.c index 919d4288a2..8037c17cc8 100644 --- a/orte/runtime/orte_mca_params.c +++ b/orte/runtime/orte_mca_params.c @@ -402,6 +402,13 @@ int orte_register_params(void) ORTE_XSET_BINDING_POLICY(ORTE_BIND_TO_CORE); } + /* whether or not to report bindings */ + mca_base_param_reg_int_name("orte", "report_bindings", + "Report bindings", + false, false, + (int) false, &value); + orte_report_bindings = OPAL_INT_TO_BOOL(value); + /* tool communication controls */ mca_base_param_reg_string_name("orte", "report_events", "URI to which events are to be reported (default: NULL)]", diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index f370a0bffd..8f7de9b7c4 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -328,9 +328,9 @@ static opal_cmd_line_init_t cmd_line_init[] = { { "rmaps", "base", "stride", '\0', "stride", "stride", 1, NULL, OPAL_CMD_LINE_TYPE_INT, "When binding multiple cores to a rank, the step size to use between cores [default: 1]" }, - { "odls", "base", "report_bindings", '\0', "report-bindings", "report-bindings", 0, + { "orte", "report", "bindings", '\0', "report-bindings", "report-bindings", 0, NULL, OPAL_CMD_LINE_TYPE_BOOL, - "Whether to report process bindings to stderr [default: 0 = no]" }, + "Whether to report process bindings to stderr" }, /* Allocation options */ { "ras", "base", "display_alloc", '\0', "display-allocation", "display-allocation", 0,