From 5ec422dbc14b59d3e5c2d6c6ff05df9fe519c114 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 2 Oct 2013 01:46:09 +0000 Subject: [PATCH] Correctly compute num local peers when launched via mpirun This commit was SVN r29327. --- orte/util/nidmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/orte/util/nidmap.c b/orte/util/nidmap.c index 9db949b894..e370ddf6ad 100644 --- a/orte/util/nidmap.c +++ b/orte/util/nidmap.c @@ -822,6 +822,7 @@ int orte_util_decode_pidmap(opal_byte_object_t *bo) n = 1; /* cycle through the buffer */ OBJ_CONSTRUCT(&jobs, opal_list_t); + orte_process_info.num_local_peers = 0; while (ORTE_SUCCESS == (rc = opal_dss.unpack(&buf, &proc.jobid, &n, ORTE_JOBID))) { OPAL_OUTPUT_VERBOSE((2, orte_nidmap_output, "%s orte:util:decode:pidmap working job %s", @@ -886,6 +887,10 @@ int orte_util_decode_pidmap(opal_byte_object_t *bo) orte_process_info.cpuset = strdup(cpu_bitmap); } #endif + } else if (proc.jobid == ORTE_PROC_MY_NAME->jobid && + dmn.vpid == ORTE_PROC_MY_DAEMON->vpid) { + /* if we share a daemon, then add to my local peers */ + orte_process_info.num_local_peers++; } /* apps don't need the rest of the data in the buffer for this proc, * but we have to unpack it anyway to stay in sync @@ -981,7 +986,7 @@ int orte_util_decode_pidmap(opal_byte_object_t *bo) goto cleanup; } rc = ORTE_SUCCESS; - + cleanup: OBJ_DESTRUCT(&buf); return rc;