Allow xgrid to compile.
This commit was SVN r19076.
Этот коммит содержится в:
родитель
1210a96d82
Коммит
a4d905db4a
@ -90,36 +90,35 @@ orte_plm_xgrid_make_nodes(orte_job_t *jdata)
|
|||||||
apps = (orte_app_context_t**)jdata->apps->addr;
|
apps = (orte_app_context_t**)jdata->apps->addr;
|
||||||
for(i = 0 ; i < jdata->num_apps ; i++) {
|
for(i = 0 ; i < jdata->num_apps ; i++) {
|
||||||
app = apps[i];
|
app = apps[i];
|
||||||
if (0 == app->num_procs) return ORTE_ERR_NOT_SUPPORTED;
|
if (0 == app->num_procs) return ORTE_ERR_NOT_SUPPORTED;
|
||||||
num_nodes += app->num_procs;
|
num_nodes += app->num_procs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create node entries for the orteds we're going to spawn. */
|
/* Create node entries for the orteds we're going to spawn. */
|
||||||
if (ORTE_SUCCESS != (rc = orte_pointer_array_set_size(orte_node_pool, num_nodes))) {
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_set_size(orte_node_pool, num_nodes))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
for (i = 0 ; i < num_nodes ; ++i) {
|
for (i = 0 ; i < num_nodes ; ++i) {
|
||||||
orte_node_t *node = OBJ_NEW(orte_node_t);
|
orte_node_t *node = OBJ_NEW(orte_node_t);
|
||||||
if (NULL == node) {
|
if (NULL == node) {
|
||||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||||
rc = ORTE_ERR_OUT_OF_RESOURCE;
|
rc = ORTE_ERR_OUT_OF_RESOURCE;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
asprintf(&node->name, "ompi-xgrid-node-%d", node_counter++);
|
asprintf(&node->name, "ompi-xgrid-node-%d", node_counter++);
|
||||||
node->state = ORTE_NODE_STATE_UP;
|
node->state = ORTE_NODE_STATE_UP;
|
||||||
node->slots_inuse = 0;
|
node->slots_inuse = 0;
|
||||||
node->slots_max = 0;
|
node->slots_max = 0;
|
||||||
node->slots = 1;
|
node->slots = 1;
|
||||||
node->allocate = true;
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_add(&node->index,
|
||||||
if (ORTE_SUCCESS != (rc = orte_pointer_array_add(&node->index,
|
orte_node_pool,
|
||||||
orte_node_pool,
|
(void*)node))) {
|
||||||
(void*)node))) {
|
ORTE_ERROR_LOG(rc);
|
||||||
ORTE_ERROR_LOG(rc);
|
return rc;
|
||||||
return rc;
|
}
|
||||||
}
|
/* update the total slots in the job */
|
||||||
/* update the total slots in the job */
|
jdata->total_slots_alloc += node->slots;
|
||||||
jdata->total_slots_alloc += node->slots;
|
|
||||||
}
|
}
|
||||||
jdata->oversubscribe_override = true;
|
jdata->oversubscribe_override = true;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user