Instead of an odls-base mca param, make report_bindings a global param so that we can (a) detect it was set in the plm, and then (b) ensure it gets passed along to remote orteds so they will comply with the request.
This commit was SVN r22021.
Этот коммит содержится в:
родитель
47c9a5409e
Коммит
c749fefbd0
@ -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]);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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]);
|
||||
|
@ -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");
|
||||
|
@ -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 }
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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)]",
|
||||
|
@ -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,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user