svn path=/trunk/boinc/; revision=24537

This commit is contained in:
David Anderson 2011-11-07 05:12:02 +00:00
parent 5b04b249db
commit 98ba6807ab
3 changed files with 25 additions and 7 deletions

View File

@ -8169,8 +8169,15 @@ David 5 Nov 2011
client/
cs_trickle.cpp
David 5 Nov 2011
David 6 Nov 2011
- client: actually do the checking described above
client/
cs_trickle.cpp
David 6 Nov 2011
- client: don't crash if a project sends app_version.flops = 0.
client/
client_types.cpp
rr_sim.cpp

View File

@ -1268,6 +1268,7 @@ int FILE_INFO::gzip() {
int APP_VERSION::parse(XML_PARSER& xp) {
FILE_REF file_ref;
double dtemp;
strcpy(app_name, "");
strcpy(api_version, "");
@ -1302,7 +1303,16 @@ int APP_VERSION::parse(XML_PARSER& xp) {
if (xp.parse_str("plan_class", plan_class, sizeof(plan_class))) continue;
if (xp.parse_double("avg_ncpus", avg_ncpus)) continue;
if (xp.parse_double("max_ncpus", max_ncpus)) continue;
if (xp.parse_double("flops", flops)) continue;
if (xp.parse_double("flops", dtemp)) {
if (dtemp <= 0) {
msg_printf(0, MSG_INTERNAL_ERROR,
"non-positive FLOPS in app version"
);
} else {
flops = dtemp;
}
continue;
}
if (xp.parse_str("cmdline", cmdline, sizeof(cmdline))) continue;
if (xp.parse_str("file_prefix", file_prefix, sizeof(file_prefix))) continue;
if (xp.parse_double("gpu_ram", gpu_ram)) continue;

View File

@ -96,6 +96,9 @@ void set_rrsim_flops(RESULT* rp) {
} else {
rp->rrsim_flops = rp->avp->flops * gstate.overall_cpu_frac();
}
if (rp->rrsim_flops == 0) {
rp->rrsim_flops = 1e6; // just in case
}
}
void print_deadline_misses() {
@ -346,11 +349,9 @@ void RR_SIM::simulate() {
rpbest = NULL;
for (u=0; u<active.size(); u++) {
rp = active[u];
if (rp->rrsim_flops) {
rp->rrsim_finish_delay = rp->rrsim_flops_left/rp->rrsim_flops;
if (!rpbest || rp->rrsim_finish_delay < rpbest->rrsim_finish_delay) {
rpbest = rp;
}
rp->rrsim_finish_delay = rp->rrsim_flops_left/rp->rrsim_flops;
if (!rpbest || rp->rrsim_finish_delay < rpbest->rrsim_finish_delay) {
rpbest = rp;
}
}