From c9c3e9e4d9fbd569117ffcdf8e814d8cb2a0f757 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 8 Sep 2015 21:56:11 -0700 Subject: [PATCH] client: on initial RPC to a project, don't request work if 0 resource share --- client/work_fetch.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 6f06c1ed50..1a9bf0312f 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -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; irsc_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();