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

fix bug in calculation of available CPUs for a job step

parent 3a0f1b2d
No related branches found
No related tags found
No related merge requests found
...@@ -1219,6 +1219,8 @@ extern uint32_t step_test(void *step_gres_data, void *job_gres_data, ...@@ -1219,6 +1219,8 @@ extern uint32_t step_test(void *step_gres_data, void *job_gres_data,
gres_cnt /= step_gres_ptr->gpu_cnt_alloc; gres_cnt /= step_gres_ptr->gpu_cnt_alloc;
else if (step_gres_ptr->gpu_cnt_alloc > gres_cnt) else if (step_gres_ptr->gpu_cnt_alloc > gres_cnt)
gres_cnt = 0; gres_cnt = 0;
else
gres_cnt = NO_VAL;
return gres_cnt; return gres_cnt;
} }
......
...@@ -1219,6 +1219,8 @@ extern uint32_t step_test(void *step_gres_data, void *job_gres_data, ...@@ -1219,6 +1219,8 @@ extern uint32_t step_test(void *step_gres_data, void *job_gres_data,
gres_cnt /= step_gres_ptr->nic_cnt_alloc; gres_cnt /= step_gres_ptr->nic_cnt_alloc;
else if (step_gres_ptr->nic_cnt_alloc > gres_cnt) else if (step_gres_ptr->nic_cnt_alloc > gres_cnt)
gres_cnt = 0; gres_cnt = 0;
else
gres_cnt = NO_VAL;
return gres_cnt; return gres_cnt;
} }
......
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