diff --git a/src/plugins/priority/basic/priority_basic.c b/src/plugins/priority/basic/priority_basic.c index c400cead01d093a700b30584be619a2a7a70ebb3..16dce1fd51864a2bf3c43bcf48b7b6ae401f3d52 100644 --- a/src/plugins/priority/basic/priority_basic.c +++ b/src/plugins/priority/basic/priority_basic.c @@ -181,16 +181,11 @@ extern void priority_p_job_end(struct job_record *job_ptr) assoc_mgr_lock_t locks = { NO_LOCK, WRITE_LOCK, NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK, NO_LOCK }; - /* No unused cpu_run_secs if job ran past its time limit */ - if (job_ptr->end_time >= job_ptr->start_time + time_limit_secs) - return; - + /* No decaying in basic priority. Just remove the total secs. */ unused_tres_run_secs = xmalloc(sizeof(uint64_t) * slurmctld_tres_cnt); for (i=0; i<slurmctld_tres_cnt; i++) { unused_tres_run_secs[i] = - (uint64_t)(job_ptr->start_time + - time_limit_secs - job_ptr->end_time) * - job_ptr->tres_req_cnt[i]; + job_ptr->tres_alloc_cnt[i] * time_limit_secs; } assoc_mgr_lock(&locks);