scheduler: cap CPU time of reported results at elapsed time * ncpus

This affects only result display,
since CPU time is no longer used for anything.
This commit is contained in:
David Anderson 2014-04-10 23:52:13 -07:00
parent 0d6ea0018f
commit bb4f4194d0
1 changed files with 11 additions and 0 deletions

View File

@ -341,6 +341,17 @@ int handle_results() {
}
}
// check for impossible CPU time
//
if (srip->cpu_time > srip->elapsed_time*g_reply->host.p_ncpus) {
log_messages.printf(MSG_NORMAL,
"[HOST#%d] [RESULT#%u] [WU#%u] impossible CPU time: %f > %f * %d\n",
srip->hostid, srip->id, srip->workunitid,
srip->cpu_time, srip->elapsed_time, g_reply->host.p_ncpus
);
srip->cpu_time = srip->elapsed_time*g_reply->host.p_ncpus;
}
srip->exit_status = rp->exit_status;
srip->app_version_num = rp->app_version_num;
srip->server_state = RESULT_SERVER_STATE_OVER;