From 2bf47848938858fd5d39049b7307da5639930fca Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Thu, 20 Mar 2008 16:55:57 +0000 Subject: [PATCH] Set a meaningful orte_system_info.nodeid on Catamount This commit was SVN r17898. --- orte/mca/ess/cnos/ess_cnos_module.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/orte/mca/ess/cnos/ess_cnos_module.c b/orte/mca/ess/cnos/ess_cnos_module.c index 496e60a90d..71b5e570de 100644 --- a/orte/mca/ess/cnos/ess_cnos_module.c +++ b/orte/mca/ess/cnos/ess_cnos_module.c @@ -49,6 +49,8 @@ orte_ess_base_module_t orte_ess_cnos_module = { static int rte_init(char flags) { int rc; + cnos_nidpid_map_t *map; + int nprocs; /* Get our process information */ @@ -65,6 +67,15 @@ static int rte_init(char flags) /* Get the number of procs in the job from cnos */ orte_process_info.num_procs = (orte_std_cntr_t) cnos_get_size(); + /* Set the nodeid to the machine nid */ + nprocs = cnos_get_nidpid_map(&map); + if (nprocs <= 0) { + opal_output(0, "%5d: cnos_get_nidpid_map() returned %d", + cnos_get_rank(), nprocs); + return ORTE_ERR_FATAL; + } + orte_system_info.nodeid = map[cnos_get_rank()].nid; + /* MPI_Init needs the grpcomm framework, so we have to init it */ if (ORTE_SUCCESS != (rc = orte_grpcomm_base_open())) { ORTE_ERROR_LOG(rc);