Commit 41fe3e40 authored by David Anderson's avatar David Anderson

- client: tag messages with project where possible; fixes #852

- client: show fetch share rather than run share in wfd message

svn path=/trunk/boinc/; revision=17398
parent 21f1644f
......@@ -2245,3 +2245,14 @@ David 25 Feb 2009
client/
(several).cpp
David 25 Feb 2009
- client: tag messages with project where possible; fixes #852
- client: show fetch share rather than run share in wfd message
client/
client_types.h
work_fetch.cpp
cs_prefs.cpp
cs_scheduler.cpp
cpu_sched.cpp
......@@ -34,9 +34,11 @@
#include "cert_sig.h"
#include "hostinfo.h"
#include "coproc.h"
#include "work_fetch.h"
#include "miofile.h"
#include "common_defs.h"
#include "rr_sim.h"
#include "work_fetch.h"
#define P_LOW 1
#define P_MEDIUM 3
......@@ -539,7 +541,12 @@ struct RESULT {
return estimated_time_remaining(false)*avp->flops;
}
bool computing_done();
inline bool computing_done() {
if (state() >= RESULT_COMPUTE_ERROR) return true;
if (ready_to_report) return true;
return false;
}
bool not_started();
/// downloaded, not finished, not suspended, project not suspended
bool runnable();
/// downloading or downloaded,
......
......@@ -1051,8 +1051,10 @@ ACTIVE_TASK* CLIENT_STATE::lookup_active_task_by_result(RESULT* rep) {
return NULL;
}
bool RESULT::computing_done() {
return (state() >= RESULT_COMPUTE_ERROR || ready_to_report);
bool RESULT::not_started() {
if (computing_done()) return false;
if (gstate.lookup_active_task_by_result(this)) return false;
return true;
}
// find total resource shares of all projects
......
......@@ -126,7 +126,7 @@ int CLIENT_STATE::check_suspend_processing() {
}
}
if (global_prefs.cpu_usage_limit != 100) {
if (global_prefs.cpu_usage_limit < 99) { // round-off?
static double last_time=0, debt=0;
double diff = now - last_time;
last_time = now;
......@@ -250,7 +250,7 @@ PROJECT* CLIENT_STATE::global_prefs_source_project() {
void CLIENT_STATE::show_global_prefs_source(bool found_venue) {
PROJECT* pp = global_prefs_source_project();
if (pp) {
msg_printf(NULL, MSG_INFO,
msg_printf(pp, MSG_INFO,
"General prefs: from %s (last modified %s)",
pp->get_project_name(), time_to_string(global_prefs.mod_time)
);
......@@ -262,20 +262,20 @@ void CLIENT_STATE::show_global_prefs_source(bool found_venue) {
);
}
if (strlen(main_host_venue)) {
msg_printf(NULL, MSG_INFO, "Computer location: %s", main_host_venue);
msg_printf(pp, MSG_INFO, "Computer location: %s", main_host_venue);
if (found_venue) {
msg_printf(NULL, MSG_INFO,
"General prefs: using separate prefs for %s", main_host_venue
);
} else {
msg_printf(NULL, MSG_INFO,
msg_printf(pp, MSG_INFO,
"General prefs: no separate prefs for %s; using your defaults",
main_host_venue
);
}
} else {
msg_printf(NULL, MSG_INFO, "Host location: none");
msg_printf(NULL, MSG_INFO, "General prefs: using your defaults");
msg_printf(pp, MSG_INFO, "Host location: none");
msg_printf(pp, MSG_INFO, "General prefs: using your defaults");
}
}
......
......@@ -846,9 +846,7 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
);
continue;
}
if (rp->computing_done()) continue;
ACTIVE_TASK* atp = lookup_active_task_by_result(rp);
if (!atp) {
if (rp->not_started()) {
rp->abort_inactive(ERR_ABORTED_BY_PROJECT);
}
}
......
......@@ -275,9 +275,9 @@ void RSC_WORK_FETCH::print_state(char* name) {
RSC_PROJECT_WORK_FETCH& pwf = project_state(p);
double bt = pwf.backoff_time>gstate.now?pwf.backoff_time-gstate.now:0;
msg_printf(p, MSG_INFO,
"[wfd] %s: runshare %.2f debt %.2f backoff dt %.2f int %.2f%s%s%s%s%s",
"[wfd] %s: fetch share %.2f debt %.2f backoff dt %.2f int %.2f%s%s%s%s%s",
name,
pwf.runnable_share, pwf.debt, bt, pwf.backoff_interval,
pwf.fetchable_share, pwf.debt, bt, pwf.backoff_interval,
p->suspended_via_gui?" (susp via GUI)":"",
p->master_url_fetch_pending?" (master fetch pending)":"",
p->min_rpc_time > gstate.now?" (comm deferred)":"",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment