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

Job with core-spec allocated all avail cores

Job allocaitons with core specialization are allocated all available
CPUs on the selected nodes rather than only the number required to
satisfy their allocation request (e.g. "srun --core-spec=1 -n1 date"
will not be allocated 1 CPU, but will get the entire node except
for one specialized core).
parent 3b8accc2
No related branches found
No related tags found
No related merge requests found
...@@ -899,12 +899,17 @@ extern int cr_dist(struct job_record *job_ptr, const uint16_t cr_type) ...@@ -899,12 +899,17 @@ extern int cr_dist(struct job_record *job_ptr, const uint16_t cr_type)
{ {
int error_code, cr_cpu = 1; int error_code, cr_cpu = 1;
if (((job_ptr->job_resrcs->node_req == NODE_CR_RESERVED) || if (job_ptr->details->core_spec != 0) {
(job_ptr->details->whole_node != 0)) && /* The job has been allocated all non-specialized cores,
(job_ptr->details->core_spec == 0)) { * so we don't need to select specific CPUs. */
/* the job has been allocated an EXCLUSIVE set of nodes, return SLURM_SUCCESS;
}
if ((job_ptr->job_resrcs->node_req == NODE_CR_RESERVED) ||
(job_ptr->details->whole_node != 0)) {
/* The job has been allocated an EXCLUSIVE set of nodes,
* so it gets all of the bits in the core_bitmap and * so it gets all of the bits in the core_bitmap and
* all of the available CPUs in the cpus array */ * all of the available CPUs in the cpus array. */
int size = bit_size(job_ptr->job_resrcs->core_bitmap); int size = bit_size(job_ptr->job_resrcs->core_bitmap);
bit_nset(job_ptr->job_resrcs->core_bitmap, 0, size-1); bit_nset(job_ptr->job_resrcs->core_bitmap, 0, size-1);
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