- client: if project is anonymous platform, set the overall work req

to the max of the requests for different resource types.
    Otherwise projects with old schedulers won't send us work.

svn path=/trunk/boinc/; revision=18945
This commit is contained in:
David Anderson 2009-08-31 03:42:01 +00:00
parent cdb61b46e0
commit 29c1751898
4 changed files with 27 additions and 4 deletions

View File

@ -7317,3 +7317,12 @@ David 29 Aug 2009
client/
cpu_sched.cpp
gui_rpc_server_ops.cpp
David 30 Aug 2009
- client: if project is anonymous platform, set the overall work req
to the max of the requests for different resource types.
Otherwise projects with old schedulers won't send us work.
client/
cs_scheduler.cpp
work_fetch.cpp,h

View File

@ -132,7 +132,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
p->duration_correction_factor,
g_use_sandbox?1:0
);
work_fetch.write_request(f);
work_fetch.write_request(f, p->anonymous_platform);
// write client capabilities
//

View File

@ -745,13 +745,27 @@ bool RSC_PROJECT_WORK_FETCH::debt_eligible(PROJECT* p, RSC_WORK_FETCH& rwf) {
return true;
}
void WORK_FETCH::write_request(FILE* f) {
void WORK_FETCH::write_request(FILE* f, bool anonymous_platform) {
double work_req = cpu_work_fetch.req_secs;
// if project is anonymous platform, set the overall work req
// to the max of the requests for different resource types.
// Otherwise projects with old schedulers won't send us work.
//
if (anonymous_platform) {
if (coproc_cuda && cuda_work_fetch.req_secs > work_req) {
work_req = cuda_work_fetch.req_secs;
}
if (coproc_ati && ati_work_fetch.req_secs > work_req) {
work_req = ati_work_fetch.req_secs;
}
}
fprintf(f,
" <work_req_seconds>%f</work_req_seconds>\n"
" <cpu_req_secs>%f</cpu_req_secs>\n"
" <cpu_req_instances>%d</cpu_req_instances>\n"
" <estimated_delay>%f</estimated_delay>\n",
cpu_work_fetch.req_secs,
work_req,
cpu_work_fetch.req_secs,
cpu_work_fetch.req_instances,
cpu_work_fetch.req_secs?cpu_work_fetch.busy_time:0

View File

@ -170,7 +170,7 @@ struct WORK_FETCH {
// we're going to contact this project anyway;
// decide how much work to task for
void accumulate_inst_sec(ACTIVE_TASK*, double dt);
void write_request(FILE*);
void write_request(FILE*, bool anonymous_platform);
void handle_reply(PROJECT*, std::vector<RESULT*>new_results);
void set_initial_work_request();
void set_shortfall_requests(PROJECT*);