From 5fd1656935dce9de4edca1be877c7004d9986819 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 13 Jun 2014 00:30:03 -0700 Subject: [PATCH] scheduler: fix bug in score-based scheduler that cause last job to not be sent This is the problem where the scheduler marks one job with its PID to reserve it. It needs to be able to send this job. I fixed this recently in old scheduler, neglected to fix in score-based as well --- sched/sched_score.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/sched_score.cpp b/sched/sched_score.cpp index 46d0e92f78..6be1de78f0 100644 --- a/sched/sched_score.cpp +++ b/sched/sched_score.cpp @@ -185,7 +185,7 @@ void send_work_score_type(int rt) { for (int j=0; jmax_wu_results; WU_RESULT& wu_result = ssp->wu_results[i]; - if (wu_result.state != WR_STATE_PRESENT) { + if (wu_result.state != WR_STATE_PRESENT && wu_result.state != g_pid) { continue; } WORKUNIT wu = wu_result.workunit; @@ -251,7 +251,7 @@ void send_work_score_type(int rt) { // array is locked at this point. // WU_RESULT& wu_result = ssp->wu_results[job.index]; - if (wu_result.state != WR_STATE_PRESENT) { + if (wu_result.state != WR_STATE_PRESENT && wu_result.state != g_pid) { continue; } if (wu_result.resultid != job.result_id) {