From 4f0cd6b29caf78c65a5622a4821570e3c94f26b1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 14 Aug 2015 11:21:23 -0700 Subject: [PATCH] client: if app reports fract done > 1, use asymptotic formula --- client/app.cpp | 7 ++++--- client/app_control.cpp | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/app.cpp b/client/app.cpp index d8b4e3fdd1..ea9711ddef 100644 --- a/client/app.cpp +++ b/client/app.cpp @@ -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); diff --git a/client/app_control.cpp b/client/app_control.cpp index b40f07a606..02a5446691 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -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, "", 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.