From 3a9549979e7ae20926cccde779399a8b19db4239 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 18 Dec 2010 17:09:57 +0000 Subject: [PATCH] - client: tweak to ATI CPU recognition from [P3D] Crashtest svn path=/trunk/boinc/; revision=22845 --- checkin_notes | 8 +- client/client_state.h | 5 -- client/coproc_detect.cpp | 24 +++--- client/cs_statefile.cpp | 17 ---- client/log_flags.cpp | 2 + client/sim.cpp | 166 ++++++++++++++++++++++----------------- client/sim.h | 5 +- client/sim_util.cpp | 64 ++++++--------- 8 files changed, 143 insertions(+), 148 deletions(-) diff --git a/checkin_notes b/checkin_notes index c7071ae3ba..04532090bd 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8788,7 +8788,7 @@ David 17 Dec 2010 "Add" is confusing, because you can't add multiple account managers like you add projects. - client: recognize a few new ATI GPU models - from Robert Kreß + from [P3D] Crashtest client/ client_msgs.cpp @@ -8804,3 +8804,9 @@ David 17 Dec 2010 api/ boinc_api.cpp + +David 17 Dec 2010 + - client: tweak to ATI CPU recognition + from [P3D] Crashtest + client/ + coproc_detect.cpp diff --git a/client/client_state.h b/client/client_state.h index 7aa79bb930..b7e9b13ca4 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -467,11 +467,6 @@ struct CLIENT_STATE { void compute_nuploading_results(); #ifdef SIM - RANDOM_PROCESS available; - RANDOM_PROCESS idle; - double connection_interval; - // don't connect more often than this - double share_violation(); double monotony(); diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp index 88db61916d..34c7fbec6e 100644 --- a/client/coproc_detect.cpp +++ b/client/coproc_detect.cpp @@ -826,16 +826,16 @@ void COPROC_ATI::get( gpu_name="ATI Radeon HD 4700/4800 (RV740/RV770)"; break; case 8: - gpu_name="ATI Radeon HD 5800 series (Cypress)"; // fixed from "old" HD5800 to HD 5800 like the others up there + gpu_name="ATI Radeon HD 5800 series (Cypress)"; break; case 9: - gpu_name="ATI Radeon HD 5700 series (Juniper)"; // fixed from HD5700 to HD 5700 ... + gpu_name="ATI Radeon HD 5700 series (Juniper)"; break; case 10: - gpu_name="ATI Radeon HD 5x00 series (Redwood)"; // fixed from HD5x00 to HD 5x00 .... + gpu_name="ATI Radeon HD 5x00 series (Redwood)"; break; case 11: - gpu_name="ATI Radeon HD 5x00 series (Cedar)"; // fixed from HD5x00 to HD 5x00 .... + gpu_name="ATI Radeon HD 5x00 series (Cedar)"; break; // // based on AMD's Stream SDK 2.3 shipped with AMD Catalyst 10.12 APP @@ -845,28 +845,28 @@ void COPROC_ATI::get( // // added new/current/coming AMD RADEON GPUs/IGPs/APUs case 12: - gpu_name="AMD SUMO"; // not yet identifyed should be AMD SUMO - the Fusion APU inside "Llano" + gpu_name="AMD SUMO"; break; case 13: - gpu_name="AMD SUPERSUMO"; // not yet identifyed should be AMD SuperSUMO - an other Fusion APU + gpu_name="AMD SUPERSUMO"; break; case 14: - gpu_name="AMD Radeon HD 6310 (Wrestler)"; // Fusion APU inside AMDs Brazos Plattform + gpu_name="AMD Radeon HD 6250/6310 (Wrestler)"; break; case 15: - gpu_name="AMD Radeon HD 6900 series (Cayman)"; // new AMD Radeon HD 6950 & 6970 ;;;; Double Precision YES + gpu_name="AMD Radeon HD 6900 series (Cayman)"; break; case 16: - gpu_name="AMD RESERVED2"; // not yet identifyed should be AMD Antilles because it's VLIW4-Architecture ;;;; Double Precision YES + gpu_name="AMD RESERVED2"; break; case 17: - gpu_name="AMD Radeon HD 6800 series (Barts)"; // ;;;;; Double Precision NO + gpu_name="AMD Radeon HD 6800 series (Barts)"; break; case 18: - gpu_name="AMD Radeon HD 6x00 series (Turks)"; // ;;;;; Double Precision NO; + gpu_name="AMD Radeon HD 6x00 series (Turks)"; break; case 19: - gpu_name="AMD Radeon HD 6300 series (Caicos)"; // ;;;;; Double Precision NO + gpu_name="AMD Radeon HD 6300 series (Caicos)"; break; // there arent any other target ids inside the Shadercompiler (YET !!! ) default: diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp index 41c0b7d10e..bccdd32558 100644 --- a/client/cs_statefile.cpp +++ b/client/cs_statefile.cpp @@ -499,23 +499,6 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) { } continue; } -#endif -#ifdef SIM - if (parse_double(buf, "", connection_interval)) { - continue; - } - if (match_tag(buf, "")) { - XML_PARSER xp(&mf); - available.parse(xp, "/available"); - available.init(START_TIME); - continue; - } - if (match_tag(buf, "")) { - XML_PARSER xp(&mf); - idle.parse(xp, "/idle"); - idle.init(START_TIME); - continue; - } #endif if (log_flags.unparsed_xml) { msg_printf(0, MSG_INFO, diff --git a/client/log_flags.cpp b/client/log_flags.cpp index b2c1ab26ee..20bd7ecfba 100644 --- a/client/log_flags.cpp +++ b/client/log_flags.cpp @@ -494,9 +494,11 @@ int read_config_file(bool init, const char* fname) { int retval = config.parse(f); fclose(f); if (retval) return retval; +#ifndef SIM diagnostics_set_max_file_sizes( config.max_stdout_file_size, config.max_stderr_file_size ); +#endif return 0; } diff --git a/client/sim.cpp b/client/sim.cpp index 443bbeccc6..7ec062070c 100644 --- a/client/sim.cpp +++ b/client/sim.cpp @@ -30,13 +30,16 @@ // timeline.html // log.txt // summary.xml -// debt.dat -// debt_overall.png -// debt_cpu_std.png -// debt_cpu_ltd.png -// debt_nvidia_std.png -// debt_nvidia_ltd.png -// ... +// if using REC: +// rec.png +// if not using REC: +// debt.dat +// debt_overall.png +// debt_cpu_std.png +// debt_cpu_ltd.png +// debt_nvidia_std.png +// debt_nvidia_ltd.png +// ... // // Simulation params: // [--duration x] @@ -79,11 +82,19 @@ FILE* index_file; char log_filename[256]; string html_msg; -bool running; double running_time = 0; bool server_uses_workload = false; bool cpu_sched_rr_only; +RANDOM_PROCESS on_proc; +RANDOM_PROCESS active_proc; +RANDOM_PROCESS gpu_active_proc; +RANDOM_PROCESS connected_proc; +bool on; +bool active; +bool gpu_active; +bool connected; + SIM_RESULTS sim_results; void usage(char* prog) { @@ -308,21 +319,10 @@ double get_estimated_delay(RESULT* rp) { // bool CLIENT_STATE::simulate_rpc(PROJECT* p) { char buf[256], buf2[256]; - static double last_time=0; vector ip_results; int infeasible_count = 0; vector new_results; - double diff = now - last_time; - if (diff && diff < connection_interval) { - msg_printf(NULL, MSG_INFO, - "simulate_rpc: too soon %f < %f", - diff, connection_interval - ); - return false; - } - last_time = now; - // save request params for WORK_FETCH::handle_reply // double save_cpu_req_secs = cpu_work_fetch.req_secs; @@ -482,6 +482,8 @@ bool CLIENT_STATE::scheduler_rpc_poll() { } bool ACTIVE_TASK_SET::poll() { + if (!active) return false; + unsigned int i; char buf[256]; bool action = false; @@ -491,8 +493,6 @@ bool ACTIVE_TASK_SET::poll() { last_time = gstate.now; PROJECT* p; - if (!running) return false; - for (i=0; iidle = true; @@ -519,7 +519,9 @@ bool ACTIVE_TASK_SET::poll() { if (atp->task_state() != PROCESS_EXECUTING) continue; RESULT* rp = atp->result; if (rp->uses_coprocs()) { - cpu_usage_gpu += rp->avp->avg_ncpus; + if (gpu_active) { + cpu_usage_gpu += rp->avp->avg_ncpus; + } } else { cpu_usage_cpu += rp->avp->avg_ncpus; } @@ -535,36 +537,37 @@ bool ACTIVE_TASK_SET::poll() { for (i=0; itask_state()) { - case PROCESS_EXECUTING: - atp->elapsed_time += diff; - RESULT* rp = atp->result; - double flops = rp->avp->flops; - if (!rp->uses_coprocs()) { - flops *= cpu_scale; - } - - atp->flops_left -= diff*flops; - - atp->fraction_done = 1 - (atp->flops_left / rp->wup->rsc_fpops_est); - atp->checkpoint_wall_time = gstate.now; - - if (atp->flops_left <= 0) { - atp->set_task_state(PROCESS_EXITED, "poll"); - rp->exit_status = 0; - rp->ready_to_report = true; - gstate.request_schedule_cpus("ATP poll"); - gstate.request_work_fetch("ATP poll"); - sprintf(buf, "result %s finished
", rp->name); - html_msg += buf; - action = true; - } - double pf = app_peak_flops(rp->avp, diff, cpu_scale); - rp->project->project_results.flops_used += pf; - rp->peak_flop_count += pf; - sim_results.flops_used += pf; - rp->project->idle = false; + if (atp->task_state() != PROCESS_EXECUTING) continue; + RESULT* rp = atp->result; + if (!gpu_active && rp->uses_coprocs()) { + continue; } + atp->elapsed_time += diff; + double flops = rp->avp->flops; + if (!rp->uses_coprocs()) { + flops *= cpu_scale; + } + + atp->flops_left -= diff*flops; + + atp->fraction_done = 1 - (atp->flops_left / rp->wup->rsc_fpops_est); + atp->checkpoint_wall_time = gstate.now; + + if (atp->flops_left <= 0) { + atp->set_task_state(PROCESS_EXITED, "poll"); + rp->exit_status = 0; + rp->ready_to_report = true; + gstate.request_schedule_cpus("ATP poll"); + gstate.request_work_fetch("ATP poll"); + sprintf(buf, "result %s finished
", rp->name); + html_msg += buf; + action = true; + } + double pf = app_peak_flops(rp->avp, diff, cpu_scale); + rp->project->project_results.flops_used += pf; + rp->peak_flop_count += pf; + sim_results.flops_used += pf; + rp->project->idle = false; } for (i=0; i%.0f", WIDTH1, gstate.now); - if (!running) { + if (active) { + show_resource(RSC_TYPE_CPU); + if (gpu_active) { + if (gstate.host_info.have_cuda()) { + show_resource(RSC_TYPE_CUDA); + } + if (gstate.host_info.have_ati()) { + show_resource(RSC_TYPE_ATI); + } + } else { + if (gstate.host_info.have_cuda()) { + fprintf(html_out, "OFF", WIDTH2); + } + if (gstate.host_info.have_ati()) { + fprintf(html_out, "OFF", WIDTH2); + } + } + } else { fprintf(html_out, "OFF", WIDTH2); if (gstate.host_info.have_cuda()) { fprintf(html_out, "OFF", WIDTH2); @@ -832,15 +852,8 @@ void html_rec() { if (gstate.host_info.have_ati()) { fprintf(html_out, "OFF", WIDTH2); } - } else { - show_resource(RSC_TYPE_CPU); - if (gstate.host_info.have_cuda()) { - show_resource(RSC_TYPE_CUDA); - } - if (gstate.host_info.have_ati()) { - show_resource(RSC_TYPE_ATI); - } } + fprintf(html_out, "\n"); } @@ -996,17 +1009,30 @@ void simulate() { "starting simulation. delta %f duration %f", delta, duration ); while (1) { - running = gstate.available.sample(gstate.now); - while (1) { - action = gstate.active_tasks.poll(); - if (running) { - action |= gstate.handle_finished_apps(); - action |= gstate.possibly_schedule_cpus(); - action |= gstate.enforce_schedule(); - action |= gstate.scheduler_rpc_poll(); + on = on_proc.sample(delta); + if (on) { + active = active_proc.sample(delta); + if (active) { + gpu_active = gpu_active_proc.sample(delta); + } else { + gpu_active = false; + } + connected = connected_proc.sample(delta); + } else { + active = gpu_active = connected = false; + } + if (on) { + while (1) { + action = gstate.active_tasks.poll(); + action |= gstate.handle_finished_apps(); + gpu_suspend_reason = gpu_active?0:1; + action |= gstate.possibly_schedule_cpus(); + if (connected) { + action |= gstate.scheduler_rpc_poll(); + } + msg_printf(0, MSG_INFO, action?"did action":"did no action"); + if (!action) break; } - msg_printf(0, MSG_INFO, action?"did action":"did no action"); - if (!action) break; } msg_printf(0, MSG_INFO, "took time step"); for (unsigned int i=0; i