Per request from IBM/Eclipse, provide MCA param to request output when nodes are resolved to a different nodename. This really only happens for the node that mpirun executes on, but they need the alert so they can do string matching of node names.
This commit was SVN r20032.
Этот коммит содержится в:
родитель
41c5ea73ff
Коммит
ff8e83ff3b
@ -116,8 +116,18 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
|
||||
*/
|
||||
hnp_node->slots_alloc = node->slots;
|
||||
/* use the local name for our node - don't trust what
|
||||
* we got from an RM
|
||||
* we got from an RM. If requested, display the resolved
|
||||
* nodename info
|
||||
*/
|
||||
if (orte_show_resolved_nodenames &&
|
||||
0 != strcmp(node->name, hnp_node->name)) {
|
||||
if (orte_xml_output) {
|
||||
opal_output(0, "<noderesolve name=\"%s\" resolved=\"%s\">", node->name, hnp_node->name);
|
||||
} else {
|
||||
opal_output(0, "node name %s resolved to %s", node->name, hnp_node->name);
|
||||
}
|
||||
}
|
||||
|
||||
/* update the total slots in the job */
|
||||
jdata->total_slots_alloc += hnp_node->slots;
|
||||
/* don't keep duplicate copy */
|
||||
|
@ -53,6 +53,7 @@ bool orted_spin_flag = false;
|
||||
bool orte_static_ports = false;
|
||||
bool orte_keep_fqdn_hostnames = false;
|
||||
bool orte_tag_output;
|
||||
bool orte_show_resolved_nodenames;
|
||||
int orted_debug_failure;
|
||||
int orted_debug_failure_delay;
|
||||
bool orte_homogeneous_nodes = false;
|
||||
|
@ -47,10 +47,10 @@
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
ORTE_DECLSPEC extern int orte_debug_verbosity;
|
||||
ORTE_DECLSPEC extern char *orte_prohibited_session_dirs;
|
||||
ORTE_DECLSPEC extern bool orte_xml_output;
|
||||
ORTE_DECLSPEC extern bool orte_help_want_aggregate;
|
||||
ORTE_DECLSPEC extern int orte_debug_verbosity; /* instantiated in orte/runtime/orte_init.c */
|
||||
ORTE_DECLSPEC extern char *orte_prohibited_session_dirs; /* instantiated in orte/runtime/orte_init.c */
|
||||
ORTE_DECLSPEC extern bool orte_xml_output; /* instantiated in orte/runtime/orte_globals.c */
|
||||
ORTE_DECLSPEC extern bool orte_help_want_aggregate; /* instantiated in orte/util/show_help.c */
|
||||
|
||||
/* Shortcut for some commonly used names */
|
||||
#define ORTE_NAME_WILDCARD (&orte_name_wildcard)
|
||||
@ -398,8 +398,7 @@ ORTE_DECLSPEC extern bool orte_static_ports;
|
||||
ORTE_DECLSPEC extern int32_t orte_contiguous_nodes;
|
||||
ORTE_DECLSPEC extern bool orte_keep_fqdn_hostnames;
|
||||
ORTE_DECLSPEC extern bool orte_tag_output;
|
||||
ORTE_DECLSPEC extern bool orte_xml_output;
|
||||
ORTE_DECLSPEC extern int orte_debug_verbosity;
|
||||
ORTE_DECLSPEC extern bool orte_show_resolved_nodenames;
|
||||
ORTE_DECLSPEC extern int orted_debug_failure;
|
||||
ORTE_DECLSPEC extern int orted_debug_failure_delay;
|
||||
ORTE_DECLSPEC extern bool orte_homogeneous_nodes;
|
||||
|
@ -181,6 +181,11 @@ int orte_register_params(void)
|
||||
false, false, (int) false, &value);
|
||||
orte_xml_output = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
mca_base_param_reg_int_name("orte", "show_resolved_nodenames",
|
||||
"Display any node names that are resolved to a different name (default: false)",
|
||||
false, false, (int) false, &value);
|
||||
orte_show_resolved_nodenames = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
mca_base_param_reg_int_name("orte", "hetero_apps",
|
||||
"Indicates that multiple app_contexts are being provided that are a mix of 32/64 bit binaries (default: false)",
|
||||
false, false, (int) false, &value);
|
||||
|
@ -32,6 +32,15 @@
|
||||
|
||||
#include "dash_host.h"
|
||||
|
||||
static void show_resolved_hostname(char *name, char *resolved)
|
||||
{
|
||||
if (orte_xml_output) {
|
||||
opal_output(0, "<noderesolve name=\"%s\" resolved=\"%s\">", name, resolved);
|
||||
} else {
|
||||
opal_output(0, "node name %s resolved to %s", name, resolved);
|
||||
}
|
||||
}
|
||||
|
||||
/* we can only enter this routine if no other allocation
|
||||
* was found, so we only need to know that finding any
|
||||
* relative node syntax should generate an immediate error
|
||||
@ -110,6 +119,10 @@ int orte_util_add_dash_host_nodes(opal_list_t *nodes,
|
||||
/* it is local, so use the local nodename to avoid
|
||||
* later confusion
|
||||
*/
|
||||
if (orte_show_resolved_nodenames &&
|
||||
0 != strcmp(mapped_nodes[i], orte_process_info.nodename)) {
|
||||
show_resolved_hostname(mapped_nodes[i], orte_process_info.nodename);
|
||||
}
|
||||
node->name = strdup(orte_process_info.nodename);
|
||||
} else {
|
||||
/* not local - use the given name */
|
||||
|
@ -49,6 +49,15 @@
|
||||
|
||||
static const char *cur_hostfile_name = NULL;
|
||||
|
||||
static void show_resolved_hostname(char *name, char *resolved)
|
||||
{
|
||||
if (orte_xml_output) {
|
||||
opal_output(0, "<noderesolve name=\"%s\" resolved=\"%s\">", name, resolved);
|
||||
} else {
|
||||
opal_output(0, "node name %s resolved to %s", name, resolved);
|
||||
}
|
||||
}
|
||||
|
||||
static void hostfile_parse_error(int token)
|
||||
{
|
||||
switch (token) {
|
||||
@ -181,6 +190,10 @@ static int hostfile_parse_line(int token, opal_list_t* updates, opal_list_t* exc
|
||||
/* convert this into something globally unique */
|
||||
if (strcmp(node_name, "localhost") == 0 || opal_ifislocal(node_name)) {
|
||||
/* Nodename has been allocated, that is for sure */
|
||||
if (orte_show_resolved_nodenames &&
|
||||
0 != strcmp(node_name, orte_process_info.nodename)) {
|
||||
show_resolved_hostname(node_name, orte_process_info.nodename);
|
||||
}
|
||||
free (node_name);
|
||||
node_name = strdup(orte_process_info.nodename);
|
||||
}
|
||||
@ -202,6 +215,10 @@ static int hostfile_parse_line(int token, opal_list_t* updates, opal_list_t* exc
|
||||
/* convert this into something globally unique */
|
||||
if (strcmp(node_name, "localhost") == 0 || opal_ifislocal(node_name)) {
|
||||
/* Nodename has been allocated, that is for sure */
|
||||
if (orte_show_resolved_nodenames &&
|
||||
0 != strcmp(node_name, orte_process_info.nodename)) {
|
||||
show_resolved_hostname(node_name, orte_process_info.nodename);
|
||||
}
|
||||
free (node_name);
|
||||
node_name = strdup(orte_process_info.nodename);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user