client: if app reports fract done > 1, use asymptotic formula

This commit is contained in:
David Anderson 2015-08-14 11:21:23 -07:00
parent e8c0608f7d
commit 4f0cd6b29c
2 changed files with 4 additions and 5 deletions

View File

@ -668,11 +668,12 @@ int ACTIVE_TASK::write(MIOFILE& fout) {
#ifndef SIM
int ACTIVE_TASK::write_gui(MIOFILE& fout) {
// if the app hasn't reported fraction done, and time has elapsed,
// estimate fraction done
// if the app hasn't reported fraction done or reported > 1,
// and time has elapsed, estimate fraction done in a
// way that constantly increases and approaches 1.
//
double fd = fraction_done;
if (fd == 0 && elapsed_time > 0) {
if (((fd==0)||(fd>1)) && elapsed_time > 0) {
double est_time = wup->rsc_fpops_est/app_version->flops;
double x = elapsed_time/est_time;
fd = 1 - exp(-x);

View File

@ -1370,8 +1370,6 @@ bool ACTIVE_TASK::get_app_status_msg() {
want_network = 0;
current_cpu_time = checkpoint_cpu_time = 0.0;
if (parse_double(msg_buf, "<fraction_done>", fd)) {
if (fd < 0) fd = 0;
if (fd > 1) fd = 1;
// fraction_done will be reported as zero
// until the app's first call to boinc_fraction_done().
// So ignore zeros.