diff --git a/NEWS b/NEWS index b3b489c9d80da6adb5a2c8924f6b292c6c89812d..bffea62c80472c9efb9da8ae200cba08a1a14927 100644 --- a/NEWS +++ b/NEWS @@ -197,6 +197,8 @@ documents those changes that are of interest to users and admins. -- Updated sview config info -- Fix a couple of bugs with respect to scheduling with overlapping reservations (one with a flag of "Maintenance"). + -- Fix bug when updating a pending job's nice value after explicitly setting + it's priority. * Changes in SLURM 2.0.4 ======================== diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 0b5f5c29333153202c5d01db6a65a15a3408297b..27129c3ab9b0613bfed33cd0524934d34ba662db 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -87,9 +87,24 @@ For example: \-\-begin=16:00 \-\-begin=now+1hour \-\-begin=now+60 (seconds by default) - \-\-begin=2010-01-20T12:34:00 + \-\-begin=2010\-01\-20T12:34:00 .fi +.RS +.PP +Notes on date/time specifications: + \- Although the 'seconds' field of the HH:MM:SS time specification is +allowed by the code, note that the poll time of the SLURM scheduler +is not precise enough to guarantee dispatch of the job on the exact +second. The job will be eligible to start on the next poll +following the specified time. The exact poll interval depends on the +SLURM scheduler (e.g., 60 seconds with the default sched/builtin). + \- If no time (HH:MM:SS) is specified, the default is (00:00:00). + \- If a date is specified without a year (e.g., MM/DD) then the current +year is assumed, unless the combination of MM/DD and HH:MM:SS has +already passed for that year, in which case the next year is used. +.RE + .TP \fB\-\-bell\fR Force salloc to ring the terminal bell when the job allocation is granted diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index d6a306b8c927fe0865eec20e68461bb699b90218..4ba28c461281938a299d24b3af935ec020671ca8 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -86,9 +86,24 @@ For example: \-\-begin=16:00 \-\-begin=now+1hour \-\-begin=now+60 (seconds by default) - \-\-begin=2010-01-20T12:34:00 + \-\-begin=2010\-01\-20T12:34:00 .fi +.RS +.PP +Notes on date/time specifications: + \- Although the 'seconds' field of the HH:MM:SS time specification is +allowed by the code, note that the poll time of the SLURM scheduler +is not precise enough to guarantee dispatch of the job on the exact +second. The job will be eligible to start on the next poll +following the specified time. The exact poll interval depends on the +SLURM scheduler (e.g., 60 seconds with the default sched/builtin). + \- If no time (HH:MM:SS) is specified, the default is (00:00:00). + \- If a date is specified without a year (e.g., MM/DD) then the current +year is assumed, unless the combination of MM/DD and HH:MM:SS has +already passed for that year, in which case the next year is used. +.RE + .TP \fB\-\-checkpoint\fR=<\fItime\fR> Specifies the interval between creating checkpoints of the job step. diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 2a37874534ca3227f688bbe0757fb89259e578f0..b66717050050e50f91ba7df934e72386963c3d05 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -400,6 +400,9 @@ Set the job's name to the specified value. .TP \fINice\fP[=delta] Adjust job's priority by the specified value. Default value is 100. +The adjustment range is from \-10000 (highest priority) +to 10000 (lowest priority). Only privileged users can specify +a negative adjustment. .TP \fIPartition\fP=<name> Set the job's partition to the specified value. @@ -409,6 +412,7 @@ Set the job's priority to the specified value. Note that a job priority of zero prevents the job from ever being scheduled. By setting a job's priority to zero it is held. Set the priority to a non\-zero value to permit it to run. +Explicitly setting a job's priority clears any previously set nice value. .TP \fIReqCores\fP=<count> Set the job's count of required cores to the specified value. diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 3576988e685f823b03a618edc9cbb9a4b769d5f7..cd3266d164c33fc6ea420df31a20025d21bb1aa5 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -74,9 +74,24 @@ For example: \-\-begin=16:00 \-\-begin=now+1hour \-\-begin=now+60 (seconds by default) - \-\-begin=2010-01-20T12:34:00 + \-\-begin=2010\-01\-20T12:34:00 .fi +.RS +.PP +Notes on date/time specifications: + \- Although the 'seconds' field of the HH:MM:SS time specification is +allowed by the code, note that the poll time of the SLURM scheduler +is not precise enough to guarantee dispatch of the job on the exact +second. The job will be eligible to start on the next poll +following the specified time. The exact poll interval depends on the +SLURM scheduler (e.g., 60 seconds with the default sched/builtin). + \- If no time (HH:MM:SS) is specified, the default is (00:00:00). + \- If a date is specified without a year (e.g., MM/DD) then the current +year is assumed, unless the combination of MM/DD and HH:MM:SS has +already passed for that year, in which case the next year is used. +.RE + .TP \fB\-\-checkpoint\fR=<\fItime\fR> Specifies the interval between creating checkpoints of the job step. diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 195da28dfb341bd4473527423c05107bcb096914..f328030ee2277fbba49a08aa8d6894889f2c98fe 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -4843,6 +4843,7 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) error_code = ESLURM_DISABLED; else if (super_user || (job_ptr->priority > job_specs->priority)) { + job_ptr->details->nice = NICE_OFFSET; if(job_specs->priority == INFINITE) { job_ptr->direct_set_prio = 0; _set_job_prio(job_ptr); @@ -4865,8 +4866,11 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) if (IS_JOB_FINISHED(job_ptr)) error_code = ESLURM_DISABLED; else if (super_user || (job_specs->nice < NICE_OFFSET)) { + int64_t new_prio = job_ptr->priority; + new_prio += job_ptr->details->nice; + new_prio -= job_specs->nice; + job_ptr->priority = MAX(new_prio, 2); job_ptr->details->nice = job_specs->nice; - _set_job_prio(job_ptr); info("update_job: setting priority to %u for " "job_id %u", job_ptr->priority,