diff --git a/NEWS b/NEWS index 83ecd50dbd1afb7713bc781ed02712d42e62b0f0..81690c2256c3b2a3e970957c371bfed29dc086d1 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ documents those changes that are of interest to users and admins. batch jobs. -- Fix possible illegal memory reference in slurmctld for job step with relative option. Work by Matthieu Hautreux (CEA). + -- Reset priority of system held jobs when dependency is satisfied. Work by + Don Lipari, LLNL. * Changes in SLURM 2.3.4 ======================== diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index f2cdc0eaccb97c47ae1e7374abb861eb8142f235..3337b8349ff440e6a58ae3a8b276153ddf97ad18 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8796,6 +8796,7 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) struct job_details *detail_ptr = job_ptr->details; time_t now = time(NULL); int depend_rc; + bool independent = false; /* Test dependencies first so we can cancel jobs before dependent * job records get purged (e.g. afterok, afternotok) */ @@ -8836,11 +8837,14 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) /* Job is eligible to start now */ if (job_ptr->state_reason == WAIT_DEPENDENCY) { job_ptr->state_reason = WAIT_NO_REASON; + independent = true; xfree(job_ptr->state_desc); } if ((detail_ptr && (detail_ptr->begin_time == 0) && (job_ptr->priority != 0))) { detail_ptr->begin_time = now; + if (independent) + _set_job_prio(job_ptr); } else if (job_ptr->state_reason == WAIT_TIME) { job_ptr->state_reason = WAIT_NO_REASON; xfree(job_ptr->state_desc);