- validator: because of the above problem,

some results have flops_estimate == 0, which causes divide by zero.
    Check for this and use 1e10.

svn path=/trunk/boinc/; revision=21776
This commit is contained in:
David Anderson 2010-06-18 22:27:09 +00:00
parent 67ef958be1
commit f2e8d4601b
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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,