From 1bfed5d3cc381c6f4ef7888383dca693950d70f7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 17 Jan 2006 07:30:28 +0000 Subject: [PATCH] duration correction factor enhancements svn path=/trunk/boinc/; revision=9252 --- checkin_notes | 12 ++++++++++++ client/client_state.C | 1 + client/client_state.h | 1 + client/cs_benchmark.C | 6 ++++++ client/cs_scheduler.C | 7 +++++++ doc/contact.php | 1 + 6 files changed, 28 insertions(+) diff --git a/checkin_notes b/checkin_notes index b08917c670..1db87b17d4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -525,3 +525,15 @@ David 16 Jan 2006 client/ acct_mgr.C + +David 16 Jan 2006 + - core client: enhancements to duration correction factor (DCF): + - on project reset, set DCF to one. + - when do CPU benchmarks, scale all DCFs by new/old benchmark + + (from Josef Segur) + + client/ + client_state.C,h + cs_benchmark.C + cs_scheduler.C diff --git a/client/client_state.C b/client/client_state.C index 054a6f8d60..ec06abe94a 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -1283,6 +1283,7 @@ int CLIENT_STATE::reset_project(PROJECT* project) { garbage_collect_always(); } + project->duration_correction_factor = 1; write_state_file(); return 0; } diff --git a/client/client_state.h b/client/client_state.h index 8dbce8c0b6..e96b1c209d 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -343,6 +343,7 @@ public: int handle_scheduler_reply(PROJECT*, char* scheduler_url, int& nresults); int compute_work_requests(); SCHEDULER_OP* scheduler_op; + void scale_duration_correction_factors(double); private: bool contacted_sched_server; int overall_work_fetch_urgency; diff --git a/client/cs_benchmark.C b/client/cs_benchmark.C index c7fab82637..1f6239cafa 100644 --- a/client/cs_benchmark.C +++ b/client/cs_benchmark.C @@ -364,6 +364,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() { } } if (ndone == ncpus) { + double old_p_fpops = host_info.p_fpops; if (had_error) { msg_printf(NULL, MSG_ERROR, "CPU benchmarks error"); host_info.p_fpops = DEFAULT_FPOPS; @@ -403,6 +404,11 @@ bool CLIENT_STATE::cpu_benchmarks_poll() { ); #endif + // scale duration correction factor according to change in benchmarks. + // + if (old_p_fpops) { + scale_duration_correction_factors(host_info.p_fpops/old_p_fpops); + } host_info.p_calculated = now; benchmarks_running = false; msg_printf(NULL, MSG_INFO, "Finished CPU benchmarks"); diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index aeb4fa88b5..b1ba8ad9b9 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -1415,4 +1415,11 @@ double CLIENT_STATE::work_needed_secs() { return x; } +void CLIENT_STATE::scale_duration_correction_factors(double factor) { + for (unsigned int i=0; iduration_correction_factor *= factor; + } +} + const char *BOINC_RCSID_d35a4a7711 = "$Id$"; diff --git a/doc/contact.php b/doc/contact.php index 51dbef9458..53d58e7b3d 100644 --- a/doc/contact.php +++ b/doc/contact.php @@ -165,6 +165,7 @@ show_name("Thomas Richard"); show_name("Nikolay Saharov"); show_name("Alex A. dos Santos"); show_name("Steven Schweda"); +show_name("Josef W. Segur"); show_name("Jens Seidler"); show_name("Peter Smithson"); show_name("Christian Søttrup");