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
This commit is contained in:
David Anderson 2014-06-13 00:30:03 -07:00
parent 9829a5588a
commit 5fd1656935
1 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ void send_work_score_type(int rt) {
for (int j=0; j<nscan; j++) {
int i = (j+rnd_off) % ssp->max_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) {