1
1

If sensors are enabled, then the daemons need to have their proc->node field linked to their local node object

This commit was SVN r27991.
Этот коммит содержится в:
Ralph Castain 2013-01-31 16:38:57 +00:00
родитель c87fa68f9b
Коммит ca9605773b
2 изменённых файлов: 9 добавлений и 3 удалений

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

@ -498,6 +498,10 @@ int orte_ess_base_orted_setup(char **hosts)
node->daemon_launched = true; node->daemon_launched = true;
node->state = ORTE_NODE_STATE_UP; node->state = ORTE_NODE_STATE_UP;
/* now point our proc node field to the node */
OBJ_RETAIN(node); /* keep accounting straight */
proc->node = node;
/* record that the daemon job is running */ /* record that the daemon job is running */
jdata->num_procs = 1; jdata->num_procs = 1;
jdata->state = ORTE_JOB_STATE_RUNNING; jdata->state = ORTE_JOB_STATE_RUNNING;

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

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
* *
* $COPYRIGHT$ * $COPYRIGHT$
* *
@ -23,6 +23,7 @@
#include "opal/util/output.h" #include "opal/util/output.h"
#include "opal/class/opal_pointer_array.h" #include "opal/class/opal_pointer_array.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/sensor/base/base.h" #include "orte/mca/sensor/base/base.h"
#include "orte/mca/sensor/base/sensor_private.h" #include "orte/mca/sensor/base/sensor_private.h"
@ -45,7 +46,6 @@ int orte_sensor_base_select(void)
orte_sensor_active_module_t *i_module; orte_sensor_active_module_t *i_module;
opal_list_item_t *item; opal_list_item_t *item;
int priority = 0, i, j, low_i; int priority = 0, i, j, low_i;
int exit_status = OPAL_SUCCESS;
opal_pointer_array_t tmp_array; opal_pointer_array_t tmp_array;
bool none_found; bool none_found;
orte_sensor_active_module_t *tmp_module = NULL, *tmp_module_sw = NULL; orte_sensor_active_module_t *tmp_module = NULL, *tmp_module_sw = NULL;
@ -127,9 +127,11 @@ int orte_sensor_base_select(void)
orte_sensor_base.my_node = OBJ_NEW(orte_node_t); orte_sensor_base.my_node = OBJ_NEW(orte_node_t);
} else { } else {
if (NULL == (orte_sensor_base.my_proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, ORTE_PROC_MY_NAME->vpid))) { if (NULL == (orte_sensor_base.my_proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, ORTE_PROC_MY_NAME->vpid))) {
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
return ORTE_ERR_NOT_FOUND; return ORTE_ERR_NOT_FOUND;
} }
if (NULL == (orte_sensor_base.my_node = orte_sensor_base.my_proc->node)) { if (NULL == (orte_sensor_base.my_node = orte_sensor_base.my_proc->node)) {
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
return ORTE_ERR_NOT_FOUND; return ORTE_ERR_NOT_FOUND;
} }
/* protect the objects */ /* protect the objects */
@ -193,5 +195,5 @@ int orte_sensor_base_select(void)
} }
} }
return exit_status; return ORTE_SUCCESS;
} }