Silence warnings
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
1adf0873f7
Коммит
73ef976ead
@ -12,7 +12,7 @@
|
||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -140,8 +140,8 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
|
||||
orte_app_context_t *app, orte_mapping_policy_t policy,
|
||||
bool initial_map, bool silent)
|
||||
{
|
||||
opal_list_item_t *item, *next;
|
||||
orte_node_t *node, *nd, *nptr;
|
||||
opal_list_item_t *item;
|
||||
orte_node_t *node, *nd, *nptr, *next;
|
||||
orte_std_cntr_t num_slots;
|
||||
orte_std_cntr_t i;
|
||||
int rc;
|
||||
@ -470,17 +470,13 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
|
||||
num_slots = opal_list_get_size(allocated_nodes); // tell the mapper there is one slot/node for debuggers
|
||||
} else {
|
||||
item = opal_list_get_first(allocated_nodes);
|
||||
while (item != opal_list_get_end(allocated_nodes)) {
|
||||
node = (orte_node_t*)item;
|
||||
/** save the next pointer in case we remove this node */
|
||||
next = opal_list_get_next(item);
|
||||
OPAL_LIST_FOREACH_SAFE(node, next, allocated_nodes, orte_node_t) {
|
||||
/* if the hnp was not allocated, or flagged not to be used,
|
||||
* then remove it here */
|
||||
if (!orte_hnp_is_allocated || (ORTE_GET_MAPPING_DIRECTIVE(policy) & ORTE_MAPPING_NO_USE_LOCAL)) {
|
||||
if (0 == node->index) {
|
||||
opal_list_remove_item(allocated_nodes, item);
|
||||
OBJ_RELEASE(item); /* "un-retain" it */
|
||||
item = next;
|
||||
opal_list_remove_item(allocated_nodes, &node->super);
|
||||
OBJ_RELEASE(node); /* "un-retain" it */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -490,9 +486,8 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
|
||||
"%s Removing node %s: max %d inuse %d",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||
node->name, node->slots_max, node->slots_inuse));
|
||||
opal_list_remove_item(allocated_nodes, item);
|
||||
OBJ_RELEASE(item); /* "un-retain" it */
|
||||
item = next;
|
||||
opal_list_remove_item(allocated_nodes, &node->super);
|
||||
OBJ_RELEASE(node); /* "un-retain" it */
|
||||
continue;
|
||||
}
|
||||
if (node->slots <= node->slots_inuse &&
|
||||
@ -502,9 +497,8 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
|
||||
"%s Removing node %s slots %d inuse %d",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||
node->name, node->slots, node->slots_inuse));
|
||||
opal_list_remove_item(allocated_nodes, item);
|
||||
OBJ_RELEASE(item); /* "un-retain" it */
|
||||
item = next;
|
||||
opal_list_remove_item(allocated_nodes, &node->super);
|
||||
OBJ_RELEASE(node); /* "un-retain" it */
|
||||
continue;
|
||||
}
|
||||
if (node->slots > node->slots_inuse) {
|
||||
@ -514,7 +508,6 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||
node->name, node->slots - node->slots_inuse));
|
||||
num_slots += node->slots - node->slots_inuse;
|
||||
item = next;
|
||||
continue;
|
||||
}
|
||||
if (!(ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(policy))) {
|
||||
@ -528,11 +521,9 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
|
||||
node->name));
|
||||
} else {
|
||||
/* if we cannot use it, remove it from list */
|
||||
opal_list_remove_item(allocated_nodes, item);
|
||||
OBJ_RELEASE(item); /* "un-retain" it */
|
||||
opal_list_remove_item(allocated_nodes, &node->super);
|
||||
OBJ_RELEASE(node); /* "un-retain" it */
|
||||
}
|
||||
/** go on to next item */
|
||||
item = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user