Skip to content

Commit

Permalink
Log job-partition pair count in job queue
Browse files Browse the repository at this point in the history
Log the number of job-partition pairs added to the queue for job
scheduling.
bug 1827
  • Loading branch information
jette committed Jul 27, 2015
1 parent dc079ea commit 4f40d60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/slurmctld/job_scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,17 @@ extern List build_job_queue(bool clear_start, bool backfill)
int reason;
struct timeval start_tv = {0, 0};
int tested_jobs = 0;
int job_part_pairs = 0;

job_queue = list_create(_job_queue_rec_del);
job_iterator = list_iterator_create(job_list);
while ((job_ptr = (struct job_record *) list_next(job_iterator))) {
if (((tested_jobs % 100) == 0) &&
(_delta_tv(&start_tv) >= build_queue_timeout)) {
info("build_job_queue has been running for %d usec, "
"exiting with %d of %d jobs tested",
"exiting with %d of %d jobs tested, %d job-partition pairs added",
build_queue_timeout, tested_jobs,
list_count(job_list));
list_count(job_list), job_part_pairs);
break;
}
tested_jobs++;
Expand All @@ -337,6 +338,7 @@ extern List build_job_queue(bool clear_start, bool backfill)
inx++;
if (reason != WAIT_NO_REASON)
continue;
job_part_pairs++;
if (job_ptr->priority_array) {
_job_queue_append(job_queue, job_ptr,
part_ptr,
Expand Down Expand Up @@ -365,6 +367,7 @@ extern List build_job_queue(bool clear_start, bool backfill)
}
if (!_job_runnable_test2(job_ptr, backfill))
continue;
job_part_pairs++;
_job_queue_append(job_queue, job_ptr,
job_ptr->part_ptr, job_ptr->priority);
}
Expand Down

0 comments on commit 4f40d60

Please sign in to comment.