mirror of https://github.com/BOINC/boinc.git
- client: fix bug related to deselecting resource types in project prefs.
Some logic was missing. svn path=/trunk/boinc/; revision=23825
This commit is contained in:
parent
18f8847adb
commit
13cfc73b3c
|
@ -3217,15 +3217,15 @@ David 31 May 2011
|
||||||
app_control.cpp
|
app_control.cpp
|
||||||
|
|
||||||
David 31 May 2011
|
David 31 May 2011
|
||||||
- web: add counts in task list pages
|
- web: add counts in task list pages
|
||||||
|
|
||||||
html/
|
html/
|
||||||
inc/
|
inc/
|
||||||
boinc_db.inc
|
boinc_db.inc
|
||||||
util.inc
|
util.inc
|
||||||
result.inc
|
result.inc
|
||||||
user/
|
user/
|
||||||
results.php
|
results.php
|
||||||
|
|
||||||
Charlie 2 Jun 2011
|
Charlie 2 Jun 2011
|
||||||
- MGR: Add SQLite3 v3.7.6.3 source code to Mac XCode project, adding
|
- MGR: Add SQLite3 v3.7.6.3 source code to Mac XCode project, adding
|
||||||
|
@ -3543,7 +3543,7 @@ Rom 15 Jun 2011
|
||||||
blankicon.xpm
|
blankicon.xpm
|
||||||
|
|
||||||
David 15 Jun 2011
|
David 15 Jun 2011
|
||||||
- manager: tweaks to project list
|
- manager: tweaks to project list
|
||||||
|
|
||||||
clientgui/
|
clientgui/
|
||||||
ProjectInfoPage.cpp
|
ProjectInfoPage.cpp
|
||||||
|
@ -3663,17 +3663,17 @@ Charlie 20 Jun 2011
|
||||||
client_state.cpp
|
client_state.cpp
|
||||||
|
|
||||||
David 21 Jun 2011
|
David 21 Jun 2011
|
||||||
- GUI RPC: restore <have_cuda>, <have_ati> elements in CC_STATE
|
- GUI RPC: restore <have_cuda>, <have_ati> elements in CC_STATE
|
||||||
for compatibility
|
for compatibility
|
||||||
- client: copy coprocs to host_info._coprocs at startup
|
- client: copy coprocs to host_info._coprocs at startup
|
||||||
(else GUI RPCs don't have right info)
|
(else GUI RPCs don't have right info)
|
||||||
|
|
||||||
client/
|
client/
|
||||||
client_state.cpp
|
client_state.cpp
|
||||||
cs_statefile.cpp
|
cs_statefile.cpp
|
||||||
lib/
|
lib/
|
||||||
gui_rpc_client.h
|
gui_rpc_client.h
|
||||||
gui_rpc_client_ops.cpp
|
gui_rpc_client_ops.cpp
|
||||||
|
|
||||||
David 21 Jun 2011
|
David 21 Jun 2011
|
||||||
- web: add a web-service interface for remotely submitting, querying
|
- web: add a web-service interface for remotely submitting, querying
|
||||||
|
@ -3968,3 +3968,12 @@ Charlie 8 July 2011
|
||||||
BOINCTaskBar.cpp
|
BOINCTaskBar.cpp
|
||||||
mac/
|
mac/
|
||||||
MacSysMenu.cpp, .h
|
MacSysMenu.cpp, .h
|
||||||
|
|
||||||
|
David 8 July 2011
|
||||||
|
- client: fix bug related to deselecting resource types in project prefs.
|
||||||
|
Some logic was missing.
|
||||||
|
|
||||||
|
client/
|
||||||
|
client_types.cpp,h
|
||||||
|
cs_account.cpp
|
||||||
|
work_fetch.cpp
|
||||||
|
|
|
@ -140,16 +140,22 @@ void PROJECT::init() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PROJECT::handle_no_rsc_ams(const char* name, bool value) {
|
static void handle_no_rsc_ams(PROJECT* p, const char* name) {
|
||||||
int i = rsc_index(name);
|
int i = rsc_index(name);
|
||||||
if (i < 0) return;
|
if (i < 0) return;
|
||||||
no_rsc_ams[i] = value;
|
p->no_rsc_ams[i] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PROJECT::handle_no_rsc_apps(const char* name, bool value) {
|
static void handle_no_rsc_pref(PROJECT* p, const char* name) {
|
||||||
|
int i = rsc_index(name);
|
||||||
|
if (i<0) return;
|
||||||
|
p->no_rsc_pref[i] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void handle_no_rsc_apps(PROJECT* p, const char* name) {
|
||||||
int i = rsc_index(name);
|
int i = rsc_index(name);
|
||||||
if (i < 0) return;
|
if (i < 0) return;
|
||||||
no_rsc_apps[i] = value;
|
p->no_rsc_apps[i] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool parse_rsc_param(MIOFILE& in, const char* end_tag, int& rsc_type, double& value) {
|
static bool parse_rsc_param(MIOFILE& in, const char* end_tag, int& rsc_type, double& value) {
|
||||||
|
@ -283,37 +289,40 @@ int PROJECT::parse_state(MIOFILE& in) {
|
||||||
if (parse_double(buf, "<duration_correction_factor>", duration_correction_factor)) continue;
|
if (parse_double(buf, "<duration_correction_factor>", duration_correction_factor)) continue;
|
||||||
if (parse_bool(buf, "attached_via_acct_mgr", attached_via_acct_mgr)) continue;
|
if (parse_bool(buf, "attached_via_acct_mgr", attached_via_acct_mgr)) continue;
|
||||||
if (parse_bool(buf, "no_cpu_apps", btemp)) {
|
if (parse_bool(buf, "no_cpu_apps", btemp)) {
|
||||||
handle_no_rsc_apps("CPU", btemp);
|
if (btemp) handle_no_rsc_apps(this, "CPU");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_bool(buf, "no_cuda_apps", btemp)) {
|
if (parse_bool(buf, "no_cuda_apps", btemp)) {
|
||||||
handle_no_rsc_apps("NVIDIA", btemp);
|
if (btemp) handle_no_rsc_apps(this, "NVIDIA");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_bool(buf, "no_ati_apps", btemp)) {
|
if (parse_bool(buf, "no_ati_apps", btemp)) {
|
||||||
handle_no_rsc_apps("ATI", btemp);
|
if (btemp) handle_no_rsc_apps(this, "ATI");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_str(buf, "<no_rsc_apps>", buf, sizeof(buf))) {
|
if (parse_str(buf, "<no_rsc_apps>", buf, sizeof(buf))) {
|
||||||
handle_no_rsc_apps(buf, true);
|
handle_no_rsc_apps(this, buf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_bool(buf, "no_cpu_ams", btemp)) {
|
if (parse_bool(buf, "no_cpu_ams", btemp)) {
|
||||||
handle_no_rsc_ams("CPU", btemp);
|
if (btemp) handle_no_rsc_ams(this, "CPU");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_bool(buf, "no_cuda_ams", btemp)) {
|
if (parse_bool(buf, "no_cuda_ams", btemp)) {
|
||||||
handle_no_rsc_ams("NVIDIA", btemp);
|
if (btemp) handle_no_rsc_ams(this, "NVIDIA");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_bool(buf, "no_ati_ams", btemp)) {
|
if (parse_bool(buf, "no_ati_ams", btemp)) {
|
||||||
handle_no_rsc_ams("ATI", btemp);
|
if (btemp) handle_no_rsc_ams(this, "ATI");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (parse_str(buf, "<no_rsc_ams>", buf, sizeof(buf))) {
|
if (parse_str(buf, "<no_rsc_ams>", buf, sizeof(buf))) {
|
||||||
handle_no_rsc_ams(buf, true);
|
handle_no_rsc_ams(this, buf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (parse_str(buf, "<no_rsc_pref>", buf, sizeof(buf))) {
|
||||||
|
handle_no_rsc_pref(this, buf);
|
||||||
|
}
|
||||||
|
|
||||||
// backwards compat - old state files had ams_resource_share = 0
|
// backwards compat - old state files had ams_resource_share = 0
|
||||||
if (parse_double(buf, "<ams_resource_share_new>", ams_resource_share)) continue;
|
if (parse_double(buf, "<ams_resource_share_new>", ams_resource_share)) continue;
|
||||||
|
@ -459,6 +468,9 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
||||||
if (no_rsc_apps[j]) {
|
if (no_rsc_apps[j]) {
|
||||||
out.printf(" <no_rsc_apps>%s</no_rsc_apps>\n", rsc_name(j));
|
out.printf(" <no_rsc_apps>%s</no_rsc_apps>\n", rsc_name(j));
|
||||||
}
|
}
|
||||||
|
if (no_rsc_pref[j]) {
|
||||||
|
out.printf(" <no_rsc_pref>%s</no_rsc_pref>\n", rsc_name(j));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ams_resource_share >= 0) {
|
if (ams_resource_share >= 0) {
|
||||||
out.printf(" <ams_resource_share_new>%f</ams_resource_share_new>\n",
|
out.printf(" <ams_resource_share_new>%f</ams_resource_share_new>\n",
|
||||||
|
@ -485,11 +497,6 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
||||||
upload_backoff.next_xfer_time - gstate.now
|
upload_backoff.next_xfer_time - gstate.now
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (int j=0; j<coprocs.n_rsc; j++) {
|
|
||||||
if (no_rsc_pref[j]) {
|
|
||||||
out.printf(" <no_rsc_pref>%s</no_rsc_pref>\n", rsc_name(j));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (strlen(host_venue)) {
|
if (strlen(host_venue)) {
|
||||||
out.printf(" <venue>%s</venue>\n", host_venue);
|
out.printf(" <venue>%s</venue>\n", host_venue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -446,9 +446,6 @@ struct PROJECT : PROJ_AM {
|
||||||
int parse_account_file();
|
int parse_account_file();
|
||||||
int parse_state(MIOFILE&);
|
int parse_state(MIOFILE&);
|
||||||
int write_state(MIOFILE&, bool gui_rpc=false);
|
int write_state(MIOFILE&, bool gui_rpc=false);
|
||||||
void handle_no_rsc_ams(const char*, bool);
|
|
||||||
void handle_no_rsc_apps(const char*, bool);
|
|
||||||
void handle_no_rsc_pref(const char*, bool);
|
|
||||||
|
|
||||||
// statistic of the last x days
|
// statistic of the last x days
|
||||||
std::vector<DAILY_STATS> statistics;
|
std::vector<DAILY_STATS> statistics;
|
||||||
|
|
|
@ -85,10 +85,10 @@ int PROJECT::write_account_file() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PROJECT::handle_no_rsc_pref(const char* name, bool value) {
|
void handle_no_rsc_pref(PROJECT* p, const char* name) {
|
||||||
int i = rsc_index(name);
|
int i = rsc_index(name);
|
||||||
if (i < 0) return;
|
if (i < 0) return;
|
||||||
no_rsc_pref[i] = value;
|
p->no_rsc_pref[i] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse an account_*.xml file, ignoring <venue> elements
|
// parse an account_*.xml file, ignoring <venue> elements
|
||||||
|
@ -127,19 +127,19 @@ int PROJECT::parse_account(FILE* in) {
|
||||||
} else if (parse_str(buf, "<authenticator>", authenticator, sizeof(authenticator))) continue;
|
} else if (parse_str(buf, "<authenticator>", authenticator, sizeof(authenticator))) continue;
|
||||||
else if (parse_double(buf, "<resource_share>", resource_share)) continue;
|
else if (parse_double(buf, "<resource_share>", resource_share)) continue;
|
||||||
else if (parse_bool(buf, "no_cpu", btemp)) {
|
else if (parse_bool(buf, "no_cpu", btemp)) {
|
||||||
handle_no_rsc_pref("CPU", btemp);
|
if (btemp) handle_no_rsc_pref(this, "CPU");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_bool(buf, "no_cuda", btemp)) {
|
else if (parse_bool(buf, "no_cuda", btemp)) {
|
||||||
handle_no_rsc_pref("NVIDIA", btemp);
|
if (btemp) handle_no_rsc_pref(this, "NVIDIA");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_bool(buf, "no_ati", btemp)) {
|
else if (parse_bool(buf, "no_ati", btemp)) {
|
||||||
handle_no_rsc_pref("ATI", btemp);
|
if (btemp) handle_no_rsc_pref(this, "ATI");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_str(buf, "no_rsc", buf2, sizeof(buf2))) {
|
else if (parse_str(buf, "no_rsc", buf2, sizeof(buf2))) {
|
||||||
handle_no_rsc_pref(buf2, true);
|
handle_no_rsc_pref(this, buf2);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_str(buf, "<project_name>", project_name, sizeof(project_name))) continue;
|
else if (parse_str(buf, "<project_name>", project_name, sizeof(project_name))) continue;
|
||||||
|
@ -223,19 +223,19 @@ int PROJECT::parse_account_file_venue() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_bool(buf, "no_cpu", btemp)) {
|
else if (parse_bool(buf, "no_cpu", btemp)) {
|
||||||
handle_no_rsc_pref("CPU", btemp);
|
if (btemp) handle_no_rsc_pref(this, "CPU");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_bool(buf, "no_cuda", btemp)) {
|
else if (parse_bool(buf, "no_cuda", btemp)) {
|
||||||
handle_no_rsc_pref("NVIDIA", btemp);
|
if (btemp) handle_no_rsc_pref(this, "NVIDIA");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_bool(buf, "no_ati", btemp)) {
|
else if (parse_bool(buf, "no_ati", btemp)) {
|
||||||
handle_no_rsc_pref("ATI", btemp);
|
if (btemp) handle_no_rsc_pref(this, "ATI");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (parse_str(buf, "no_rsc", buf2, sizeof(buf2))) {
|
else if (parse_str(buf, "no_rsc", buf2, sizeof(buf2))) {
|
||||||
handle_no_rsc_pref(buf2, true);
|
handle_no_rsc_pref(this, buf2);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -68,6 +68,7 @@ static const char* criterion_name(int criterion) {
|
||||||
inline bool dont_fetch(PROJECT* p, int rsc_type) {
|
inline bool dont_fetch(PROJECT* p, int rsc_type) {
|
||||||
if (p->no_rsc_pref[rsc_type]) return true;
|
if (p->no_rsc_pref[rsc_type]) return true;
|
||||||
if (p->no_rsc_apps[rsc_type]) return true;
|
if (p->no_rsc_apps[rsc_type]) return true;
|
||||||
|
if (p->no_rsc_ams[rsc_type]) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,8 +98,7 @@ inline bool has_coproc_app(PROJECT* p, int rsc_type) {
|
||||||
/////////////// RSC_PROJECT_WORK_FETCH ///////////////
|
/////////////// RSC_PROJECT_WORK_FETCH ///////////////
|
||||||
|
|
||||||
bool RSC_PROJECT_WORK_FETCH::compute_may_have_work(PROJECT* p, int rsc_type) {
|
bool RSC_PROJECT_WORK_FETCH::compute_may_have_work(PROJECT* p, int rsc_type) {
|
||||||
if (p->no_rsc_pref[rsc_type]) return false;
|
if (dont_fetch(p, rsc_type)) return false;
|
||||||
if (p->no_rsc_apps[rsc_type]) return false;
|
|
||||||
if (p->rsc_defer_sched[rsc_type]) return false;
|
if (p->rsc_defer_sched[rsc_type]) return false;
|
||||||
return (backoff_time < gstate.now);
|
return (backoff_time < gstate.now);
|
||||||
}
|
}
|
||||||
|
@ -370,6 +370,8 @@ if (use_rec) {
|
||||||
// don't request anything if project is overworked or backed off.
|
// don't request anything if project is overworked or backed off.
|
||||||
//
|
//
|
||||||
void RSC_WORK_FETCH::set_request(PROJECT* p, bool allow_overworked) {
|
void RSC_WORK_FETCH::set_request(PROJECT* p, bool allow_overworked) {
|
||||||
|
if (dont_fetch(p, rsc_type)) return;
|
||||||
|
|
||||||
// if backup project, fetch 1 job per idle instance
|
// if backup project, fetch 1 job per idle instance
|
||||||
//
|
//
|
||||||
if (p->resource_share == 0) {
|
if (p->resource_share == 0) {
|
||||||
|
@ -429,14 +431,13 @@ void RSC_WORK_FETCH::print_state(const char* name) {
|
||||||
PROJECT* p = gstate.projects[i];
|
PROJECT* p = gstate.projects[i];
|
||||||
if (p->non_cpu_intensive) continue;
|
if (p->non_cpu_intensive) continue;
|
||||||
RSC_PROJECT_WORK_FETCH& pwf = project_state(p);
|
RSC_PROJECT_WORK_FETCH& pwf = project_state(p);
|
||||||
bool blocked_by_prefs = false, no_apps = false;
|
bool no_rsc_pref = p->no_rsc_pref[rsc_type];
|
||||||
|
bool no_rsc_apps = p->no_rsc_apps[rsc_type];
|
||||||
if (p->no_rsc_pref[rsc_type]) blocked_by_prefs = true;
|
bool no_rsc_ams = p->no_rsc_ams[rsc_type];
|
||||||
if (p->no_rsc_apps[rsc_type]) no_apps = true;
|
|
||||||
double bt = pwf.backoff_time>gstate.now?pwf.backoff_time-gstate.now:0;
|
double bt = pwf.backoff_time>gstate.now?pwf.backoff_time-gstate.now:0;
|
||||||
if (use_rec) {
|
if (use_rec) {
|
||||||
msg_printf(p, MSG_INFO,
|
msg_printf(p, MSG_INFO,
|
||||||
"[work_fetch] %s: fetch share %.2f rec %.5f prio %.5f backoff dt %.2f int %.2f%s%s%s%s%s%s%s",
|
"[work_fetch] %s: fetch share %.2f rec %.5f prio %.5f backoff dt %.2f int %.2f%s%s%s%s%s%s%s%s",
|
||||||
name,
|
name,
|
||||||
pwf.fetchable_share, p->pwf.rec, project_priority(p), bt, pwf.backoff_interval,
|
pwf.fetchable_share, p->pwf.rec, project_priority(p), bt, pwf.backoff_interval,
|
||||||
p->suspended_via_gui?" (susp via GUI)":"",
|
p->suspended_via_gui?" (susp via GUI)":"",
|
||||||
|
@ -444,8 +445,9 @@ if (use_rec) {
|
||||||
p->min_rpc_time > gstate.now?" (comm deferred)":"",
|
p->min_rpc_time > gstate.now?" (comm deferred)":"",
|
||||||
p->dont_request_more_work?" (no new tasks)":"",
|
p->dont_request_more_work?" (no new tasks)":"",
|
||||||
p->too_many_uploading_results?" (too many uploads)":"",
|
p->too_many_uploading_results?" (too many uploads)":"",
|
||||||
blocked_by_prefs?" (blocked by prefs)":"",
|
no_rsc_pref?" (blocked by prefs)":"",
|
||||||
no_apps?" (no apps)":""
|
no_rsc_apps?" (no apps)":"",
|
||||||
|
no_rsc_ams?" (blocked by account manager)":""
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
msg_printf(p, MSG_INFO,
|
msg_printf(p, MSG_INFO,
|
||||||
|
@ -458,7 +460,7 @@ if (use_rec) {
|
||||||
p->dont_request_more_work?" (no new tasks)":"",
|
p->dont_request_more_work?" (no new tasks)":"",
|
||||||
pwf.overworked()?" (overworked)":"",
|
pwf.overworked()?" (overworked)":"",
|
||||||
p->too_many_uploading_results?" (too many uploads)":"",
|
p->too_many_uploading_results?" (too many uploads)":"",
|
||||||
blocked_by_prefs?" (blocked by prefs)":""
|
no_rsc_pref?" (blocked by prefs)":""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue