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

Fix bug in select/cons_res, allocated a job all of the processors on a

    node when the --exclusive option is specified as a job submit option.
parent 76583dd9
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,8 @@ documents those changes that are of interest to users and admins. ...@@ -13,6 +13,8 @@ documents those changes that are of interest to users and admins.
-- Modify PMI_Get_clique_ranks() to return an array of integers rather -- Modify PMI_Get_clique_ranks() to return an array of integers rather
than a char * to satisfy PMI standard. Correct logic in than a char * to satisfy PMI standard. Correct logic in
PMI_Get_clique_size() for when srun --overcommit option is used. PMI_Get_clique_size() for when srun --overcommit option is used.
-- Fix bug in select/cons_res, allocated a job all of the processors on a
node when the --exclusive option is specified as a job submit option.
* Changes in SLURM 1.4.0-pre4 * Changes in SLURM 1.4.0-pre4
============================= =============================
......
...@@ -329,6 +329,15 @@ extern int cr_dist(struct job_record *job_ptr, ...@@ -329,6 +329,15 @@ extern int cr_dist(struct job_record *job_ptr,
{ {
int error_code, cr_cpu = 1; int error_code, cr_cpu = 1;
if (job_ptr->select_job->node_req == NODE_CR_RESERVED) {
/* the job has been allocated an EXCLUSIVE set of nodes,
* so it gets all of the bits in the core_bitmap and
* all of the available CPUs in the cpus array */
int size = bit_size(job_ptr->select_job->core_bitmap);
bit_nset(job_ptr->select_job->core_bitmap, 0, size-1);
return SLURM_SUCCESS;
}
if (job_ptr->details->task_dist == SLURM_DIST_PLANE) { if (job_ptr->details->task_dist == SLURM_DIST_PLANE) {
/* perform a plane distribution on the 'cpus' array */ /* perform a plane distribution on the 'cpus' array */
error_code = _compute_plane_dist(job_ptr); error_code = _compute_plane_dist(job_ptr);
...@@ -346,7 +355,7 @@ extern int cr_dist(struct job_record *job_ptr, ...@@ -346,7 +355,7 @@ extern int cr_dist(struct job_record *job_ptr,
} }
/* now sync up the core_bitmap with the allocated 'cpus' array /* now sync up the core_bitmap with the allocated 'cpus' array
* based on the given distribution AND resource setting */ * based on the given distribution AND resource setting */
if ((cr_type == CR_CORE) || (cr_type == CR_CORE_MEMORY) || if ((cr_type == CR_CORE) || (cr_type == CR_CORE_MEMORY) ||
(cr_type == CR_SOCKET) || (cr_type == CR_SOCKET_MEMORY)) (cr_type == CR_SOCKET) || (cr_type == CR_SOCKET_MEMORY))
cr_cpu = 0; cr_cpu = 0;
...@@ -375,8 +384,7 @@ extern int cr_dist(struct job_record *job_ptr, ...@@ -375,8 +384,7 @@ extern int cr_dist(struct job_record *job_ptr,
break; break;
default: default:
error("select/cons_res: invalid task_dist entry"); error("select/cons_res: invalid task_dist entry");
error_code = SLURM_ERROR; return SLURM_ERROR;
break;
} }
return SLURM_SUCCESS; return SLURM_SUCCESS;
} }
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