Ensure that rankfile-provided allocations are correctly handled
Fixes trac:4043 cmr=v1.7.4:reviewer=jsquyres:subject=Ensure that rankfile-provided allocations are correctly handled This commit was SVN r30106. The following Trac tickets were found above: Ticket 4043 --> https://svn.open-mpi.org/trac/ompi/ticket/4043
Этот коммит содержится в:
родитель
871f4e519c
Коммит
3f2b3c53ea
@ -261,6 +261,22 @@ void orte_ras_base_allocate(int fd, short args, void *cbdata)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (NULL != orte_rankfile) {
|
||||
OPAL_OUTPUT_VERBOSE((5, orte_ras_base_framework.framework_output,
|
||||
"%s ras:base:allocate parsing rankfile %s",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||
orte_rankfile));
|
||||
|
||||
/* a rankfile was provided - parse it */
|
||||
if (ORTE_SUCCESS != (rc = orte_util_add_hostfile_nodes(&nodes,
|
||||
orte_rankfile))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_DESTRUCT(&nodes);
|
||||
ORTE_FORCED_TERMINATE(ORTE_ERROR_DEFAULT_EXIT_CODE);
|
||||
OBJ_RELEASE(caddy);
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (i=0; i < jdata->apps->size; i++) {
|
||||
if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) {
|
||||
continue;
|
||||
|
@ -152,9 +152,10 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
|
||||
} else {
|
||||
/* insert the object onto the orte_nodes global array */
|
||||
OPAL_OUTPUT_VERBOSE((5, orte_ras_base_framework.framework_output,
|
||||
"%s ras:base:node_insert node %s",
|
||||
"%s ras:base:node_insert node %s slots %d",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||
(NULL == node->name) ? "NULL" : node->name));
|
||||
(NULL == node->name) ? "NULL" : node->name,
|
||||
node->slots));
|
||||
if (orte_managed_allocation) {
|
||||
/* the slots are always treated as sacred
|
||||
* in managed allocations
|
||||
|
@ -301,6 +301,13 @@ static int hostfile_parse_line(int token, opal_list_t* updates, opal_list_t* exc
|
||||
}
|
||||
/* add a slot */
|
||||
node->slots++;
|
||||
/* mark the slots as "given" since we take them as being the
|
||||
* number specified via the rankfile
|
||||
*/
|
||||
node->slots_given = true;
|
||||
OPAL_OUTPUT_VERBOSE((1, orte_ras_base_framework.framework_output,
|
||||
"%s hostfile: node %s slots %d",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), node->name, node->slots));
|
||||
/* do we need to record an alias for this node? */
|
||||
if (NULL != node_alias) {
|
||||
/* add to list of aliases for this node - only add if unique */
|
||||
@ -567,6 +574,9 @@ int orte_util_add_hostfile_nodes(opal_list_t *nodes,
|
||||
}
|
||||
if (!found) {
|
||||
opal_list_append(nodes, &nd->super);
|
||||
OPAL_OUTPUT_VERBOSE((1, orte_ras_base_framework.framework_output,
|
||||
"%s hostfile: adding node %s slots %d",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), nd->name, nd->slots));
|
||||
} else {
|
||||
OBJ_RELEASE(item);
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user