1
1

Set a meaningful orte_system_info.nodeid on Catamount

This commit was SVN r17898.
Этот коммит содержится в:
Brian Barrett 2008-03-20 16:55:57 +00:00
родитель f8a10dfb93
Коммит 2bf4784893

Просмотреть файл

@ -49,6 +49,8 @@ orte_ess_base_module_t orte_ess_cnos_module = {
static int rte_init(char flags) static int rte_init(char flags)
{ {
int rc; int rc;
cnos_nidpid_map_t *map;
int nprocs;
/* Get our process information */ /* Get our process information */
@ -65,6 +67,15 @@ static int rte_init(char flags)
/* Get the number of procs in the job from cnos */ /* Get the number of procs in the job from cnos */
orte_process_info.num_procs = (orte_std_cntr_t) cnos_get_size(); 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 */ /* MPI_Init needs the grpcomm framework, so we have to init it */
if (ORTE_SUCCESS != (rc = orte_grpcomm_base_open())) { if (ORTE_SUCCESS != (rc = orte_grpcomm_base_open())) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);