mirror of https://github.com/BOINC/boinc.git
client: if app reports frac done outside [0,1] write message
... conditioned on task_debug; write at most one msg per minute
This commit is contained in:
parent
1431a21d99
commit
72f53a6918
|
@ -673,7 +673,7 @@ int ACTIVE_TASK::write_gui(MIOFILE& fout) {
|
||||||
// way that constantly increases and approaches 1.
|
// way that constantly increases and approaches 1.
|
||||||
//
|
//
|
||||||
double fd = fraction_done;
|
double fd = fraction_done;
|
||||||
if (((fd==0)||(fd>1)) && elapsed_time > 0) {
|
if (((fd<=0)||(fd>1)) && elapsed_time > 0) {
|
||||||
double est_time = wup->rsc_fpops_est/app_version->flops;
|
double est_time = wup->rsc_fpops_est/app_version->flops;
|
||||||
double x = elapsed_time/est_time;
|
double x = elapsed_time/est_time;
|
||||||
fd = 1 - exp(-x);
|
fd = 1 - exp(-x);
|
||||||
|
|
|
@ -1352,6 +1352,7 @@ bool ACTIVE_TASK::get_app_status_msg() {
|
||||||
double fd;
|
double fd;
|
||||||
int other_pid;
|
int other_pid;
|
||||||
double dtemp;
|
double dtemp;
|
||||||
|
static double last_msg_time=0;
|
||||||
|
|
||||||
if (!app_client_shm.shm) {
|
if (!app_client_shm.shm) {
|
||||||
msg_printf(result->project, MSG_INFO,
|
msg_printf(result->project, MSG_INFO,
|
||||||
|
@ -1381,6 +1382,14 @@ bool ACTIVE_TASK::get_app_status_msg() {
|
||||||
first_fraction_done = fd;
|
first_fraction_done = fd;
|
||||||
first_fraction_done_elapsed_time = elapsed_time;
|
first_fraction_done_elapsed_time = elapsed_time;
|
||||||
}
|
}
|
||||||
|
if (log_flags.task_debug && (fd<0 || fd>1)) {
|
||||||
|
if (gstate.now > last_msg_time + 60) {
|
||||||
|
msg_printf(this->wup->project, MSG_INFO,
|
||||||
|
"[task_debug] app reported bad fraction done: %f", fd
|
||||||
|
);
|
||||||
|
last_msg_time = gstate.now;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parse_double(msg_buf, "<current_cpu_time>", current_cpu_time);
|
parse_double(msg_buf, "<current_cpu_time>", current_cpu_time);
|
||||||
|
|
Loading…
Reference in New Issue