Skip to content

Commit

Permalink
Revert "Fix different issues when requesting memory per cpu/node."
Browse files Browse the repository at this point in the history
This reverts commit bf4cb0b.

Bug 5240, Bug 4895 and Bug 4976.
  • Loading branch information
asanchez1987 authored and dannyauble committed Jun 26, 2018
1 parent d8c5379 commit d52d8f4
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 293 deletions.
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ documents those changes that are of interest to users and administrators.
stage-out is completed.
-- Reorder proctrack/task plugin load in the slurmstepd to match that of slurmd
and avoid race condition calling task before proctrack can introduce.
qos as def_qos_id.
-- Prevent reboot of a busy KNL node when requesting inactive features.
-- Revert to previous behavior when requesting memory per cpu/node introduced
in 17.11.7.

* Changes in Slurm 17.11.7
==========================
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/sched/backfill/backfill.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,6 @@ static int _attempt_backfill(void)
continue;
}
job_ptr->part_ptr = part_ptr;
if (job_limits_check(&job_ptr, true) != WAIT_NO_REASON) {
/* should never happen */
continue;
}

if (debug_flags & DEBUG_FLAG_BACKFILL) {
char job_id_str[64];
Expand Down
18 changes: 17 additions & 1 deletion src/plugins/select/cons_res/job_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3858,7 +3858,23 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *node_bitmap,
for (i = 0; i < job_res->nhosts; i++) {
job_res->memory_allocated[i] = save_mem;
}
} else { /* --mem=0, allocate job all memory on node */
uint64_t avail_mem, lowest_mem = 0;
first = bit_ffs(job_res->node_bitmap);
if (first != -1)
last = bit_fls(job_res->node_bitmap);
else
last = first - 1;
for (i = first, j = 0; i <= last; i++) {
if (!bit_test(job_res->node_bitmap, i))
continue;
avail_mem = select_node_record[i].real_memory -
select_node_record[i].mem_spec_limit;
if ((j == 0) || (lowest_mem > avail_mem))
lowest_mem = avail_mem;
job_res->memory_allocated[j++] = avail_mem;
}
details_ptr->pn_min_memory = lowest_mem;
}

return error_code;
}

0 comments on commit d52d8f4

Please sign in to comment.