Skip to content

Commit 5f3b0de

Browse files
author
Ralph Castain
committed
Fix hostfile filtering in allocated environments to preserve slot assignments
Refs #3984 Signed-off-by: Ralph Castain <[email protected]> (cherry picked from commit 2fbce9d)
1 parent 89bc5b7 commit 5f3b0de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

orte/util/hostfile/hostfile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
1313
* reserved.
1414
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
15-
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
15+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1616
* Copyright (c) 2015-2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2016 IBM Corporation. All rights reserved.
@@ -661,7 +661,6 @@ int orte_util_filter_hostfile_nodes(opal_list_t *nodes,
661661
orte_node_t *node = (orte_node_t*)item2;
662662
if (0 == strcmp(node_from_file->name, node->name)) {
663663
/* match - remove it */
664-
opal_output(0, "HOST %s ON EXCLUDE LIST - REMOVING", node->name);
665664
opal_list_remove_item(&newnodes, item2);
666665
OBJ_RELEASE(item2);
667666
break;
@@ -795,7 +794,8 @@ int orte_util_filter_hostfile_nodes(opal_list_t *nodes,
795794
* to the specified count - this allows people
796795
* to subdivide an allocation
797796
*/
798-
if (node_from_file->slots < node_from_list->slots) {
797+
if (ORTE_FLAG_TEST(node_from_file, ORTE_NODE_FLAG_SLOTS_GIVEN) &&
798+
node_from_file->slots < node_from_list->slots) {
799799
node_from_list->slots = node_from_file->slots;
800800
}
801801
if (remove) {

0 commit comments

Comments
 (0)