Skip to content
Snippets Groups Projects
Commit 1ef41ac9 authored by Morris Jette's avatar Morris Jette
Browse files

select/cons_res plugin: CPU allocation logic fix

Correction to CPU allocation count logic in for cores without hyperthreading.
parent 96986199
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,8 @@ documents those changes that are of interest to users and admins. ...@@ -27,6 +27,8 @@ documents those changes that are of interest to users and admins.
not keep track of jobs or steps in accounting. not keep track of jobs or steps in accounting.
-- Cray - Add new cray.conf parameter of "AlpsEngine" to specify the -- Cray - Add new cray.conf parameter of "AlpsEngine" to specify the
communication protocol to be used for ALPS/BASIL. communication protocol to be used for ALPS/BASIL.
-- select/cons_res plugin: Correction to CPU allocation count logic in for
cores without hyperthreading.
* Changes in SLURM 2.5.2 * Changes in SLURM 2.5.2
======================== ========================
......
...@@ -622,7 +622,7 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, ...@@ -622,7 +622,7 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr,
/* adjust cpus count of the current node */ /* adjust cpus count of the current node */
if ((alloc_cores || alloc_sockets) && if ((alloc_cores || alloc_sockets) &&
(select_node_record[n].vpus > 1)) { (select_node_record[n].vpus >= 1)) {
job_res->cpus[i] = core_cnt * job_res->cpus[i] = core_cnt *
select_node_record[n].vpus; select_node_record[n].vpus;
} }
...@@ -759,7 +759,7 @@ static int _cyclic_sync_core_bitmap(struct job_record *job_ptr, ...@@ -759,7 +759,7 @@ static int _cyclic_sync_core_bitmap(struct job_record *job_ptr,
bit_nclear(core_map, sock_start[s], bit_nclear(core_map, sock_start[s],
sock_end[s]-1); sock_end[s]-1);
} }
if ((select_node_record[n].vpus > 1) && if ((select_node_record[n].vpus >= 1) &&
(alloc_sockets || alloc_cores) && sock_used[s]) { (alloc_sockets || alloc_cores) && sock_used[s]) {
for (j=sock_start[s]; j<sock_end[s]; j++) { for (j=sock_start[s]; j<sock_end[s]; j++) {
if (bit_test(core_map, j)) if (bit_test(core_map, j))
...@@ -768,7 +768,7 @@ static int _cyclic_sync_core_bitmap(struct job_record *job_ptr, ...@@ -768,7 +768,7 @@ static int _cyclic_sync_core_bitmap(struct job_record *job_ptr,
} }
} }
if ((alloc_cores || alloc_sockets) && if ((alloc_cores || alloc_sockets) &&
(select_node_record[n].vpus > 1)) { (select_node_record[n].vpus >= 1)) {
job_res->cpus[i] = core_cnt * job_res->cpus[i] = core_cnt *
select_node_record[n].vpus; select_node_record[n].vpus;
} }
......
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