*** empty log message ***

svn path=/trunk/boinc/; revision=2829
This commit is contained in:
David Anderson 2003-12-24 21:50:41 +00:00
parent 7e2fe724fd
commit d68e9c92b9
7 changed files with 99 additions and 19 deletions

View File

@ -8568,18 +8568,18 @@ Jeff 18 Dec 2003
parse.h
David 19 Dec 2003
- new system tray icons, for "new message" and "new error message" situations,
contributed by Rom Walton.
NOTE: these are not actually used;
we need to add flags for when they should be displayed
- new system tray icons, for "new message" and "new error message" situations,
contributed by Rom Walton.
NOTE: these are not actually used;
we need to add flags for when they should be displayed
client/win/
resource.h
resource.rc
wingui_mainwindow.cpp,h
res/
iconerror.ico (new)
iconinfo.ico (new)
client/win/
resource.h
resource.rc
wingui_mainwindow.cpp,h
res/
iconerror.ico (new)
iconinfo.ico (new)
Karl 2003-12-19
- undid #ifndef for base64. Renamed to r_base64.
@ -8693,3 +8693,54 @@ David 23 Dec 2003
(various)
lib/
filesys.C,h
David 24 Dec 2003
- Fixed errors in deciding whether more work was needed,
and if so how much.
This caused a situation where hosts would repeatedly
ask the server for more work
(which, because of recent anti-spam mechanism, would return no work)
The error involved the confusion of two quantities:
1) work buffer
This is an estimate of the time (measured in days)
until this host will finish all current work.
It reflects the host's "active_frac" and the # of CPUs.
2) CPU time
This is an estimate of the CPU time a WU will take on this host.
It does not reflect active_frac or # of CPUs
Example error: current_work_buf_days() didn't reflect active_frac and ncpus.
So we underestimated the work buffer, and requested work inappropriately.
NOTE: the <work_req_seconds> field in a request message
is in units of CPU time, NOT work buffer
- Fixed errors in estimating the wallclock duration of a WU
(used in feasibility test in scheduler):
Should divide, not multiply, by active_frac;
should not multiply by # cpus
- add a "deprecated" flag to app_version.
If you decide that a particulate app_version has problems,
you can deprecate it.
The scheduler advertises the latest non-deprecated version.
NOTE: this only is effective if core clients have the following:
- Changed the policy assigning an app_version to a WU
Use the version included in the scheduler reply,
and if there is none, use the latest version.
This means that if a project deprecates an app_version,
clients won't use it.
client/
client_state.h
cs_apps.C
cs_scheduler.C
scheduler_op.C
db/
schema.sql
boinc_db.C,h
lib/
filesys.h
result_state.h
py/Boinc/
database.py
sched/
handle_request.C
sched_shmem.C

View File

@ -181,7 +181,7 @@ public:
private:
int nslots;
int latest_version_num(char*);
int choose_version_num(char*, SCHEDULER_REPLY&);
bool input_files_available(RESULT*);
int app_finished(ACTIVE_TASK&);
bool start_apps();

View File

@ -313,11 +313,24 @@ double CLIENT_STATE::get_percent_done(RESULT* result) {
return atp ? force_fraction(atp->fraction_done) : 0.0;
}
int CLIENT_STATE::latest_version_num(char* app_name) {
// Decide which app version to use for a WU.
//
int CLIENT_STATE::choose_version_num(char* app_name, SCHEDULER_REPLY& sr) {
unsigned int i;
int best = -1;
APP_VERSION* avp;
// First look in the scheduler reply
//
for (i=0; i<sr.app_versions.size(); i++) {
avp = &sr.app_versions[i];
if (!strcmp(app_name, avp->app_name)) {
return avp->version_num;
}
}
// If not there, use the latest one in our state
//
for (i=0; i<app_versions.size(); i++) {
avp = app_versions[i];
if (strcmp(avp->app_name, app_name)) continue;

View File

@ -52,7 +52,7 @@ const int SECONDS_BEFORE_REPORT_DEADLINE_TO_REPORT = 60*60*6;
double CLIENT_STATE::current_work_buf_days() {
unsigned int i;
RESULT* rp;
double seconds_remaining=0;
double seconds_remaining=0, x;
for (i=0; i<results.size(); i++) {
rp = results[i];
@ -66,17 +66,23 @@ double CLIENT_STATE::current_work_buf_days() {
seconds_remaining += estimate_cpu_time(*rp->wup) * (1.0-get_percent_done(rp));
}
return (seconds_remaining / SECONDS_PER_DAY);
x = seconds_remaining / SECONDS_PER_DAY;
x /= host_info.p_ncpus;
x /= time_stats.active_frac;
return x;
}
// seconds of work needed to come up to the max buffer level
// seconds of CPU work needed to come up to the max buffer level
//
double CLIENT_STATE::work_needed_secs() {
double x = current_work_buf_days();
if (x > global_prefs.work_buf_max_days) return 0;
// TODO: take into account preference # CPUS
return (global_prefs.work_buf_max_days - x)*SECONDS_PER_DAY
* time_stats.active_frac * host_info.p_ncpus;
double y = (global_prefs.work_buf_max_days - x)*SECONDS_PER_DAY;
y *= time_stats.active_frac;
y *= host_info.p_ncpus;
return y;
}
// update exponentially-averaged CPU times of all projects
@ -553,7 +559,7 @@ int CLIENT_STATE::handle_scheduler_reply(
if (!lookup_workunit(project, sr.workunits[i].name)) {
WORKUNIT* wup = new WORKUNIT;
*wup = sr.workunits[i];
wup->version_num = latest_version_num(wup->app_name);
wup->version_num = choose_version_num(wup->app_name, sr);
retval = link_workunit(project, wup);
if (!retval) {
workunits.push_back(wup);

View File

@ -76,6 +76,9 @@ int SCHEDULER_OP::init_get_work() {
must_get_work = true;
project = gstate.next_project(0);
if (project) {
msg_printf(project, MSG_INFO,
"Requesting %f seconds of work", ns
);
retval = init_op_project(ns);
if (retval) {
sprintf(err_msg, "init_op_project failed, error %d\n", retval);

View File

@ -17,6 +17,9 @@
// Contributor(s):
//
#ifndef _FILESYS_
#define _FILESYS_
#include <string>
using std::string;
#ifdef HAVE_DIRENT_H
@ -68,3 +71,5 @@ public:
~DirScanner();
bool scan(string& name); // return true if file returned
};
#endif

View File

@ -21,6 +21,8 @@
#define _RESULT_STATE_
// States of a result on a client.
// THESE MUST BE IN NUMERICAL ORDER
// (because of the >= comparison in current_work_buf_days())
//
#define RESULT_NEW 0
// New result, files may still need to be downloaded