diff --git a/NEWS b/NEWS index abb23dbbd7e5adce3d86eb132b0b0bd95df1a8f2..395114343177fffbe75873d1bb568197335126ff 100644 --- a/NEWS +++ b/NEWS @@ -92,10 +92,9 @@ documents those changes that are of interest to users and admins. * Changes in Slurm 14.03.5 ========================== - -- Enlarge the width specifier when printing partition SHARE to display larger - sharing values. - -- sinfo locks added to prevent possibly duplicate record printing for - resources in multiple partitions. + -- If a srun runs in an exclusive allocation and doesn't use the entire + allocation and CR_PACK_NODES is set layout tasks appropriately. + -- Correct Shared field in job state information seen by scontrol, sview, etc. * Changes in Slurm 14.03.4 ========================== @@ -185,8 +184,8 @@ documents those changes that are of interest to users and admins. is already running. -- Email messages for job array events print now use the job ID using the format "#_# (#)" rather than just the internal job ID. - -- Set the number of free licenses to be 0 if the global license count decreases - and total is less than in use. + -- Set the number of free licenses to be 0 if the global license count + decreases and total is less than in use. -- Add DebugFlag of BackfillMap. Previously a DebugFlag value of Backfill logged information about what it was doing plus a map of expected resouce use in the future. Now that very verbose resource use map is only logged @@ -203,6 +202,10 @@ documents those changes that are of interest to users and admins. -- If DebugFlags=Protocol is configured in slurm.conf print details of the connection, ip address and port accepted by the controller. -- Fix minor memory leak when reading in incomplete node data checkpoint file. + -- Enlarge the width specifier when printing partition SHARE to display larger + sharing values. + -- sinfo locks added to prevent possibly duplicate record printing for + resources in multiple partitions. * Changes in Slurm 14.03.3-2 ============================ diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 1eda3949b03c387893140b955227336945dacd1b..c336914ecafa4e532099c1c1ded1177446068cd7 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -656,8 +656,9 @@ Permit the job's geometry to be rotated. Possible values are "YES" and "NO". .TP \fIShared\fP=<yes|no> -Set the job's ability to share nodes with other jobs. Possible values are -"YES" and "NO". Only the Slurm administrator or root can increase job's priority. +Set the job's ability to share nodes with other jobs. +Possible values are "YES" and "NO". +This option can only be changed for pending jobs. .TP \fIStartTime\fP=<time_spec> Set the job's earliest initiation time. diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 01956009f9e3f7a283e8389827cf243a9729a4dc..447c5963caf0f20441871c9f0911a714e0f0a9d3 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -7109,11 +7109,11 @@ static void _pack_pending_job_details(struct job_details *detail_ptr, shared = (uint16_t) NO_VAL; else if (detail_ptr->share_res == 1) shared = 1; - else if (detail_ptr->whole_node == 1) + else if ((detail_ptr->share_res == 0) || + (detail_ptr->whole_node == 1)) shared = 0; else shared = (uint16_t) NO_VAL; - if (protocol_version >= SLURM_14_03_PROTOCOL_VERSION) { if (detail_ptr) { pack16(shared, buffer); diff --git a/src/srun/libsrun/srun_job.c b/src/srun/libsrun/srun_job.c index 5ef5ad8330f3174b98253659d12fc72c1627199e..472dc55d14eeadc3253086696a21096a184508fa 100644 --- a/src/srun/libsrun/srun_job.c +++ b/src/srun/libsrun/srun_job.c @@ -874,9 +874,19 @@ _job_create_structure(allocation_info_t *ainfo) job->jobid = ainfo->jobid; job->ntasks = opt.ntasks; - for (i=0; i<ainfo->num_cpu_groups; i++) { - job->cpu_count += ainfo->cpus_per_node[i] * - ainfo->cpu_count_reps[i]; + + /* If cpus_per_task is set then get the exact count of cpus + for the requested step (we might very well use less, + especially if --exclusive is used). Else get the total for the + allocation given. + */ + if (opt.cpus_set) + job->cpu_count = opt.ntasks * opt.cpus_per_task; + else { + for (i=0; i<ainfo->num_cpu_groups; i++) { + job->cpu_count += ainfo->cpus_per_node[i] * + ainfo->cpu_count_reps[i]; + } } job->rc = -1;