diff --git a/checkin_notes b/checkin_notes index 5c2b1ca3fe..27aba156d3 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3270,10 +3270,17 @@ David 5 Apr 2007 lib/ boinc_cmd.C -David 5 Apr 2007 +David 6 Apr 2007 - client simulator: add the ability to do many simulations, each specified in a separate directory, and show the individual and total results. client/ sim.C,h + +David 6 Apr 2007 + - core client: sanity check on work request size + (from John McLeod) + + client/ + work_fetch.C diff --git a/client/work_fetch.C b/client/work_fetch.C index 7346cfce16..953d9a1501 100644 --- a/client/work_fetch.C +++ b/client/work_fetch.C @@ -576,7 +576,17 @@ bool CLIENT_STATE::compute_work_requests() { pbest->cpu_shortfall, cpu_shortfall * (prrs ? pbest->resource_share/prrs : 1) ); - + + // sanity check + // + double x = (work_buf_additional() + work_buf_min())*ncpus; + if (pbest->work_request > x) { + msg_printf(NULL, MSG_INTERNAL_ERROR, + "Proposed work request %f bigger than max %f", + pbest->work_request, x + ); + pbest->work_request = x; + } if (!pbest->nearly_runnable()) { pbest->work_request_urgency = WORK_FETCH_NEED_IMMEDIATELY; } else if (pbest->cpu_shortfall) {