diff --git a/NEWS b/NEWS index 29656be96955690672c7dabb5b87ba741e0c463e..3376d266016dccf9b596fdc0848abb355505e340 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ documents those changes that are of interest to users and admins. -- added $float to globals.example in the testsuite -- Limit attempted BGL jobs scheduled at once to 100 (too slow with dynamic scheduling to handle hundreds of jobs at once). + -- Set job's num_proc correctly for jobs that do not have exclusive use + of it's allocated nodes. * Changes in SLURM 1.1.0-pre6 ============================= diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 54843a64339a4ff3cdac6d93ac98442103e8f3e1..4b696862ae751b142dfa1004181529217367cb96 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -996,10 +996,13 @@ extern int select_p_job_begin(struct job_record *job_ptr) if (job->job_id != job_ptr->job_id) continue; for (i=0; i<job->nhosts; i++) - cnt += job->cpus[i]; - debug2("cons_res: reset num_procs for %u from %u to %u", + cnt += MIN(job->cpus[i], job->ntask[i]); + if (job_ptr->num_procs != cnt) { + debug2("cons_res: reset num_procs for %u from " + "%u to %u", job_ptr->job_id, job_ptr->num_procs, cnt); - job_ptr->num_procs = cnt; + job_ptr->num_procs = cnt; + } break; } list_iterator_destroy(job_iterator);