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

fix problem in handling step exclusive mode, needed to change int to uint32_t

parent 96fca9aa
No related branches found
No related tags found
No related merge requests found
...@@ -526,7 +526,7 @@ _pick_step_nodes (struct job_record *job_ptr, ...@@ -526,7 +526,7 @@ _pick_step_nodes (struct job_record *job_ptr,
if (step_spec->exclusive) { if (step_spec->exclusive) {
int avail_cpus, avail_tasks, total_cpus, total_tasks, node_inx; int avail_cpus, avail_tasks, total_cpus, total_tasks, node_inx;
int i_first, i_last; int i_first, i_last;
uint32_t avail_mem, total_mem; uint32_t avail_mem, total_mem, gres_cnt;
uint32_t nodes_picked_cnt = 0; uint32_t nodes_picked_cnt = 0;
uint32_t tasks_picked_cnt = 0, total_task_cnt = 0; uint32_t tasks_picked_cnt = 0, total_task_cnt = 0;
bitstr_t *selected_nodes = NULL; bitstr_t *selected_nodes = NULL;
...@@ -594,18 +594,18 @@ _pick_step_nodes (struct job_record *job_ptr, ...@@ -594,18 +594,18 @@ _pick_step_nodes (struct job_record *job_ptr,
total_tasks = MIN(total_tasks, task_cnt); total_tasks = MIN(total_tasks, task_cnt);
} }
task_cnt = gres_plugin_step_test(step_gres_list, gres_cnt = gres_plugin_step_test(step_gres_list,
job_ptr->gres_list, job_ptr->gres_list,
node_inx, false); node_inx, false);
if (cpus_per_task > 0) if (cpus_per_task > 0)
task_cnt /= cpus_per_task; gres_cnt /= cpus_per_task;
avail_tasks = MIN(avail_tasks, task_cnt); avail_tasks = MIN(avail_tasks, gres_cnt);
task_cnt = gres_plugin_step_test(step_gres_list, gres_cnt = gres_plugin_step_test(step_gres_list,
job_ptr->gres_list, job_ptr->gres_list,
node_inx, true); node_inx, true);
if (cpus_per_task > 0) if (cpus_per_task > 0)
task_cnt /= cpus_per_task; gres_cnt /= cpus_per_task;
total_tasks = MIN(total_tasks, task_cnt); total_tasks = MIN(total_tasks, gres_cnt);
if (step_spec->max_nodes && if (step_spec->max_nodes &&
(nodes_picked_cnt >= step_spec->max_nodes)) (nodes_picked_cnt >= step_spec->max_nodes))
......
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