Fix the -H localhost issue
This commit was SVN r26071.
Этот коммит содержится в:
родитель
81dc6a11ee
Коммит
b2f1bade37
@ -1046,6 +1046,11 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
|
||||
}
|
||||
map = daemons->map;
|
||||
|
||||
/* zero-out the number of new daemons as we will compute this
|
||||
* each time we are called
|
||||
*/
|
||||
map->num_new_daemons = 0;
|
||||
|
||||
/* run the allocator on the application job - this allows us to
|
||||
* pickup any host or hostfile arguments so we get the full
|
||||
* array of nodes in our allocation
|
||||
@ -1086,6 +1091,18 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
|
||||
}
|
||||
}
|
||||
|
||||
/* if we didn't get anything, then we are the only node in the
|
||||
* allocation - so there is nothing else to do as no other
|
||||
* daemons are to be launched
|
||||
*/
|
||||
if (0 == opal_list_get_size(&nodes)) {
|
||||
OPAL_OUTPUT_VERBOSE((5, orte_plm_globals.output,
|
||||
"%s plm:base:setup_vm only HNP in allocation",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
||||
OBJ_DESTRUCT(&nodes);
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* is there a default hostfile? */
|
||||
if (NULL != orte_default_hostfile) {
|
||||
/* yes - filter the node list through the file, marking
|
||||
@ -1134,10 +1151,17 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
|
||||
}
|
||||
}
|
||||
|
||||
/* zero-out the number of new daemons as we will compute this
|
||||
* each time we are called
|
||||
/* if we didn't get anything, then we are the only node in the
|
||||
* allocation - so there is nothing else to do as no other
|
||||
* daemons are to be launched
|
||||
*/
|
||||
map->num_new_daemons = 0;
|
||||
if (0 == opal_list_get_size(&nodes)) {
|
||||
OPAL_OUTPUT_VERBOSE((5, orte_plm_globals.output,
|
||||
"%s plm:base:setup_vm only HNP left",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
||||
OBJ_DESTRUCT(&nodes);
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* cycle thru all available nodes and find those that do not already
|
||||
* have a daemon on them - no need to include our own as we are
|
||||
|
@ -240,7 +240,7 @@ int orte_util_filter_dash_host_nodes(opal_list_t *nodes,
|
||||
orte_std_cntr_t i, j, len_mapped_node=0;
|
||||
int rc;
|
||||
char **mapped_nodes = NULL;
|
||||
orte_node_t *node;
|
||||
orte_node_t *node, *hnp_node;
|
||||
int num_empty=0;
|
||||
opal_list_t keep;
|
||||
bool want_all_empty=false;
|
||||
@ -266,6 +266,9 @@ int orte_util_filter_dash_host_nodes(opal_list_t *nodes,
|
||||
* nodes list ONCE.
|
||||
*/
|
||||
|
||||
/* get the hnp node's info */
|
||||
hnp_node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
|
||||
|
||||
len_mapped_node = opal_argv_count(mapped_nodes);
|
||||
/* setup a working list so we can put the final list
|
||||
* of nodes in order. This way, if the user specifies a
|
||||
@ -333,9 +336,9 @@ int orte_util_filter_dash_host_nodes(opal_list_t *nodes,
|
||||
node = (orte_node_t*)item;
|
||||
/* search -host list to see if this one is found */
|
||||
found = false;
|
||||
if ((0 == strcmp(node->name, mapped_nodes[i]) ||
|
||||
(0 == strcmp(node->name, orte_process_info.nodename) &&
|
||||
(0 == strcmp(mapped_nodes[i], "localhost") || opal_ifislocal(mapped_nodes[i]))))) {
|
||||
if (0 == strcmp(node->name, mapped_nodes[i]) ||
|
||||
(0 == strcmp(node->name, hnp_node->name) &&
|
||||
(0 == strcasecmp(mapped_nodes[i], "localhost") || opal_ifislocal(mapped_nodes[i])))) {
|
||||
if (remove) {
|
||||
/* remove item from list */
|
||||
opal_list_remove_item(nodes, item);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user