- client: tweak to ATI CPU recognition

from [P3D] Crashtest

svn path=/trunk/boinc/; revision=22845
This commit is contained in:
David Anderson 2010-12-18 17:09:57 +00:00
parent 93902c1475
commit 3a9549979e
8 changed files with 143 additions and 148 deletions

View File

@ -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

View File

@ -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();

View File

@ -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:

View File

@ -499,23 +499,6 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) {
}
continue;
}
#endif
#ifdef SIM
if (parse_double(buf, "<connection_interval>", connection_interval)) {
continue;
}
if (match_tag(buf, "<available>")) {
XML_PARSER xp(&mf);
available.parse(xp, "/available");
available.init(START_TIME);
continue;
}
if (match_tag(buf, "<idle>")) {
XML_PARSER xp(&mf);
idle.parse(xp, "/idle");
idle.init(START_TIME);
continue;
}
#endif
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_INFO,

View File

@ -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;
}

View File

@ -30,6 +30,9 @@
// timeline.html
// log.txt
// summary.xml
// if using REC:
// rec.png
// if not using REC:
// debt.dat
// debt_overall.png
// debt_cpu_std.png
@ -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_RESULT> ip_results;
int infeasible_count = 0;
vector<RESULT*> 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; i<gstate.projects.size(); i++) {
p = gstate.projects[i];
p->idle = 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()) {
if (gpu_active) {
cpu_usage_gpu += rp->avp->avg_ncpus;
}
} else {
cpu_usage_cpu += rp->avp->avg_ncpus;
}
@ -535,10 +537,12 @@ bool ACTIVE_TASK_SET::poll() {
for (i=0; i<active_tasks.size(); i++) {
ACTIVE_TASK* atp = active_tasks[i];
switch (atp->task_state()) {
case PROCESS_EXECUTING:
atp->elapsed_time += diff;
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;
@ -565,7 +569,6 @@ bool ACTIVE_TASK_SET::poll() {
sim_results.flops_used += pf;
rp->project->idle = false;
}
}
for (i=0; i<gstate.projects.size(); i++) {
p = gstate.projects[i];
@ -824,23 +827,33 @@ void html_rec() {
}
fprintf(html_out, "<table border=1><tr><td width=%d valign=top>%.0f</td>", WIDTH1, gstate.now);
if (!running) {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
if (gstate.host_info.have_cuda()) {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
}
if (gstate.host_info.have_ati()) {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
}
} else {
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, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
}
if (gstate.host_info.have_ati()) {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
}
}
} else {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
if (gstate.host_info.have_cuda()) {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
}
if (gstate.host_info.have_ati()) {
fprintf(html_out, "<td width=%d valign=top bgcolor=#aaaaaa>OFF</td>", WIDTH2);
}
}
fprintf(html_out, "</tr></table>\n");
}
@ -996,18 +1009,31 @@ void simulate() {
"starting simulation. delta %f duration %f", delta, duration
);
while (1) {
running = gstate.available.sample(gstate.now);
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();
if (running) {
action |= gstate.handle_finished_apps();
gpu_suspend_reason = gpu_active?0:1;
action |= gstate.possibly_schedule_cpus();
action |= gstate.enforce_schedule();
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, "took time step");
for (unsigned int i=0; i<gstate.active_tasks.active_tasks.size(); i++) {
ACTIVE_TASK* atp = gstate.active_tasks.active_tasks[i];

View File

@ -77,9 +77,8 @@ class RANDOM_PROCESS {
public:
double frac;
double lambda;
int parse(XML_PARSER&, const char* end_tag);
bool sample(double);
void init(double);
bool sample(double dt);
void init(double f, double l);
RANDOM_PROCESS();
};

View File

@ -133,10 +133,8 @@ inline double exponential(double mean) {
return -mean*log(1-drand());
}
bool RANDOM_PROCESS::sample(double t) {
bool RANDOM_PROCESS::sample(double diff) {
if (frac==1) return true;
double diff = t-last_time;
last_time = t;
time_left -= diff;
if (time_left < 0) {
if (value) {
@ -148,39 +146,26 @@ bool RANDOM_PROCESS::sample(double t) {
}
}
msg_printf(0, MSG_INFO,
"value: %d lambda: %f t %f time_left %f",
value, lambda, t, time_left
"value: %d lambda: %f time_left %f",
value, lambda, time_left
);
return value;
}
RANDOM_PROCESS::RANDOM_PROCESS() {
frac = 1;
last_time = 0;
}
void RANDOM_PROCESS::init(double st) {
last_time = st;
void RANDOM_PROCESS::init(double f, double l) {
frac = f;
lambda = l;
last_time = 0;
value = true;
time_left = exponential(lambda);
off_lambda = lambda/frac - lambda;
}
int NORMAL_DIST::parse(XML_PARSER& xp, const char* end_tag) {
char tag[256];
bool is_tag;
while(!xp.get(tag, sizeof(tag), is_tag)) {
if (!is_tag) return ERR_XML_PARSE;
if (xp.parse_double(tag, "mean", mean)) continue;
else if (xp.parse_double(tag, "std_dev", std_dev)) continue;
else if (!strcmp(tag, end_tag)) return 0;
else {
printf("unrecognized: %s\n", tag);
return ERR_XML_PARSE;
}
}
return ERR_XML_PARSE;
}
int UNIFORM_DIST::parse(XML_PARSER& xp, const char* end_tag) {
char tag[256];
bool is_tag;
@ -197,13 +182,13 @@ int UNIFORM_DIST::parse(XML_PARSER& xp, const char* end_tag) {
return ERR_XML_PARSE;
}
int RANDOM_PROCESS::parse(XML_PARSER& xp, const char* end_tag) {
int NORMAL_DIST::parse(XML_PARSER& xp, const char* end_tag) {
char tag[256];
bool is_tag;
while(!xp.get(tag, sizeof(tag), is_tag)) {
if (!is_tag) return ERR_XML_PARSE;
if (xp.parse_double(tag, "frac", frac)) continue;
else if (xp.parse_double(tag, "lambda", lambda)) continue;
if (xp.parse_double(tag, "mean", mean)) continue;
else if (xp.parse_double(tag, "std_dev", std_dev)) continue;
else if (!strcmp(tag, end_tag)) return 0;
else {
printf("unrecognized: %s\n", tag);
@ -212,4 +197,3 @@ int RANDOM_PROCESS::parse(XML_PARSER& xp, const char* end_tag) {
}
return ERR_XML_PARSE;
}