Skip to content

Commit 4e5e8be

Browse files
author
Ralph Castain
authored
Merge pull request #3520 from rhc54/topic/slotsalloc
Fix total_slots_allocated computation
2 parents 9f317f0 + 29e083b commit 4e5e8be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

orte/mca/plm/base/plm_base_launch_support.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata)
150150
if (!orte_managed_allocation) {
151151
if (NULL != orte_set_slots &&
152152
0 != strncmp(orte_set_slots, "none", strlen(orte_set_slots))) {
153+
caddy->jdata->total_slots_alloc = 0;
153154
for (i=0; i < orte_node_pool->size; i++) {
154155
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
155156
continue;
@@ -160,6 +161,7 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata)
160161
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), node->name, orte_set_slots));
161162
orte_plm_base_set_slots(node);
162163
}
164+
caddy->jdata->total_slots_alloc += node->slots;
163165
}
164166
}
165167
}

orte/mca/rmaps/base/rmaps_base_map_job.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,9 @@ void orte_rmaps_base_display_map(orte_job_t *jdata)
520520
}
521521
}
522522
} else {
523-
opal_output(orte_clean_output, " Data for JOB %s offset %s", ORTE_JOBID_PRINT(jdata->jobid), ORTE_VPID_PRINT(jdata->offset));
523+
opal_output(orte_clean_output, " Data for JOB %s offset %s Total slots allocated %lu",
524+
ORTE_JOBID_PRINT(jdata->jobid), ORTE_VPID_PRINT(jdata->offset),
525+
(long unsigned)jdata->total_slots_alloc);
524526
opal_dss.print(&output, NULL, jdata->map, ORTE_JOB_MAP);
525527
if (orte_xml_output) {
526528
fprintf(orte_xml_fp, "%s\n", output);

0 commit comments

Comments
 (0)