- scheduler: fix a bug that would choose app versions erroneously.

The problem: the choice of app version was based on
    the "projected FLOPS" return by estimate_flops(av).
    If usage stats exist for the host / app version,
    this returns a number X such that
    WU.rsc_fpops_est/X approximates the runtime of a job
    using the given app version..
    (If WU.rsc_fpops_est is way off, this will be correspondingly way off
    from the actual FLOPS the app version will get.)
    However, if there are no usage stats,
    it return an estimate based on host hardware speed,
    which might be 100X less.
    Hence, in some cases a new app version would never get used.

    Solution: choose app versions based on the values
    returned by the app plan functions.
    Use estimate_flops() AFTER choosing the version.
- scheduler: improve the accuracy of FLOPS estimation for GPU apps.
    The "flops_scale" argument to coproc_perf
    (which expresses the difference between peak GPU FLOPS
    and actual FLOPS) should be used to scale GPU FLOPS
    prior to calling coproc_perf(),
    rather than scaling the estimate returned by coproc_perf().
- show_shmem: show have_X_apps flags


svn path=/trunk/boinc/; revision=24385
This commit is contained in:
David Anderson 2011-10-12 23:59:38 +00:00
parent b1879cb764
commit b1456cfc0b
4 changed files with 43 additions and 4 deletions

View File

@ -7122,3 +7122,34 @@ Rom 11 Oct 2011
/
configure.ac
version.h
David 11 Oct 2011
- scheduler: fix a bug that would choose app versions erroneously.
The problem: the choice of app version was based on
the "projected FLOPS" return by estimate_flops(av).
If usage stats exist for the host / app version,
this returns a number X such that
WU.rsc_fpops_est/X approximates the runtime of a job
using the given app version..
(If WU.rsc_fpops_est is way off, this will be correspondingly way off
from the actual FLOPS the app version will get.)
However, if there are no usage stats,
it return an estimate based on host hardware speed,
which might be 100X less.
Hence, in some cases a new app version would never get used.
Solution: choose app versions based on the values
returned by the app plan functions.
Use estimate_flops() AFTER choosing the version.
- scheduler: improve the accuracy of FLOPS estimation for GPU apps.
The "flops_scale" argument to coproc_perf
(which expresses the difference between peak GPU FLOPS
and actual FLOPS) should be used to scale GPU FLOPS
prior to calling coproc_perf(),
rather than scaling the estimate returned by coproc_perf().
- show_shmem: show have_X_apps flags
sched/
sched_customize.cpp
sched_version.cpp
sched_shmem.cpp

View File

@ -446,14 +446,13 @@ static inline bool opencl_check(
coproc_perf(
g_request->host.p_fpops,
ndevs * cp.peak_flops,
flops_scale * ndevs * cp.peak_flops,
cpu_frac,
hu.projected_flops,
hu.avg_ncpus
);
hu.peak_flops = ndevs*cp.peak_flops + hu.avg_ncpus*g_request->host.p_fpops;
hu.max_ncpus = hu.avg_ncpus;
hu.projected_flops *= flops_scale;
return true;
}

View File

@ -174,6 +174,8 @@ int SCHED_SHMEM::scan_tables() {
APP_VERSION& av = app_versions[i];
if (strstr(av.plan_class, "cuda")) {
have_cuda_apps = true;
} else if (strstr(av.plan_class, "nvidia")) {
have_cuda_apps = true;
} else if (strstr(av.plan_class, "ati")) {
have_ati_apps = true;
} else {
@ -267,6 +269,14 @@ void SCHED_SHMEM::show(FILE* f) {
av.appid, av.platformid, av.version_num, av.plan_class
);
}
fprintf(f,
"have CPU: %s\n"
"have NVIDIA: %s\n"
"have ATI: %s\n",
have_cpu_apps?"yes":"no",
have_cuda_apps?"yes":"no",
have_ati_apps?"yes":"no"
);
fprintf(f,
"Jobs; key:\n"
"ap: app ID\n"

View File

@ -746,8 +746,6 @@ BEST_APP_VERSION* get_app_version(
//
found_feasible_version = true;
estimate_flops(host_usage, av);
// pick the fastest version.
// Throw in a random factor in case the estimates are off.
//
@ -766,6 +764,7 @@ BEST_APP_VERSION* get_app_version(
} // loop over client platforms
if (bavp->avp) {
estimate_flops(bavp->host_usage, *bavp->avp);
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,
"[version] Best version of app %s is [AV#%d] (%.2f GFLOPS)\n",