mirror of https://github.com/BOINC/boinc.git
- client, acct manager protocol:
allow <no_cpu>, <no_cuda> and <no_ati> bools within <account> in reply message. They suppress work fetch for that resource type from that project. - scheduler: check max_granted_credit after wu.rsc_fpops_bound, so that max_granted_credit will be enforced even if wu.rsc_fpops_bound is absurdly high Fixes #1034. From Diggory Hardy. svn path=/trunk/boinc/; revision=22793
This commit is contained in:
parent
2b67ec4ad9
commit
58dadd91a8
|
@ -8559,3 +8559,23 @@ David 1 Dec 2010
|
|||
cpu_sched.cpp
|
||||
lib/
|
||||
prefs.h
|
||||
|
||||
David 1 Dec 2010
|
||||
- client, acct manager protocol:
|
||||
allow <no_cpu>, <no_cuda> and <no_ati> bools
|
||||
within <account> in reply message.
|
||||
They suppress work fetch for that resource type from that project.
|
||||
- scheduler:
|
||||
check max_granted_credit after wu.rsc_fpops_bound,
|
||||
so that max_granted_credit will be enforced
|
||||
even if wu.rsc_fpops_bound is absurdly high
|
||||
Fixes #1034. From Diggory Hardy.
|
||||
|
||||
sched/
|
||||
credit.cpp
|
||||
client/
|
||||
sim.cpp
|
||||
acct_mgr.h
|
||||
client_types.cpp
|
||||
cs_statefile.cpp
|
||||
acct_mgr.cpp
|
||||
|
|
|
@ -209,6 +209,9 @@ int AM_ACCOUNT::parse(XML_PARSER& xp) {
|
|||
|
||||
detach = false;
|
||||
update = false;
|
||||
no_cpu = false;
|
||||
no_cuda = false;
|
||||
no_ati = false;
|
||||
dont_request_more_work.init();
|
||||
detach_when_done.init();
|
||||
suspend.init();
|
||||
|
@ -242,6 +245,9 @@ int AM_ACCOUNT::parse(XML_PARSER& xp) {
|
|||
if (xp.parse_string(tag, "authenticator", authenticator)) continue;
|
||||
if (xp.parse_bool(tag, "detach", detach)) continue;
|
||||
if (xp.parse_bool(tag, "update", update)) continue;
|
||||
if (xp.parse_bool(tag, "no_cpu", no_cpu)) continue;
|
||||
if (xp.parse_bool(tag, "no_cuda", no_cuda)) continue;
|
||||
if (xp.parse_bool(tag, "no_ati", no_ati)) continue;
|
||||
if (xp.parse_bool(tag, "dont_request_more_work", btemp)) {
|
||||
dont_request_more_work.set(btemp);
|
||||
continue;
|
||||
|
@ -535,6 +541,9 @@ void ACCT_MGR_OP::handle_reply(int http_op_retval) {
|
|||
pp->abort_not_started();
|
||||
}
|
||||
}
|
||||
pp->no_cpu_ams = acct.no_cpu;
|
||||
pp->no_cuda_ams = acct.no_cuda;
|
||||
pp->no_ati_ams = acct.no_ati;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -548,16 +557,19 @@ void ACCT_MGR_OP::handle_reply(int http_op_retval) {
|
|||
gstate.add_project(
|
||||
acct.url.c_str(), acct.authenticator.c_str(), "", true
|
||||
);
|
||||
if (acct.dont_request_more_work.present) {
|
||||
pp = gstate.lookup_project(acct.url.c_str());
|
||||
if (pp) {
|
||||
pp = gstate.lookup_project(acct.url.c_str());
|
||||
if (pp) {
|
||||
pp->no_cpu_ams = acct.no_cpu;
|
||||
pp->no_cuda_ams = acct.no_cuda;
|
||||
pp->no_ati_ams = acct.no_ati;
|
||||
if (acct.dont_request_more_work.present) {
|
||||
pp->dont_request_more_work = acct.dont_request_more_work.value;
|
||||
} else {
|
||||
msg_printf(NULL, MSG_INTERNAL_ERROR,
|
||||
"Project not found: %s",
|
||||
acct.url.c_str()
|
||||
);
|
||||
}
|
||||
} else {
|
||||
msg_printf(NULL, MSG_INTERNAL_ERROR,
|
||||
"Failed to add project: %s",
|
||||
acct.url.c_str()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,9 @@ struct AM_ACCOUNT {
|
|||
char url_signature[MAX_SIGNATURE_LEN];
|
||||
bool detach;
|
||||
bool update;
|
||||
bool no_cpu;
|
||||
bool no_cuda;
|
||||
bool no_ati;
|
||||
OPTIONAL_BOOL dont_request_more_work;
|
||||
OPTIONAL_BOOL detach_when_done;
|
||||
OPTIONAL_DOUBLE resource_share;
|
||||
|
|
|
@ -71,6 +71,9 @@ void PROJECT::init() {
|
|||
no_cpu_apps = false;
|
||||
no_cuda_apps = false;
|
||||
no_ati_apps = false;
|
||||
no_cpu_ams = false;
|
||||
no_cuda_ams = false;
|
||||
no_ati_ams = false;
|
||||
cuda_defer_sched = false;
|
||||
ati_defer_sched = false;
|
||||
strcpy(host_venue, "");
|
||||
|
@ -235,6 +238,9 @@ int PROJECT::parse_state(MIOFILE& in) {
|
|||
if (parse_bool(buf, "no_cpu_apps", no_cpu_apps)) continue;
|
||||
if (parse_bool(buf, "no_cuda_apps", no_cuda_apps)) continue;
|
||||
if (parse_bool(buf, "no_ati_apps", no_ati_apps)) continue;
|
||||
if (parse_bool(buf, "no_cpu_ams", no_cpu_ams)) continue;
|
||||
if (parse_bool(buf, "no_cuda_ams", no_cuda_ams)) continue;
|
||||
if (parse_bool(buf, "no_ati_ams", no_ati_ams)) continue;
|
||||
|
||||
// backwards compat - old state files had ams_resource_share = 0
|
||||
if (parse_double(buf, "<ams_resource_share_new>", ams_resource_share)) continue;
|
||||
|
@ -317,6 +323,9 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
|||
" <no_cpu_apps>%d</no_cpu_apps>\n"
|
||||
" <no_cuda_apps>%d</no_cuda_apps>\n"
|
||||
" <no_ati_apps>%d</no_ati_apps>\n"
|
||||
" <no_cpu_ams>%d</no_cpu_ams>\n"
|
||||
" <no_cuda_ams>%d</no_cuda_ams>\n"
|
||||
" <no_ati_ams>%d</no_ati_ams>\n"
|
||||
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
master_url,
|
||||
project_name,
|
||||
|
@ -368,6 +377,9 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
|||
no_cpu_apps?1:0,
|
||||
no_cuda_apps?1:0,
|
||||
no_ati_apps?1:0,
|
||||
no_cpu_ams?1:0,
|
||||
no_cuda_ams?1:0,
|
||||
no_ati_ams?1:0,
|
||||
anonymous_platform?" <anonymous_platform/>\n":"",
|
||||
master_url_fetch_pending?" <master_url_fetch_pending/>\n":"",
|
||||
trickle_up_pending?" <trickle_up_pending/>\n":"",
|
||||
|
|
|
@ -274,10 +274,12 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) {
|
|||
// and then reverted to a 32-bit client.
|
||||
// Let's not throw away the app version and its WUs
|
||||
//
|
||||
#ifndef SIM
|
||||
msg_printf(project, MSG_INTERNAL_ERROR,
|
||||
"App version has unsupported platform %s; changing to %s",
|
||||
avp->platform, get_primary_platform()
|
||||
);
|
||||
#endif
|
||||
strcpy(avp->platform, get_primary_platform());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1153,6 +1153,9 @@ void cull_projects() {
|
|||
while (iter != gstate.projects.end()) {
|
||||
p = *iter;
|
||||
if (p->dont_request_more_work) {
|
||||
msg_printf(p, MSG_INFO,
|
||||
"Removing from simulation - no jobs in client_state.xml"
|
||||
);
|
||||
iter = gstate.projects.erase(iter);
|
||||
} else {
|
||||
iter++;
|
||||
|
|
|
@ -737,18 +737,22 @@ int assign_credit_set(
|
|||
);
|
||||
}
|
||||
}
|
||||
if (max_granted_credit && pfc*COBBLESTONE_SCALE > max_granted_credit) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[credit] Credit too high: %f\n", pfc*COBBLESTONE_SCALE
|
||||
);
|
||||
pfc = wu_estimated_pfc(wu, app);
|
||||
}
|
||||
if (pfc > wu.rsc_fpops_bound) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[credit] PFC too high: %f\n", pfc*COBBLESTONE_SCALE
|
||||
);
|
||||
pfc = wu_estimated_pfc(wu, app);
|
||||
}
|
||||
|
||||
// max_granted_credit trumps rsc_fpops_bound;
|
||||
// the latter may be set absurdly high
|
||||
//
|
||||
if (max_granted_credit && pfc*COBBLESTONE_SCALE > max_granted_credit) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[credit] Credit too high: %f\n", pfc*COBBLESTONE_SCALE
|
||||
);
|
||||
pfc = max_granted_credit/COBBLESTONE_SCALE;
|
||||
}
|
||||
if (mode == PFC_MODE_NORMAL) {
|
||||
normal.push_back(pfc);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue