[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-333-g8ca555c

Service Account noreply at mpich.org
Fri Jul 1 13:30:49 CDT 2016


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  8ca555ce63610a63e8cd2b13f160a515346caf64 (commit)
      from  061ffef7e66f397708a3e4be7b62a8000b117c09 (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/8ca555ce63610a63e8cd2b13f160a515346caf64

commit 8ca555ce63610a63e8cd2b13f160a515346caf64
Author: Yanfei Guo <yguo at anl.gov>
Date:   Fri Jul 1 10:00:29 2016 -0500

    CH3: fix fallback algorithm for populating node ids
    
    No Reviewer.

diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index ce3db9d..aa70c6a 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -1141,7 +1141,7 @@ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank)
         node_names[i][0] = '\0';
     }
 
-    g_max_node_id = 0; /* defensive */
+    g_max_node_id = -1; /* defensive */
 
     for (i = 0; i < pg->size; ++i)
     {
@@ -1149,14 +1149,14 @@ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank)
         if (i == our_pg_rank)
         {
             /* This is us, no need to perform a get */
-            MPL_snprintf(node_names[g_max_node_id], key_max_sz, "%s", MPIU_hostname);
+            MPL_snprintf(node_names[g_max_node_id+1], key_max_sz, "%s", MPIU_hostname);
         }
         else
         {
             memset(key, 0, key_max_sz);
             MPL_snprintf(key, key_max_sz, "hostname[%d]", i);
 
-            pmi_errno = PMI_KVS_Get(kvs_name, key, node_names[g_max_node_id], key_max_sz);
+            pmi_errno = PMI_KVS_Get(kvs_name, key, node_names[g_max_node_id+1], key_max_sz);
             MPIR_ERR_CHKANDJUMP1(pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get", "**pmi_kvs_get %d", pmi_errno);
         }
 
@@ -1165,12 +1165,12 @@ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank)
         /* The right fix is to get all this information from the process
            manager, rather than bother with this hostname hack at all. */
         for (j = 0; j < g_max_node_id + 1; ++j)
-            if (!strncmp(node_names[j], node_names[g_max_node_id], key_max_sz))
+            if (!strncmp(node_names[j], node_names[g_max_node_id+1], key_max_sz))
                 break;
         if (j == g_max_node_id + 1)
             ++g_max_node_id;
         else
-            node_names[g_max_node_id][0] = '\0';
+            node_names[g_max_node_id+1][0] = '\0';
         pg->vct[i].node_id = j;
     }
 

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

Summary of changes:
 src/mpid/ch3/src/mpid_vc.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list