user_friendly_name, sr.apps[i].user_friendly_name);
+ app->non_cpu_intensive = sr.apps[i].non_cpu_intensive;
+ app->fraction_done_exact = sr.apps[i].fraction_done_exact;
} else {
app = new APP;
*app = sr.apps[i];
@@ -879,9 +883,7 @@ int CLIENT_STATE::handle_scheduler_reply(
app, avpp.platform, avpp.version_num, avpp.plan_class
);
if (avp) {
- // update performance-related info;
- // generally this shouldn't change,
- // but if it does it's better to use the new stuff
+ // update app version attributes in case they changed on server
//
avp->avg_ncpus = avpp.avg_ncpus;
avp->max_ncpus = avpp.max_ncpus;
diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp
index 3e01020676..30480c52e4 100644
--- a/client/work_fetch.cpp
+++ b/client/work_fetch.cpp
@@ -1058,7 +1058,7 @@ double ACTIVE_TASK::est_dur() {
// if app says fraction done is accurate, just use it
//
- if (fraction_done_exact) return frac_est;
+ if (result->app->fraction_done_exact) return frac_est;
// weighting of dynamic estimate is the fraction done
// i.e. when fraction done is 0.5, weighting is 50/50
diff --git a/db/boinc_db.cpp b/db/boinc_db.cpp
index 12bf7c1943..3af5871d6c 100644
--- a/db/boinc_db.cpp
+++ b/db/boinc_db.cpp
@@ -214,7 +214,8 @@ void DB_APP::db_print(char* buf){
"homogeneous_app_version=%d, "
"non_cpu_intensive=%d, "
"locality_scheduling=%d, "
- "n_size_classes=%d ",
+ "n_size_classes=%d, "
+ "fraction_done_exact=%d ",
create_time,
name,
min_version,
@@ -229,7 +230,8 @@ void DB_APP::db_print(char* buf){
homogeneous_app_version?1:0,
non_cpu_intensive?1:0,
locality_scheduling,
- n_size_classes
+ n_size_classes,
+ fraction_done_exact?1:0
);
}
@@ -252,6 +254,7 @@ void DB_APP::db_parse(MYSQL_ROW &r) {
non_cpu_intensive = (atoi(r[i++]) != 0);
locality_scheduling = atoi(r[i++]);
n_size_classes = atoi(r[i++]);
+ fraction_done_exact = (atoi(r[i++]) != 0);
}
void DB_APP_VERSION::db_print(char* buf){
diff --git a/db/boinc_db_types.h b/db/boinc_db_types.h
index 2d2b43b6b7..5778ac4847 100644
--- a/db/boinc_db_types.h
+++ b/db/boinc_db_types.h
@@ -82,6 +82,8 @@ struct APP {
// type of locality scheduling used by this app (see above)
int n_size_classes;
// for multi-size apps, number of size classes
+ bool fraction_done_exact;
+ // fraction done reported by app is accurate
int write(FILE*);
void clear();
diff --git a/db/schema.sql b/db/schema.sql
index fe6739803b..b4af60126e 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -55,6 +55,7 @@ create table app (
non_cpu_intensive tinyint not null default 0,
locality_scheduling integer not null default 0,
n_size_classes smallint not null default 0,
+ fraction_done_exact tinyint not null default 0,
primary key (id)
) engine=InnoDB;
diff --git a/html/ops/db_update.php b/html/ops/db_update.php
index 22ad22019a..a4719f0b05 100644
--- a/html/ops/db_update.php
+++ b/html/ops/db_update.php
@@ -925,6 +925,14 @@ function update_4_2_2014() {
);
}
+function update_5_3_2014() {
+ do_query(
+ "alter table app
+ add fraction_done_exact tinyint not null
+ "
+ );
+}
+
// Updates are done automatically if you use "upgrade".
//
// If you need to do updates manually,
@@ -965,6 +973,7 @@ $db_updates = array (
array(27006, "update_1_13_2014"),
array(27007, "update_3_6_2014"),
array(27008, "update_4_2_2014"),
+ array(27009, "update_5_3_2014"),
);
?>
diff --git a/html/ops/manage_apps.php b/html/ops/manage_apps.php
index 8bdbc1de4b..1cbeb6f14d 100644
--- a/html/ops/manage_apps.php
+++ b/html/ops/manage_apps.php
@@ -43,6 +43,9 @@ function do_updates() {
$n = post_str("beta", true)?1:0;
$app->update("beta=$n");
+ $n = post_str("fraction_done_exact", true)?1:0;
+ $app->update("fraction_done_exact=$n");
+
echo "Application $id updated.
You must restart the project for this to take effect.
@@ -82,11 +85,12 @@ function show_form() {
"Created",
"weight
details",
"shmem items",
- "homogeneous redundancy type
details",
+ "HR type
details",
"homogeneous app version?
details",
"deprecated?",
"Non-CPU-intensive?",
"Beta?",
+ "Exact fraction done?",
""
);
@@ -153,6 +157,12 @@ function show_form() {
";
+ $v = '';
+ if ($app->fraction_done_exact) $v = ' CHECKED ';
+ echo "
+ |
+ ";
+
echo "";
echo "";
}
diff --git a/sched/sched_types.cpp b/sched/sched_types.cpp
index 5c4779f89a..decdc949a2 100644
--- a/sched/sched_types.cpp
+++ b/sched/sched_types.cpp
@@ -1026,9 +1026,11 @@ int APP::write(FILE* fout) {
" %s\n"
" %s\n"
" %d\n"
+ " %d\n"
"\n",
name, user_friendly_name,
- non_cpu_intensive?1:0
+ non_cpu_intensive?1:0,
+ fraction_done_exact?1:0
);
return 0;
}
|