diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index 19fd342158fb4460f57ac9c22e58dbe75360e9a8..356f14ea45a045217faf89ca81c4d2a7f5cb82ae 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -127,8 +127,8 @@ static int _num_feature_count(struct job_record *job_ptr); static void _reset_job_time_limit(struct job_record *job_ptr, time_t now, node_space_map_t *node_space); static int _start_job(struct job_record *job_ptr, bitstr_t *avail_bitmap); -static bool _test_resv_overlap(node_space_map_t *node_space, - bitstr_t *use_bitmap, uint32_t start_time, +static bool _test_resv_overlap(node_space_map_t *node_space, + bitstr_t *use_bitmap, uint32_t start_time, uint32_t end_reserve); static int _try_sched(struct job_record *job_ptr, bitstr_t **avail_bitmap, uint32_t min_nodes, uint32_t max_nodes, @@ -444,10 +444,10 @@ static int _yield_locks(void) _my_sleep(backfill_interval); lock_slurmctld(all_locks); - if ((last_job_update == job_update) && - (last_node_update == node_update) && + if ((last_job_update == job_update) && + (last_node_update == node_update) && (last_part_update == part_update) && - (! stop_backfill) && (! config_flag)) + (! stop_backfill) && (! config_flag)) return 0; else return 1; @@ -499,7 +499,7 @@ static int _attempt_backfill(void) if (debug_flags & DEBUG_FLAG_BACKFILL) _dump_node_space_table(node_space); - while ((job_queue_rec = (job_queue_rec_t *) + while ((job_queue_rec = (job_queue_rec_t *) list_pop_bottom(job_queue, sort_job_queue2))) { job_ptr = job_queue_rec->job_ptr; part_ptr = job_queue_rec->part_ptr; @@ -645,7 +645,7 @@ static int _attempt_backfill(void) if ((rc == SLURM_SUCCESS) && job_ptr->time_min) { /* Set time limit as high as possible */ job_ptr->time_limit = comp_time_limit; - job_ptr->end_time = job_ptr->start_time + + job_ptr->end_time = job_ptr->start_time + (comp_time_limit * 60); _reset_job_time_limit(job_ptr, now, node_space); @@ -684,10 +684,10 @@ static int _attempt_backfill(void) } end_reserve = job_ptr->start_time + (time_limit * 60); - if (_test_resv_overlap(node_space, avail_bitmap, + if (_test_resv_overlap(node_space, avail_bitmap, job_ptr->start_time, end_reserve)) { /* This job overlaps with an existing reservation for - * job to be backfill scheduled, which the sched + * job to be backfill scheduled, which the sched * plugin does not know about. Try again later. */ later_start = job_ptr->start_time; goto TRY_LATER; @@ -768,7 +768,7 @@ static int _start_job(struct job_record *job_ptr, bitstr_t *resv_bitmap) return rc; } -/* Reset a job's time limit (and end_time) as high as possible +/* Reset a job's time limit (and end_time) as high as possible * within the range job_ptr->time_min and job_ptr->time_limit. * Avoid using resources reserved for pending jobs or in resource * reservations */ @@ -884,8 +884,8 @@ static void _add_reservation(uint32_t start_time, uint32_t end_reserve, * IN start_time - start time of job * IN end_reserve - end time of job */ -static bool _test_resv_overlap(node_space_map_t *node_space, - bitstr_t *use_bitmap, uint32_t start_time, +static bool _test_resv_overlap(node_space_map_t *node_space, + bitstr_t *use_bitmap, uint32_t start_time, uint32_t end_reserve) { bool overlap = false;