mirror of https://github.com/BOINC/boinc.git
- client: fix bug in debt calculation
- client: <zero_debts> zeroes STD too svn path=/trunk/boinc/; revision=19783
This commit is contained in:
parent
dc43748b5c
commit
2ef5c5895b
|
@ -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: <zero_debts> zeroes STD too
|
||||
|
||||
client/
|
||||
work_fetch.cpp,h
|
||||
|
|
|
@ -324,13 +324,9 @@ void WORK_FETCH::set_overall_debts() {
|
|||
void WORK_FETCH::zero_debts() {
|
||||
for (unsigned i=0; i<gstate.projects.size(); i++) {
|
||||
PROJECT* p = gstate.projects[i];
|
||||
p->cpu_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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -39,8 +39,7 @@ A full list is
|
|||
<h3>2) Get the latest BOINC software</h3>
|
||||
<ul>
|
||||
<li> <a href=download.php>Download and install</a>
|
||||
version 6.6.36 or later of the BOINC software.
|
||||
<li>ATI GPUs: you'll need 6.10.3 or later.
|
||||
the latest version of the BOINC software.
|
||||
</ul>
|
||||
<p>
|
||||
<h3>3) Get the latest driver</h3>
|
||||
|
@ -59,7 +58,11 @@ Projects with NVIDIA applications:
|
|||
<ul>
|
||||
<li> <a href=http://gpugrid.net>GPUgrid.net</a>
|
||||
<li> <a href=http://setiathome.berkeley.edu>SETI@home</a>
|
||||
<li> <a href=http://milkyway.cs.rpi.edu/milkyway/>Milkyway@home</a>
|
||||
<li> <a href=http://aqua.dwavesys.com/>AQUA@home</a>
|
||||
<li> <a href=http://boinc.umiacs.umd.edu/>Lattice</a>
|
||||
<li> <a href=http://boinc.thesonntags.com/collatz/>Collatz Conjecture</a>
|
||||
<li> <a href=http://hydrogenathome.org/>Hydrogen@home</a>
|
||||
</ul>
|
||||
|
||||
Projects with ATI applications:
|
||||
|
|
Loading…
Reference in New Issue