From d3d34f8f15c686f8a583766b4e35f38c1a9822ed Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 2 Sep 2009 01:15:44 +0000 Subject: [PATCH] Correct a bug in the assignment of node index value. Ensure we set the app number so that MPI attributes get set correctly. This commit was SVN r21927. --- orte/mca/ess/slurmd/ess_slurmd_module.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/orte/mca/ess/slurmd/ess_slurmd_module.c b/orte/mca/ess/slurmd/ess_slurmd_module.c index 6e8b46d18c..3a78d94e46 100644 --- a/orte/mca/ess/slurmd/ess_slurmd_module.c +++ b/orte/mca/ess/slurmd/ess_slurmd_module.c @@ -173,6 +173,9 @@ static int rte_init(void) } orte_process_info.num_procs = strtol(envar, NULL, 10); + /* set the app_num so that MPI attributes get set correctly */ + orte_process_info.app_num = 1; + /* if this is SLURM 2.0 or above, get our port * assignments for use in the OOB */ @@ -273,7 +276,8 @@ static int rte_init(void) node = OBJ_NEW(orte_nid_t); node->name = strdup(nodes[i]); node->daemon = i; - node->index = opal_pointer_array_set_item(&orte_nidmap, i, node); + node->index = i; + opal_pointer_array_set_item(&orte_nidmap, i, node); } opal_argv_free(nodes);