From 826cd355e57a33519770e0d4746b0fd778be259b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 8 Sep 2011 19:36:14 +0000 Subject: [PATCH] - validator: old scheduler bugs may cause result.flops_estimate to be negative in some cases. Detect this, and use 1e10 instead svn path=/trunk/boinc/; revision=24146 --- checkin_notes | 8 ++++++++ sched/credit.cpp | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 666b171a1f..47f3b56d77 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5731,3 +5731,11 @@ David 8 Sept 2011 html/inc/ result.inc + +David 8 Sept 2011 + - validator: old scheduler bugs may cause result.flops_estimate + to be negative in some cases. + Detect this, and use 1e10 instead + + sched/ + credit.cpp diff --git a/sched/credit.cpp b/sched/credit.cpp index b59d256c61..24756a8c0e 100644 --- a/sched/credit.cpp +++ b/sched/credit.cpp @@ -467,11 +467,11 @@ int get_pfc( return 0; } - // r.flops_estimate shouldn't be zero, - // but (because of scheduler bug) it can be. + // r.flops_estimate should be positive + // but (because of scheduler bug) it may not be. // At this point we don't have much to go on, so use 1e10. // - if (!r.flops_estimate) { + if (r.flops_estimate <= 0) { r.flops_estimate = 1e10; }