1
1

* Be nice to users and resolve "localhost" or "127.0.0.1" to the current

node, since the default hostfile shipped with Open MPI contains only
  "localhost".  This is performed after all the other checks, so it should
  only get activated as a last-ditch effort.

This commit was SVN r3758.
Этот коммит содержится в:
Brian Barrett 2004-12-09 06:01:41 +00:00
родитель c0f7b4580e
Коммит 017d39a633

Просмотреть файл

@ -21,6 +21,7 @@
#include <fcntl.h>
#include <sys/bproc.h>
#include <sys/wait.h>
#include <string.h>
#include "pcm_bproc.h"
#include "mca/pcm/pcm.h"
@ -288,6 +289,12 @@ internal_set_nodelist(ompi_list_t *host_list,
}
have_node_list_entry:
/* last ditch, see if we have a localhost entry */
if (strncmp("localhost", host->hostname, strlen("localhost")) == 0 ||
strcmp("127.0.0.1", host->hostname) == 0) {
resolved_node = bproc_currnode();
}
if (BPROC_NODE_NONE == resolved_node) {
printf("Unable to resolve node %s\n", host->hostname);
return OMPI_ERR_NOT_FOUND;