diff --git a/checkin_notes b/checkin_notes index d6df0b4676..7f097e71ec 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9719,3 +9719,10 @@ Charlie 4 Dec 2009 project.pbxproj mac-installer/ Installer.cpp + +David 4 Dec 2009 + - client: fix bug in debt calculation + - client: zeroes STD too + + client/ + work_fetch.cpp,h diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 4c160519ed..8673dfcbfd 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -324,13 +324,9 @@ void WORK_FETCH::set_overall_debts() { void WORK_FETCH::zero_debts() { for (unsigned i=0; icpu_pwf.long_term_debt = 0; - if (coproc_cuda) { - p->cuda_pwf.long_term_debt = 0; - } - if (coproc_ati) { - p->ati_pwf.long_term_debt = 0; - } + p->cpu_pwf.zero_debt(); + p->cuda_pwf.zero_debt(); + p->ati_pwf.zero_debt(); } } @@ -706,7 +702,7 @@ void RSC_WORK_FETCH::update_long_term_debts() { offset = 2*delta_limit; } if (log_flags.debt_debug) { - msg_printf(0, MSG_INFO, "[debt] %s debt: adding offset %.2f", + msg_printf(0, MSG_INFO, "[debt] %s LTD: adding offset %.2f", rsc_name(rsc_type), offset ); } @@ -714,8 +710,13 @@ void RSC_WORK_FETCH::update_long_term_debts() { p = gstate.projects[i]; if (p->non_cpu_intensive) continue; RSC_PROJECT_WORK_FETCH& w = project_state(p); - if (w.debt_eligible(p, *this) && offset < 0) continue; - w.long_term_debt += offset; + if (w.debt_eligible(p, *this)) { + w.long_term_debt += offset; + } else { + if (offset > 0) { + w.long_term_debt += offset; + } + } if (w.long_term_debt > 0) w.long_term_debt = 0; } } diff --git a/client/work_fetch.h b/client/work_fetch.h index 8af79c6e48..8b77879d80 100644 --- a/client/work_fetch.h +++ b/client/work_fetch.h @@ -70,8 +70,15 @@ struct RSC_PROJECT_WORK_FETCH { memset(this, 0, sizeof(*this)); } - // whether this project is accumulating debt for this resource + // whether this project should accumulate debt for this resource + // bool debt_eligible(PROJECT*, RSC_WORK_FETCH&); + + inline void zero_debt() { + long_term_debt = 0; + short_term_debt = 0; + } + inline void reset() { backoff_time = 0; backoff_interval = 0; diff --git a/doc/get_platforms.inc b/doc/get_platforms.inc index 375eb8bd40..fd3dd51b6b 100644 --- a/doc/get_platforms.inc +++ b/doc/get_platforms.inc @@ -43,9 +43,11 @@ function friendly_name($p) { // function get_platforms(&$url) { $url .= 'get_project_config.php'; - $x = file_get_contents($url); + $x = @file_get_contents($url); if (!$x) return null; - $s = new SimpleXMLElement($x); + libxml_use_internal_errors(true); + $s = simplexml_load_string($x); + if (!$s) return null; if (array_key_exists('rpc_prefix', $s)) { $url = $s->rpc_prefix; } @@ -60,7 +62,6 @@ function get_platforms(&$url) { } else { $list = array(); foreach ($p->platform as $r) { - print_r($r); if (array_key_exists('plan_class', $r)) { $list[] = (string)$r->platform_name.'['.(string)$r->plan_class.']'; } else { @@ -75,9 +76,10 @@ function get_platforms(&$url) { // function get_platforms2($url) { $url .= 'apps.php?xml=1'; - $x = file_get_contents($url); + $x = @file_get_contents($url); if (!$x) return null; - $s = new SimpleXMLElement($x); + libxml_use_internal_errors(true); + $s = simplexml_load_string($x); $list = null; foreach($s->application as $a) { foreach ($a->version as $v) { @@ -88,10 +90,9 @@ function get_platforms2($url) { $pc = $v->plan_class[0]; } if (strlen($pc)) { - $list[] = $p.'['.$pc.']'; - } else { - $list[] = $p; + $p = $p.'['.$pc.']'; } + $list[] = (string)$p; } } return array_unique($list); diff --git a/doc/gpu.php b/doc/gpu.php index 15e16519d8..526d08913a 100644 --- a/doc/gpu.php +++ b/doc/gpu.php @@ -39,8 +39,7 @@ A full list is

2) Get the latest BOINC software

3) Get the latest driver

@@ -59,7 +58,11 @@ Projects with NVIDIA applications: Projects with ATI applications: