*** empty log message ***

svn path=/trunk/boinc/; revision=6444
This commit is contained in:
David Anderson 2005-06-26 19:34:17 +00:00
parent eb47536c61
commit 483a775065
4 changed files with 37 additions and 0 deletions

View File

@ -8538,3 +8538,18 @@ David 25 June 2005
client/
cs_scheduler.C
David 26 June 2005
- scheduler: when handling a reported result,
cap CPU time at now - sent_time.
(from Rattledagger)
Note: this assumes that applications never use >1 CPU
for non-graphical computation.
Currently this is the case,
but if it changes we need to rethink this check.
db/
boinc_db.C,h
sched/
handle_request.C

View File

@ -1264,6 +1264,7 @@ int DB_WORK_ITEM::enumerate(
// The items that appear here must agree with those that appear in the
// enumerate method just below!
//
void SCHED_RESULT_ITEM::parse(MYSQL_ROW& r) {
int i=0;
clear();
@ -1273,6 +1274,7 @@ void SCHED_RESULT_ITEM::parse(MYSQL_ROW& r) {
server_state = atoi(r[i++]);
hostid = atoi(r[i++]);
userid = atoi(r[i++]);
sent_time = atoi(r[i++]);
received_time = atoi(r[i++]);
}
@ -1300,6 +1302,7 @@ int DB_SCHED_RESULT_ITEM_SET::enumerate() {
" server_state, "
" hostid, "
" userid, "
" sent_time, "
" received_time "
"FROM "
" result "

View File

@ -648,6 +648,7 @@ struct SCHED_RESULT_ITEM {
int hostid;
int userid;
int teamid;
int sent_time;
int received_time;
double cpu_time;
double claimed_credit;

View File

@ -601,6 +601,24 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
srip->received_time = time(0);
srip->client_state = rp->client_state;
srip->cpu_time = rp->cpu_time;
// check for impossible CPU time
//
double elapsed_time = srip->received_time - srip->sent_time;
if (elapsed_time < 0) {
log_messages.printf(SCHED_MSG_LOG::NORMAL,
"[RESULT#%d] inconsistent sent/received times\n", srip->id
);
} else {
if (srip->cpu_time > elapsed_time) {
log_messages.printf(SCHED_MSG_LOG::NORMAL,
"[RESULT#%d] excessive CPU time reported: %f\n",
srip->id, srip->cpu_time
);
srip->cpu_time = elapsed_time;
}
}
srip->exit_status = rp->exit_status;
srip->app_version_num = rp->app_version_num;
if (rp->fpops_cumulative) {