Skip to content
Snippets Groups Projects
Commit 7069dc4b authored by Moe Jette's avatar Moe Jette
Browse files

Fix bug in handling job request with maximum node count.

parent 297a13ce
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ documents those changes that are of interest to users and admins.
slowness when booting many bglblocks at the same time.
-- Added logic to return scheduled nodes to Maui scheduler (David
Jackson, Cluster Resources)
-- Fix bug in handling job request with maximum node count.
* Changes in SLURM 0.6.0-pre4
=============================
......
......@@ -327,7 +327,8 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t *bitmap,
* then down from the required nodes */
for (i = best_fit_req;
i <= consec_end[best_fit_location]; i++) {
if ((rem_nodes <= 0) && (rem_cpus <= 0))
if ((rem_nodes <= 0)
&& ((rem_cpus <= 0) || max_nodes))
break;
if (bit_test(bitmap, i))
continue;
......@@ -342,7 +343,8 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t *bitmap,
}
for (i = (best_fit_req - 1);
i >= consec_start[best_fit_location]; i--) {
if ((rem_nodes <= 0) && (rem_cpus <= 0))
if ((rem_nodes <= 0)
&& ((rem_cpus <= 0) || max_nodes))
break;
/* if (bit_test(bitmap, i))
continue; cleared above earlier */
......@@ -358,7 +360,8 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t *bitmap,
} else {
for (i = consec_start[best_fit_location];
i <= consec_end[best_fit_location]; i++) {
if ((rem_nodes <= 0) && (rem_cpus <= 0))
if ((rem_nodes <= 0)
&& ((rem_cpus <= 0) || max_nodes))
break;
if (bit_test(bitmap, i))
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment