Skip to content
Snippets Groups Projects
Commit c19cb29e authored by Morris Jette's avatar Morris Jette
Browse files

Log proper backfill job test time

The backfill scheduler was always reporting the time that a job
was being considered as NOW rather than the time that was really
being considered.
parent 448645b8
No related branches found
No related tags found
No related merge requests found
...@@ -168,16 +168,15 @@ static void _dump_job_sched(struct job_record *job_ptr, time_t end_time, ...@@ -168,16 +168,15 @@ static void _dump_job_sched(struct job_record *job_ptr, time_t end_time,
xfree(node_list); xfree(node_list);
} }
static void _dump_job_test(struct job_record *job_ptr, bitstr_t *avail_bitmap) static void _dump_job_test(struct job_record *job_ptr, bitstr_t *avail_bitmap,
time_t start_time)
{ {
char begin_buf[32], *node_list; char begin_buf[32], *node_list;
if (job_ptr->start_time == 0) { if (start_time == 0)
strcpy(begin_buf, "NOW"); strcpy(begin_buf, "NOW");
} else { else
slurm_make_time_str(&job_ptr->start_time, begin_buf, slurm_make_time_str(&start_time, begin_buf, sizeof(begin_buf));
sizeof(begin_buf));
}
node_list = bitmap2node_name(avail_bitmap); node_list = bitmap2node_name(avail_bitmap);
info("Test job %u at %s on %s", job_ptr->job_id, begin_buf, node_list); info("Test job %u at %s on %s", job_ptr->job_id, begin_buf, node_list);
xfree(node_list); xfree(node_list);
...@@ -1016,7 +1015,7 @@ static int _attempt_backfill(void) ...@@ -1016,7 +1015,7 @@ static int _attempt_backfill(void)
} }
if (debug_flags & DEBUG_FLAG_BACKFILL) if (debug_flags & DEBUG_FLAG_BACKFILL)
_dump_job_test(job_ptr, avail_bitmap); _dump_job_test(job_ptr, avail_bitmap, start_res);
j = _try_sched(job_ptr, &avail_bitmap, min_nodes, max_nodes, j = _try_sched(job_ptr, &avail_bitmap, min_nodes, max_nodes,
req_nodes, exc_core_bitmap); req_nodes, exc_core_bitmap);
...@@ -1072,7 +1071,7 @@ static int _attempt_backfill(void) ...@@ -1072,7 +1071,7 @@ static int _attempt_backfill(void)
continue; continue;
} else if (rc != SLURM_SUCCESS) { } else if (rc != SLURM_SUCCESS) {
/* Planned to start job, but something bad /* Planned to start job, but something bad
* happended. */ * happened. */
job_ptr->start_time = 0; job_ptr->start_time = 0;
break; break;
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment