[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-327-gcd5b43b

mysql vizuser noreply at mpich.org
Sun Jul 7 09:44:20 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  cd5b43b2323661a6f25d29647784b66fb152a723 (commit)
       via  d1a023411d28ba68a9b73ea7746919d763410291 (commit)
       via  ba6b50462c61fe0b35b4614ecc2d2570423b714c (commit)
      from  01569bddc81323b636ba0ad776d29059c32fd9a1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/cd5b43b2323661a6f25d29647784b66fb152a723

commit cd5b43b2323661a6f25d29647784b66fb152a723
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun Jul 7 09:42:44 2013 -0500

    Added a file to OpenPA .gitignore.

diff --git a/src/openpa/.gitignore b/src/openpa/.gitignore
index 5aeafe7..c40b720 100644
--- a/src/openpa/.gitignore
+++ b/src/openpa/.gitignore
@@ -6,6 +6,7 @@ _configs.sed
 aclocal.m4
 autom4te.cache/
 confdb/ar-lib
+confdb/compile
 confdb/config.guess
 confdb/config.sub
 confdb/depcomp

http://git.mpich.org/mpich.git/commitdiff/d1a023411d28ba68a9b73ea7746919d763410291

commit d1a023411d28ba68a9b73ea7746919d763410291
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sat Jul 6 23:32:32 2013 -0500

    Remove caching wrapper for gethostname.
    
    This was added for terrible systems that rely on a slow DNS server to
    look up the local hostname.  Most OSs do a much better job setting
    local host names in the local /etc/hosts file today.  Even if they
    don't, we no longer do a large number of lookups anymore, so this
    should not be a problem.

diff --git a/src/pm/hydra/include/hydra.h b/src/pm/hydra/include/hydra.h
index ce27f26..685c3eb 100644
--- a/src/pm/hydra/include/hydra.h
+++ b/src/pm/hydra/include/hydra.h
@@ -553,7 +553,6 @@ HYD_status HYDU_create_process(char **client_arg, struct HYD_env *env_list,
 /* others */
 int HYDU_dceil(int x, int y);
 HYD_status HYDU_add_to_node_list(const char *hostname, int num_procs, struct HYD_node **node_list);
-HYD_status HYDU_gethostname(char *hostname);
 void HYDU_delay(unsigned long delay);
 
 /* signals */
diff --git a/src/pm/hydra/ui/mpich/mpiexec.c b/src/pm/hydra/ui/mpich/mpiexec.c
index 653d3cd..34c9763 100644
--- a/src/pm/hydra/ui/mpich/mpiexec.c
+++ b/src/pm/hydra/ui/mpich/mpiexec.c
@@ -184,8 +184,8 @@ int main(int argc, char **argv)
             char localhost[MAX_HOSTNAME_LEN] = { 0 };
 
             /* The RMK didn't give us anything back; use localhost */
-            status = HYDU_gethostname(localhost);
-            HYDU_ERR_POP(status, "unable to get local hostname\n");
+            if (gethostname(localhost, MAX_HOSTNAME_LEN) < 0)
+                HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR, "unable to get local hostname\n");
 
             status = HYDU_add_to_node_list(localhost, 1, &HYD_server_info.node_list);
             HYDU_ERR_POP(status, "unable to add to node list\n");
@@ -293,8 +293,8 @@ int main(int argc, char **argv)
             HYD_server_info.localhost = HYDU_strdup(node->hostname);
         else {
             HYDU_MALLOC(HYD_server_info.localhost, char *, MAX_HOSTNAME_LEN, status);
-            status = HYDU_gethostname(HYD_server_info.localhost);
-            HYDU_ERR_POP(status, "unable to get local hostname\n");
+            if (gethostname(HYD_server_info.localhost, MAX_HOSTNAME_LEN) < 0)
+                HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR, "unable to get local hostname\n");
         }
     }
 
diff --git a/src/pm/hydra/ui/mpich/utils.c b/src/pm/hydra/ui/mpich/utils.c
index a84d9da..f012374 100644
--- a/src/pm/hydra/ui/mpich/utils.c
+++ b/src/pm/hydra/ui/mpich/utils.c
@@ -336,8 +336,8 @@ static HYD_status mfile_fn(char *arg, char ***argv)
         HYDU_ERR_POP(status, "error parsing hostfile\n");
     }
     else {
-        status = HYDU_gethostname(localhost);
-        HYDU_ERR_POP(status, "unable to get local hostname\n");
+        if (gethostname(localhost, MAX_HOSTNAME_LEN) < 0)
+            HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR, "unable to get local hostname\n");
 
         status = HYDU_add_to_node_list(localhost, 1, &HYD_server_info.node_list);
         HYDU_ERR_POP(status, "unable to add to node list\n");
diff --git a/src/pm/hydra/utils/dbg/dbg.c b/src/pm/hydra/utils/dbg/dbg.c
index 49b66d1..5fada6d 100644
--- a/src/pm/hydra/utils/dbg/dbg.c
+++ b/src/pm/hydra/utils/dbg/dbg.c
@@ -15,8 +15,8 @@ HYD_status HYDU_dbg_init(const char *str)
 
     HYDU_mem_init();
 
-    status = HYDU_gethostname(hostname);
-    HYDU_ERR_POP(status, "unable to get local host name\n");
+    if (gethostname(hostname, MAX_HOSTNAME_LEN) < 0)
+        HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR, "unable to get local host name\n");
 
     HYDU_MALLOC(HYD_dbg_prefix, char *, strlen(hostname) + 1 + strlen(str) + 1, status);
     HYDU_snprintf(HYD_dbg_prefix, strlen(hostname) + 1 + strlen(str) + 1, "%s@%s", str, hostname);
diff --git a/src/pm/hydra/utils/others/others.c b/src/pm/hydra/utils/others/others.c
index 4d0287d..3216e46 100644
--- a/src/pm/hydra/utils/others/others.c
+++ b/src/pm/hydra/utils/others/others.c
@@ -58,34 +58,6 @@ HYD_status HYDU_add_to_node_list(const char *hostname, int num_procs, struct HYD
     goto fn_exit;
 }
 
-/* This function just adds a simple caching logic to gethostname to
- * avoid hitting the DNS too many times */
-HYD_status HYDU_gethostname(char *hostname)
-{
-    static char localhost[MAX_HOSTNAME_LEN] = { 0 };
-    HYD_status status = HYD_SUCCESS;
-
-    HYDU_FUNC_ENTER();
-
-    if (strcmp(localhost, "")) {
-        HYDU_snprintf(hostname, MAX_HOSTNAME_LEN, "%s", localhost);
-        goto fn_exit;
-    }
-
-    if (gethostname(hostname, MAX_HOSTNAME_LEN) < 0)
-        HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR,
-                            "gethostname error (hostname: %s; errno: %d)\n", hostname, errno);
-
-    HYDU_snprintf(localhost, MAX_HOSTNAME_LEN, "%s", hostname);
-
-  fn_exit:
-    HYDU_FUNC_EXIT();
-    return status;
-
-  fn_fail:
-    goto fn_exit;
-}
-
 void HYDU_delay(unsigned long delay)
 {
     struct timeval start, end;
diff --git a/src/pm/hydra/utils/sock/sock.c b/src/pm/hydra/utils/sock/sock.c
index 6c33727..bc5af12 100644
--- a/src/pm/hydra/utils/sock/sock.c
+++ b/src/pm/hydra/utils/sock/sock.c
@@ -164,8 +164,8 @@ HYD_status HYDU_sock_connect(const char *host, uint16_t port, int *fd, int retri
     if (ret < 0) {
         char localhost[MAX_HOSTNAME_LEN] = { 0 };
 
-        status = HYDU_gethostname(localhost);
-        HYDU_ERR_POP(status, "unable to get local hostname\n");
+        if (gethostname(localhost, MAX_HOSTNAME_LEN) < 0)
+            HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR, "unable to get local hostname\n");
 
         HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR,
                             "unable to connect from \"%s\" to \"%s\" (%s)\n",
@@ -649,8 +649,8 @@ HYDU_sock_create_and_listen_portstr(char *iface, char *hostname, char *port_rang
     else {
         char localhost[MAX_HOSTNAME_LEN] = { 0 };
 
-        status = HYDU_gethostname(localhost);
-        HYDU_ERR_POP(status, "unable to get local hostname\n");
+        if (gethostname(localhost, MAX_HOSTNAME_LEN) < 0)
+            HYDU_ERR_SETANDJUMP(status, HYD_SOCK_ERROR, "unable to get local hostname\n");
 
         ip = HYDU_strdup(localhost);
     }

http://git.mpich.org/mpich.git/commitdiff/ba6b50462c61fe0b35b4614ecc2d2570423b714c

commit ba6b50462c61fe0b35b4614ecc2d2570423b714c
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sat Jul 6 22:31:07 2013 -0500

    Correct error string.

diff --git a/src/mpi/errhan/errnames.txt b/src/mpi/errhan/errnames.txt
index 127f150..c621050 100644
--- a/src/mpi/errhan/errnames.txt
+++ b/src/mpi/errhan/errnames.txt
@@ -876,9 +876,9 @@ is too big (> MPIU_SHMW_GHND_SZ)
 
 **toomanynbc: too many outstanding nonblocking collectives detected
 
-**ifname_and_hostname:Only one of MPICH_INTERFACE_HOSTNAME and MPICH_NETWORK_IFACE environment variables are allowed, but both were set.
-**iface_notfound:The network interface specified in MPICH_NETWORK_IFACE was not found.
-**iface_notfound %s:The network interface, \"%s\", specified in MPICH_NETWORK_IFACE was not found.
+**ifname_and_hostname:Only one of MPIR_PARAM_CH3_INTERFACE_HOSTNAME and MPIR_PARAM_CH3_NETWORK_IFACE environment variables are allowed, but both were set.
+**iface_notfound:The network interface specified in MPIR_PARAM_CH3_NETWORK_IFACE was not found.
+**iface_notfound %s:The network interface, \"%s\", specified in MPIR_PARAM_CH3_NETWORK_IFACE was not found.
 
 **procnamefailed:Failed to get processor name
 

-----------------------------------------------------------------------

Summary of changes:
 src/mpi/errhan/errnames.txt        |    6 +++---
 src/openpa/.gitignore              |    1 +
 src/pm/hydra/include/hydra.h       |    1 -
 src/pm/hydra/ui/mpich/mpiexec.c    |    8 ++++----
 src/pm/hydra/ui/mpich/utils.c      |    4 ++--
 src/pm/hydra/utils/dbg/dbg.c       |    4 ++--
 src/pm/hydra/utils/others/others.c |   28 ----------------------------
 src/pm/hydra/utils/sock/sock.c     |    8 ++++----
 8 files changed, 16 insertions(+), 44 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list