Merge pull request #2336 from BOINC/dpa_credit

Credit calculation: remove old code that ignored result.app_version_id =1.  Fixes #2333
This commit is contained in:
Kevin Reed 2018-02-07 09:03:57 -06:00 committed by GitHub
commit 64c5ec650b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -524,10 +524,11 @@ int get_pfc(
}
}
// is result from old scheduler that didn't set r.app_version_id correctly?
// if so, use WU estimate (this is a transient condition)
// is result from old scheduler that didn't set r.app_version_id?
// if so, use WU estimate (this is a transient condition
// while projects upgrade server software)
//
if (r.app_version_id == 0 || r.app_version_id == 1) {
if (r.app_version_id == 0) {
if (config.debug_credit) {
log_messages.printf(MSG_NORMAL,
"[credit] [RESULT#%lu] missing app_version_id (%ld): returning WU default %.2f\n",
@ -648,12 +649,15 @@ int get_pfc(
r.flops_estimate/1e9
);
}
// get app version
//
avp = av_lookup(r.app_version_id, app_versions);
// Sanity check
// If an app version scale exists, use it. Otherwise assume 1.
double tmp_scale = (avp && (r.app_version_id>1) && avp->pfc_scale) ? (avp->pfc_scale) : 1.0;
//
double tmp_scale = (avp && avp->pfc_scale) ? (avp->pfc_scale) : 1.0;
if (raw_pfc*tmp_scale > wu.rsc_fpops_bound) {
// This sanity check should be unnecessary becuase we have a maximum