From 3f027ddf4372d324fb43e496d6a1760d6b403458 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 7 May 2011 18:34:32 +0000 Subject: [PATCH] - client: implement "report immediately" at the level of individual jobs rather than globally. To use this, projects must add to the elements in job templates svn path=/trunk/boinc/; revision=23515 --- checkin_notes | 10 ++++++++++ client/client_types.cpp | 5 +++++ client/client_types.h | 2 +- client/cs_scheduler.cpp | 4 ++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 287b96e572..ac3ec345ea 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2847,3 +2847,13 @@ David 7 May 2011 client/ http_curl.cpp cs_files.cpp + +David 7 May 2011 + - client: implement "report immediately" at the level of + individual jobs rather than globally. + To use this, projects must add + to the elements in job templates + + client/ + client_types.cpp,h + cs_scheduler.cpp diff --git a/client/client_types.cpp b/client/client_types.cpp index ccb9ac7d32..2091e08ace 100644 --- a/client/client_types.cpp +++ b/client/client_types.cpp @@ -1695,6 +1695,7 @@ void RESULT::clear() { strcpy(plan_class, ""); strcpy(resources, ""); coproc_missing = false; + report_immediately = false; schedule_backoff = 0; } @@ -1718,6 +1719,7 @@ int RESULT::parse_server(MIOFILE& in) { output_files.push_back(file_ref); continue; } + if (parse_bool(buf, "report_immediately", report_immediately)) continue; if (log_flags.unparsed_xml) { msg_printf(0, MSG_INFO, "[unparsed_xml] RESULT::parse(): unrecognized: %s\n", buf @@ -1770,6 +1772,7 @@ int RESULT::parse_state(MIOFILE& in) { if (parse_bool(buf, "ready_to_report", ready_to_report)) continue; if (parse_double(buf, "", completed_time)) continue; if (parse_bool(buf, "suspended_via_gui", suspended_via_gui)) continue; + if (parse_bool(buf, "report_immediately", report_immediately)) continue; if (parse_int(buf, "", _state)) continue; if (match_tag(buf, "")) { while (in.fgets(buf, 256)) { @@ -1877,6 +1880,7 @@ int RESULT::write(MIOFILE& out, bool to_server) { if (ready_to_report) out.printf(" \n"); if (completed_time) out.printf(" %f\n", completed_time); if (suspended_via_gui) out.printf(" \n"); + if (report_immediately) out.printf(" \n"); out.printf( " %s\n" " %f\n" @@ -1929,6 +1933,7 @@ int RESULT::write_gui(MIOFILE& out) { if (completed_time) out.printf(" %f\n", completed_time); if (suspended_via_gui) out.printf(" \n"); if (project->suspended_via_gui) out.printf(" \n"); + if (report_immediately) out.printf(" \n"); if (edf_scheduled) out.printf(" \n"); if (coproc_missing) out.printf(" \n"); if (schedule_backoff > gstate.now) out.printf(" \n"); diff --git a/client/client_types.h b/client/client_types.h index 12c95b51c6..1e403691f3 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -639,10 +639,10 @@ struct RESULT { bool coproc_missing; // a coproc needed by this job is missing // (e.g. because user removed their GPU board). + bool report_immediately; APP* app; WORKUNIT* wup; - // this may be NULL after result is finished PROJECT* project; RESULT(){} diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp index d1e28290a0..cfc37fbad6 100644 --- a/client/cs_scheduler.cpp +++ b/client/cs_scheduler.cpp @@ -1166,6 +1166,10 @@ PROJECT* CLIENT_STATE::find_project_with_overdue_results() { if (p->waiting_until_min_rpc_time()) continue; if (p->suspended_via_gui) continue; + if (r->report_immediately) { + return p; + } + if (config.report_results_immediately) { return p; }