Skip to content

Commit 2820aef

Browse files
committed
Correctly propagate the oversubscribe flag to the spawnees
Signed-off-by: Aurélien Bouteiller <bouteill@icl.utk.edu>
1 parent 4fdf57a commit 2820aef

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

orte/mca/rmaps/base/rmaps_base_map_job.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2005 The University of Tennessee and The University
5+
* Copyright (c) 2004-2018 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -184,6 +184,7 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
184184
ORTE_SET_MAPPING_DIRECTIVE(jdata->map->mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
185185
} else {
186186
/* pass along the directive */
187+
ORTE_SET_MAPPING_DIRECTIVE(jdata->map->mapping, ORTE_MAPPING_SUBSCRIBE_GIVEN);
187188
if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping)) {
188189
ORTE_SET_MAPPING_DIRECTIVE(jdata->map->mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
189190
} else {

orte/mca/rmaps/round_robin/rmaps_rr_mappers.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2011 The University of Tennessee and The University
5+
* Copyright (c) 2004-2018 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -172,7 +172,14 @@ int orte_rmaps_rr_byslot(orte_job_t *jdata,
172172
--nxtra_nodes;
173173
}
174174
}
175-
num_procs_to_assign = node->slots - node->slots_inuse + extra_procs_to_assign;
175+
if(node->slots <= node->slots_inuse) {
176+
/* nodes are already oversubscribed */
177+
num_procs_to_assign = extra_procs_to_assign;
178+
}
179+
else {
180+
/* nodes have some room */
181+
num_procs_to_assign = node->slots - node->slots_inuse + extra_procs_to_assign;
182+
}
176183
opal_output_verbose(2, orte_rmaps_base_framework.framework_output,
177184
"mca:rmaps:rr:slot adding up to %d procs to node %s",
178185
num_procs_to_assign, node->name);

0 commit comments

Comments
 (0)