- client: if a project is anonymous platform and it has no

app versions that use a resource,
    don't request work from it for that resource.

svn path=/trunk/boinc/; revision=20549
This commit is contained in:
David Anderson 2010-02-11 22:19:22 +00:00
parent d2636954b0
commit d78b5fb79a
6 changed files with 74 additions and 30 deletions

View File

@ -743,15 +743,15 @@ David 27 Jan 2010
work_fetch.cpp
David 27 Jan 2010
- client: fix work fetch bug that prevented getting work
from an overworked project,
even if idle instance or major shortfall.
- GUI RPC: finish the notice-duplication thing
- client: fix work fetch bug that prevented getting work
from an overworked project,
even if idle instance or major shortfall.
- GUI RPC: finish the notice-duplication thing
client/
work_fetch.cpp,h
lib/
gui_rpc_client_ops.cpp
client/
work_fetch.cpp,h
lib/
gui_rpc_client_ops.cpp
David 27 Jan 2010
- client: remove debug msgs
@ -784,11 +784,11 @@ Charlie 28 Jan 2010
Mac_SA_Secure.sh
David 28 Jan 2010
- client: fix my last checkin
- client: fix my last checkin
client/
client_types.cpp
cs_statefile.cpp
client/
client_types.cpp
cs_statefile.cpp
David 29 Jan 2010
- user web: allow zero resource share
@ -809,12 +809,12 @@ David 29 Jan 2010
forum_reply.php
David 30 Jan 2010
- manager: move Preferences and Options to Task menu.
Give them more descriptive names.
Clean up mnemonics
- manager: move Preferences and Options to Task menu.
Give them more descriptive names.
Clean up mnemonics
clientgui/
AdvancedFrame.cpp
clientgui/
AdvancedFrame.cpp
David 1 Feb 2010
- graphics API: if font missing, find one that isn't (from Kevin)
@ -1020,14 +1020,14 @@ Charlie 8 Feb 2010
BOINCSaver.nib
David 9 Feb 2010
- client: undo [17160]. <ncpus>0</ncpus> in cc_config.xml
no longer means simulate zero CPUs.
There are several places that divide by ncpus.
Zero CPUs doesn't make any sense anyway.
- client: undo [17160]. <ncpus>0</ncpus> in cc_config.xml
no longer means simulate zero CPUs.
There are several places that divide by ncpus.
Zero CPUs doesn't make any sense anyway.
client/
cpu_sched.cpp
work_fetch.cpp
client/
cpu_sched.cpp
work_fetch.cpp
Rom 9 Feb 2010
- client: some more CPU detection cleanup.
@ -1145,3 +1145,14 @@ Rom 10 Feb 2010
clientgui/
BOINCTaskBar.cpp, .h
David 11 Feb 2009
- client: if a project is anonymous platform and it has no
app versions that use a resource,
don't request work from it for that resource.
client/
work_fetch.cpp,h
client_state.cpp
html/inc/
prefs.inc

View File

@ -287,7 +287,9 @@ int CLIENT_STATE::init() {
//
check_anonymous();
cpu_benchmarks_set_defaults(); // for first time, make sure p_fpops nonzero
// first time, set p_fpops nonzero to avoid div by zero
//
cpu_benchmarks_set_defaults();
// Parse the client state file,
// ignoring any <project> tags (and associated stuff)
@ -301,7 +303,7 @@ int CLIENT_STATE::init() {
parse_account_files_venue();
// fill in avp->flops for anonymous project
// fill in avp->flops for anonymous platform projects
//
for (i=0; i<app_versions.size(); i++) {
APP_VERSION* avp = app_versions[i];
@ -1590,7 +1592,7 @@ int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) {
// - Reset (see above)
// - delete all file infos
// - delete account file
// - delete account directory
// - delete project directory
//
int CLIENT_STATE::detach_project(PROJECT* project) {
vector<PROJECT*>::iterator project_iter;

View File

@ -285,6 +285,7 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) {
if (!p->pwf.can_fetch_work) continue;
if (!project_state(p).may_have_work) continue;
RSC_PROJECT_WORK_FETCH& rpwf = project_state(p);
if (rpwf.anon_skip) continue;
switch (criterion) {
case FETCH_IF_MINOR_SHORTFALL:
if (rpwf.overworked()) continue;
@ -360,6 +361,7 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) {
void RSC_WORK_FETCH::set_request(PROJECT* p, bool allow_overworked) {
RSC_PROJECT_WORK_FETCH& w = project_state(p);
if (!w.may_have_work) return;
if (w.anon_skip) return;
if (!allow_overworked && w.overworked()) return;
if (shortfall) {
if (wacky_dcf(p)) {
@ -1106,6 +1108,31 @@ void WORK_FETCH::init() {
if (config.zero_debts) {
zero_debts();
}
// see what resources anon platform projects can use
//
unsigned int i, j;
for (i=0; i<gstate.projects.size(); i++) {
PROJECT* p = gstate.projects[i];
if (!p->anonymous_platform) continue;
p->cpu_pwf.anon_skip = true;
p->cuda_pwf.anon_skip = true;
p->ati_pwf.anon_skip = true;
for (j=0; j<gstate.app_versions.size(); j++) {
APP_VERSION* avp = gstate.app_versions[j];
if (avp->project != p) continue;
if (avp->ncudas) {
p->cuda_pwf.anon_skip = false;
break;
} else if (avp->natis) {
p->ati_pwf.anon_skip = false;
break;
} else {
p->cpu_pwf.anon_skip = false;
break;
}
}
}
}
////////////////////////

View File

@ -53,6 +53,9 @@ struct RSC_PROJECT_WORK_FETCH {
double queue_est;
// an estimate of instance-secs of queued work;
// a temp used in computing overall debts
bool anon_skip;
// set if this project is anonymous platform
// and it has no app version that uses this resource
// the following are used by rr_simulation()
//

View File

@ -221,6 +221,7 @@ function language_form() {
//."<option value=lt>Lietuvių (Lithuanian)"
."<option value=nl>Nederlands (Dutch)"
//."<option value=pl>Polski (Polish)"
."<option value=pt>Portugu&ecirc;s (Portuguese)"
//."<option value=pt_BR>Portugu&ecirc;s - Brasil (Portuguese - Brazil)"
."<option value=ru>Русский (Russian)"
//."<option value=sk>Slovenčina (Slovakian)"

View File

@ -88,9 +88,9 @@ define("SUSPEND_CPU_USAGE_DESC",
define("START_END_DESC", "Do work only between the hours of");
define("START_END_DESC2", "<br><span class=note>(no restriction if equal)</span>");
define("LEAVE_APPS_IN_MEMORY_DESC",
"Leave applications in memory while suspended?
<br><span class=note>(suspended applications will consume swap space if 'yes')</span>");
define("CPU_SCHEDULING_DESC", "Switch between applications every
"Leave tasks in memory while suspended?
<br><span class=note>(suspended tasks will consume swap space if 'yes')</span>");
define("CPU_SCHEDULING_DESC", "Switch between tasks every
<br><span class=note>(recommended: 60 minutes)</span>");
define("CONFIRM_BEFORE_CONNECTING_DESC",
"Confirm before connecting to Internet?