- credit: weight averages by PFC. Else in SETI@home,

a large number of short jobs makes the CUDA version
    look much less efficient than it actually is.

svn path=/trunk/boinc/; revision=19478
This commit is contained in:
David Anderson 2009-11-05 17:17:13 +00:00
parent 5d5942522b
commit 305239f293
3 changed files with 18 additions and 8 deletions

View File

@ -8911,3 +8911,13 @@ Charlie 4 Nov 2009
SetupSecurity.cpp
mac_build/
Mac_SA_Secure.sh
David 5 Nov 2009
- credit: weight averages by PFC. Else in SETI@home,
a large number of short jobs makes the CUDA version
look much less efficient than it actually is.
lib/
average.h
sched/
credit_test.cpp

View File

@ -62,7 +62,7 @@ struct AVERAGE {
weight += SAMPLE_WEIGHT*(w - weight);
}
}
double get_mean() {
inline double get_mean() {
if (n < MIN_SAMPLES) {
return mean/weight;
} else {

View File

@ -39,7 +39,7 @@ void update_av_scales() {
if (av.pfc.n < 10) continue;
if (strstr(av.plan_class, "cuda")) continue;
if (strstr(av.plan_class, "ati")) continue;
sum_avg += av.pfc.recent_mean * av.pfc.n;
sum_avg += av.pfc.get_mean() * av.pfc.n;
sum_n += av.pfc.n;
n++;
}
@ -53,7 +53,7 @@ void update_av_scales() {
APP_VERSION& av = app_versions[j];
if (av.appid != app.id) continue;
if (av.pfc.n < 10) continue;
av.pfc_scale_factor = cpu_avg/av.pfc.recent_mean;
av.pfc_scale_factor = cpu_avg/av.pfc.get_mean();
}
}
}
@ -108,7 +108,7 @@ HOST_APP& lookup_host_app(int hostid, int appid) {
}
void print_average(AVERAGE& a) {
printf("n %f avg %fG ravg %fG", a.n, a.mean/1e9, a.recent_mean/1e9);
printf("n %f avg %fG ravg %fG", a.n, a.mean/1e9, a.get_mean()/1e9);
}
void print_avs() {
@ -165,7 +165,7 @@ int main() {
APP_VERSION& av = lookup_av(r.app_version_id);
vnpfc = pfc * av.pfc_scale_factor;
printf(" version scale (%s): %f\n", av.plan_class, av.pfc_scale_factor);
av.pfc.update(pfc);
av.pfc.update(pfc, pfc);
}
// host normalization
@ -173,7 +173,7 @@ int main() {
HOST_APP& host_app = lookup_host_app(r.hostid, app.id);
double host_scale = 1;
if (host_app.vnpfc.n > 5) {
host_scale = app.vnpfc.recent_mean/host_app.vnpfc.recent_mean;
host_scale = app.vnpfc.get_mean()/host_app.vnpfc.get_mean();
printf(" host scale: %f\n", host_scale);
}
double claimed_flops = vnpfc * host_scale;
@ -183,8 +183,8 @@ int main() {
claimed_credit, r.claimed_credit, r.granted_credit
);
app.vnpfc.update(vnpfc);
host_app.vnpfc.update(vnpfc);
app.vnpfc.update(vnpfc, vnpfc);
host_app.vnpfc.update(vnpfc, vnpfc);
n++;