*** empty log message ***

svn path=/trunk/boinc/; revision=4036
This commit is contained in:
Rom Walton 2004-08-10 20:27:51 +00:00
parent 4a3be34114
commit 68c8fd0b5e
6 changed files with 61 additions and 18 deletions

View File

@ -16105,3 +16105,22 @@ Noaa 9 August 2004
api/
x_opengl.C
graphics_api.h
Rom 10 Aug 2004
- Bug Fix: Moved 5 day benchmark checking code into main polling function
- Bug Fix: Added extra logic so that if benchmarks execute BOINC will
successfully start back up the applications if leave_apps_in_memory
is set to false
- Bug Fix: Fix a state file parsing issue where an extra <file_signature>
start tag was being included within the signed_xml field without the
closing tag, this could be what was causing problems with P@H and
incorrect result file info structures. This could also lead to
messages on the server about duplicate result submissions.
client/
app.C, .h
client_state.C
client_types.C
gui_rpc_server.C
cs_benchmark.C

View File

@ -1338,6 +1338,20 @@ void ACTIVE_TASK_SET::unsuspend_all() {
}
}
// Check to see if any tasks are running
//
bool ACTIVE_TASK_SET::is_task_running() {
unsigned int i;
ACTIVE_TASK* atp;
for (i=0; i<active_tasks.size(); i++) {
atp = active_tasks[i];
if ((atp->scheduler_state == CPU_SCHED_RUNNING) && (atp->state == PROCESS_RUNNING)) {
return true;
}
}
return false;
}
// Send quit signal to all currently running tasks
// This is called when the core client exits,
// or when a project is detached or reset

View File

@ -179,6 +179,7 @@ public:
bool poll();
void suspend_all(bool leave_apps_in_memory=true);
void unsuspend_all();
bool is_task_running();
int restart_tasks(int max_tasks);
void request_tasks_exit(PROJECT* p=0);
int wait_for_exit(double, PROJECT* p=0);

View File

@ -284,12 +284,6 @@ int CLIENT_STATE::init() {
//
host_info.get_host_info();
// running CPU benchmarks is slow, so do it infrequently
//
if (should_run_cpu_benchmarks()) {
start_cpu_benchmarks();
}
set_ncpus();
// set period start time
@ -349,6 +343,11 @@ int CLIENT_STATE::net_sleep(double x) {
bool CLIENT_STATE::do_something() {
int actions = 0, reason, retval;
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_POLL);
if (should_run_cpu_benchmarks() && !are_cpu_benchmarks_running()) {
start_cpu_benchmarks();
}
check_suspend_activities(reason);
if (reason) {
if (!activities_suspended) {
@ -365,7 +364,11 @@ bool CLIENT_STATE::do_something() {
// if we're doing CPU benchmarks, don't do anything else
//
if (reason & SUSPEND_REASON_BENCHMARKS) {
cpu_benchmarks_poll();
if (active_tasks.is_task_running()) {
POLL_ACTION(active_tasks, active_tasks.poll);
} else {
cpu_benchmarks_poll();
}
return false;
}

View File

@ -634,14 +634,6 @@ int FILE_INFO::parse(MIOFILE& in, bool from_server) {
);
continue;
}
if (from_server) {
strcat(signed_xml, buf);
}
if (parse_str(buf, "<name>", name, sizeof(name))) continue;
else if (parse_str(buf, "<url>", url.text, sizeof(url.text))) {
urls.push_back(url);
continue;
}
else if (match_tag(buf, "<file_signature>")) {
copy_element_contents(
in,
@ -649,6 +641,19 @@ int FILE_INFO::parse(MIOFILE& in, bool from_server) {
file_signature,
sizeof(file_signature)
);
if (from_server) {
strcat(signed_xml, "<file_signature>\n");
strcat(signed_xml, file_signature);
strcat(signed_xml, "</file_signature>\n");
}
continue;
}
if (from_server) {
strcat(signed_xml, buf);
}
if (parse_str(buf, "<name>", name, sizeof(name))) continue;
else if (parse_str(buf, "<url>", url.text, sizeof(url.text))) {
urls.push_back(url);
continue;
}
else if (parse_str(buf, "<md5_cksum>", md5_cksum, sizeof(md5_cksum))) continue;
@ -720,7 +725,7 @@ int FILE_INFO::write(MIOFILE& out, bool to_server) {
if (upload_when_present) out.printf(" <upload_when_present/>\n");
if (sticky) out.printf(" <sticky/>\n");
if (signature_required) out.printf(" <signature_required/>\n");
if (file_signature) out.printf(" <file_signature>\n %s</file_signature>\n", file_signature);
if (file_signature) out.printf(" <file_signature>\n%s</file_signature>\n", file_signature);
if (time_last_used) out.printf(" <time_last_used>%d</time_last_used>\n", time_last_used);
if (priority) out.printf(" <priority>%d</priority>\n", priority);
if (exp_date) out.printf(" <exp_date>%ld</exp_date>\n", exp_date);

View File

@ -174,6 +174,7 @@ void CLIENT_STATE::start_cpu_benchmarks() {
int i;
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_MEASUREMENT);
if (skip_cpu_benchmarks) {
scope_messages.printf("CLIENT_STATE::cpu_benchmarks(): Skipping CPU benchmarks.\n");
host_info.p_fpops = DEFAULT_FPOPS;
@ -219,7 +220,7 @@ void CLIENT_STATE::start_cpu_benchmarks() {
}
// Returns true if CPU benchmarks should be run:
// flag is set or it's been a month since we last ran
// flag is set or it's been 5 days since we last ran
//
bool CLIENT_STATE::should_run_cpu_benchmarks() {
// Note: if skip_cpu_benchmarks we still should "run" cpu benchmarks
@ -291,7 +292,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
// Send heartbeat to all active tasks so they know we are alive
// and well.
gstate.active_tasks.send_heartbeats();
active_tasks.send_heartbeats();
// do transitions through benchmark states
//