* when bringing over from branch, forgot to fix up for the local fork()
setup. Now uses fork() instead of ssh if the target nodename is the same as the current nodename (which will happen if the user gave "localhost" or just the hostname without the domain) or if the target nodename is local according to ompi_ifislocal() (which will happen if the user gave a FQDN) This commit was SVN r5916.
Этот коммит содержится в:
родитель
e7332d0521
Коммит
42f8ea9389
@ -378,26 +378,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
||||
char **exec_argv;
|
||||
|
||||
/* setup node name */
|
||||
/* this is a bit convoluted. If we are ssh'ing to the
|
||||
* current machine, we normally want to use the current
|
||||
* machine's nodename (aka hostname), so that ssh keys are
|
||||
* found correctly. In some situations (laptops that have
|
||||
* unresolveable names), we really want to use "localhost"
|
||||
* instead of nodename. But we don't want to use
|
||||
* "localhost" all the time, as it makes life difficult
|
||||
* with ssh keys on shared filesystems. Generally, if you
|
||||
* have a shared filesystem, you have a resolveable
|
||||
* nodename, so all should be good.
|
||||
*
|
||||
* ompi_ifislocal() will return false if the name isn't
|
||||
* resolveable (since it needs to resolve the name).
|
||||
*/
|
||||
if (0 == strcmp(node->node_name, orte_system_info.nodename) &&
|
||||
! ompi_ifislocal(node->node_name)) {
|
||||
argv[node_name_index1] = "localhost";
|
||||
} else {
|
||||
argv[node_name_index1] = node->node_name;
|
||||
}
|
||||
argv[node_name_index1] = node->node_name;
|
||||
argv[node_name_index2] = node->node_name;
|
||||
|
||||
/* initialize daemons process name */
|
||||
@ -420,8 +401,16 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
||||
char** env;
|
||||
char* var;
|
||||
|
||||
/* Is this a local launch? */
|
||||
if (ompi_ifislocal(node->node_name)) {
|
||||
/* Is this a local launch?
|
||||
*
|
||||
* Not all node names may be resolvable (if we found
|
||||
* localhost in the hostfile, for example). So first
|
||||
* check trivial case of node_name being same as the
|
||||
* current nodename, which must be local. If that doesn't
|
||||
* match, check using ifislocal().
|
||||
*/
|
||||
if (0 == strcmp(node->node_name, orte_system_info.nodename) ||
|
||||
ompi_ifislocal(node->node_name)) {
|
||||
exec_argv = &argv[local_exec_index];
|
||||
exec_path = ompi_path_findv(exec_argv[0], 0, environ, NULL);
|
||||
} else {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user