client: on initial RPC to a project, don't request work if 0 resource share

This commit is contained in:
David Anderson 2015-09-08 21:56:11 -07:00
parent 2f2f5a0c43
commit c9c3e9e4d9
1 changed files with 8 additions and 5 deletions

View File

@ -910,12 +910,15 @@ void WORK_FETCH::handle_reply(
// since we don't have good runtime estimates yet
//
void WORK_FETCH::set_initial_work_request(PROJECT* p) {
clear_request();
for (int i=0; i<coprocs.n_rsc; i++) {
rsc_work_fetch[i].req_secs = 1;
if (i) {
RSC_WORK_FETCH& rwf = rsc_work_fetch[i];
if (rwf.ninstances == p->rsc_pwf[i].ncoprocs_excluded) {
rsc_work_fetch[i].req_secs = 0;
if (p->resource_share > 0) {
rsc_work_fetch[i].req_secs = 1;
if (i) {
RSC_WORK_FETCH& rwf = rsc_work_fetch[i];
if (rwf.ninstances == p->rsc_pwf[i].ncoprocs_excluded) {
rsc_work_fetch[i].req_secs = 0;
}
}
}
rsc_work_fetch[i].busy_time_estimator.reset();