diff --git a/checkin_notes b/checkin_notes index e1ed7467ff..64c6c16ec5 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4404,3 +4404,11 @@ David 18 Jun 2010 sched_types.cpp client/ check_state.cpp + +David 18 Jun 2010 + - validator: because of the above problem, + some results have flops_estimate == 0, which causes divide by zero. + Check for this and use 1e10. + + sched/ + credit.cpp diff --git a/sched/credit.cpp b/sched/credit.cpp index b988a4064e..66b6ef7532 100644 --- a/sched/credit.cpp +++ b/sched/credit.cpp @@ -443,6 +443,14 @@ int get_pfc( return 0; } + // r.flops_estimate shouldn't be zero, + // but (because of scheduler bug) it can be. + // At this point we don't have much to go on, so use 1e10. + // + if (!r.flops_estimate) { + r.flops_estimate = 1e10; + } + double raw_pfc = (r.elapsed_time * r.flops_estimate); if (config.debug_credit) { log_messages.printf(MSG_NORMAL,