From 222123c6c7c3ab4c7fa9f1b08b0d6531fe4cffe3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 24 Aug 2006 22:12:04 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11001 --- checkin_notes | 13 +++++++++++++ client/client_types.C | 6 ++++++ client/cpu_sched.C | 19 +++++++++++++------ client/cs_benchmark.C | 2 +- client/cs_scheduler.C | 3 +++ 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index 6d6d854c1e..da1c153172 100755 --- a/checkin_notes +++ b/checkin_notes @@ -9327,3 +9327,16 @@ David 24 Aug 2006 cs_scheduler.C gui_rpc_server_ops.C scheduler_op.C,h + +David 24 Aug 2006 + - core client: is cpu_sched_debug log flag is set, + show messages when duration correction factor is changed + - more detailed rr_simulation messages + - on CPU benchmark completion, scale DCFs only if + original benchmark is real (not 1 GFLOPS estimate) + + client/ + client_types.C + cpu_sched.C + cs_benchmark.C + cs_scheduler.C diff --git a/client/client_types.C b/client/client_types.C index 5dee80cb5e..a7fa1a59a3 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -1629,6 +1629,7 @@ double RESULT::estimated_cpu_time_remaining() { // void PROJECT::update_duration_correction_factor(RESULT* rp) { double ratio = rp->final_cpu_time / rp->estimated_cpu_time(); + double old_dcf = duration_correction_factor; // it's OK to overestimate completion time, // but bad to underestimate it. @@ -1647,6 +1648,11 @@ void PROJECT::update_duration_correction_factor(RESULT* rp) { duration_correction_factor = duration_correction_factor*0.9 + 0.1*ratio; } } + if (log_flags.cpu_sched_debug) { + msg_printf(this, MSG_INFO, "duration correction factor: %f => %f, ratio %f", + old_dcf, duration_correction_factor, ratio + ); + } } bool RESULT::runnable() { diff --git a/client/cpu_sched.C b/client/cpu_sched.C index d351893190..639031523f 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -834,19 +834,26 @@ bool CLIENT_STATE::rr_simulation() { pbest = rpbest->project; + if (log_flags.rr_simulation) { + msg_printf(0, MSG_INFO, + "rr_sim: result %s finishes after %f (%f/%f)", + rpbest->name, rpbest->rrsim_finish_delay, rpbest->rrsim_cpu_left, pbest->rrsim_proc_rate + ); + } + // "rpbest" is first result to finish. Does it miss its deadline? // double diff = sim_now + rpbest->rrsim_finish_delay - ((rpbest->computation_deadline()-now)*CPU_PESSIMISM_FACTOR + now); if (diff > 0) { - if (log_flags.rr_simulation) { - msg_printf(0, MSG_INFO, - "rr_simulation: result %s misses deadline by %f\n", - rpbest->name, diff - ); - } rpbest->rr_sim_misses_deadline = true; pbest->rr_sim_deadlines_missed++; rval = true; + if (log_flags.rr_simulation) { + msg_printf(0, MSG_INFO, + "rr_sim: result %s misses deadline by %f", + rpbest->name, diff + ); + } } int last_active_size = active.size(); diff --git a/client/cs_benchmark.C b/client/cs_benchmark.C index e8cd66827d..e07fd1d065 100644 --- a/client/cs_benchmark.C +++ b/client/cs_benchmark.C @@ -403,7 +403,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() { // scale duration correction factor according to change in benchmarks. // - if (old_p_fpops) { + if (host_info.p_calculated && old_p_fpops) { scale_duration_correction_factors(host_info.p_fpops/old_p_fpops); } host_info.p_calculated = now; diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index f655e555a1..1ee2dcfc60 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -1235,6 +1235,9 @@ void CLIENT_STATE::scale_duration_correction_factors(double factor) { PROJECT* p = projects[i]; p->duration_correction_factor *= factor; } + if (log_flags.cpu_sched_debug) { + msg_printf(NULL, MSG_INFO, "scaling duration correction factors by %f", factor); + } } // Choose a new host CPID.