Skip to content
Snippets Groups Projects
Commit 51baccdd authored by Moe Jette's avatar Moe Jette
Browse files
parent 275f36dd
No related branches found
No related tags found
No related merge requests found
...@@ -117,6 +117,9 @@ documents those changes that are of interest to users and admins. ...@@ -117,6 +117,9 @@ documents those changes that are of interest to users and admins.
-- For a job step, add support for srun's --nodelist and --exclusive options -- For a job step, add support for srun's --nodelist and --exclusive options
to be used together. to be used together.
-- On slurmstepd failure, set node state to DRAIN rather than DOWN. -- On slurmstepd failure, set node state to DRAIN rather than DOWN.
-- Fix bug in select/cons_res that would incorrectly satify a tasks's
--cpus-per-task specification by allocating the task CPUs on more than
one node.
* Changes in SLURM 1.3.11 * Changes in SLURM 1.3.11
========================= =========================
......
...@@ -1135,9 +1135,25 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, ...@@ -1135,9 +1135,25 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map,
uint32_t req_nodes, uint32_t cr_node_cnt, uint32_t req_nodes, uint32_t cr_node_cnt,
uint16_t *cpu_cnt, uint32_t *freq, uint32_t size) uint16_t *cpu_cnt, uint32_t *freq, uint32_t size)
{ {
int i, node_boundary, count, ec, most_cpus = 0; int i, b, node_boundary, count, ec, most_cpus = 0;
bitstr_t *origmap, *reqmap = NULL; bitstr_t *origmap, *reqmap = NULL;
if (job_ptr->details->req_node_bitmap)
reqmap = job_ptr->details->req_node_bitmap;
/* clear nodes from the bitmap that don't have available resources */
for (i = 0, b = 0; i < size; i++) {
for (count = 0; count < freq[i]; count++, b++) {
if (bit_test(node_map, b) && cpu_cnt[i] < 1) {
if (reqmap && bit_test(reqmap, b)) {
/* can't clear a required node! */
return SLURM_ERROR;
}
bit_clear(node_map, b);
}
}
}
/* allocated node count should never exceed num_procs, right? /* allocated node count should never exceed num_procs, right?
* if so, then this should be done earlier and max_nodes * if so, then this should be done earlier and max_nodes
* could be used to make this process more efficient (truncate * could be used to make this process more efficient (truncate
...@@ -1166,9 +1182,6 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, ...@@ -1166,9 +1182,6 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map,
most_cpus = cpu_cnt[i]; most_cpus = cpu_cnt[i];
} }
if (job_ptr->details->req_node_bitmap)
reqmap = job_ptr->details->req_node_bitmap;
for (count = 1; count < most_cpus; count++) { for (count = 1; count < most_cpus; count++) {
int nochange = 1; int nochange = 1;
bit_or(node_map, origmap); bit_or(node_map, origmap);
......
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