- GUI RPC: parse GPU info, FLOPS from APP_VERSION records

(client already sends this info)

svn path=/trunk/boinc/; revision=22624
This commit is contained in:
David Anderson 2010-11-04 21:32:05 +00:00
parent e87f289544
commit 789f0b67fc
4 changed files with 51 additions and 6 deletions

View File

@ -7832,3 +7832,11 @@ David 04 Nov 2010
html/
various
David 04 Nov 2010
- GUI RPC: parse GPU info, FLOPS from APP_VERSION records
(client already sends this info)
lib/
gui_rpc_client_ops.cpp
gui_rpc_client.h

View File

@ -117,6 +117,13 @@ $biomed = array(
$earth = array(
"Earth Sciences",
array(
array(
"Quake Catcher Network",
"http://qcn.stanford.edu/",
"Stanford University",
"Seismology",
"The Quake-Catcher Network is a collaborative initiative for developing the world's largest, low-cost strong-motion seismic network by utilizing sensors in and attached to internet-connected computers."
),
array(
"Virtual Prairie",
"http://vcsc.cs.uh.edu/virtual-prairie/",

View File

@ -194,7 +194,13 @@ class APP_VERSION {
public:
char app_name[256];
int version_num;
char platform[64];
char plan_class[64];
double avg_ncpus;
double ncudas;
double natis;
double gpu_ram;
double flops;
APP* app;
PROJECT* project;
@ -202,6 +208,7 @@ public:
~APP_VERSION();
int parse(MIOFILE&);
int parse_coproc(MIOFILE&);
void print();
void clear();
};

View File

@ -369,23 +369,46 @@ APP_VERSION::~APP_VERSION() {
clear();
}
int APP_VERSION::parse_coproc(MIOFILE& in) {
char buf[256], type_buf[256];
double count = 0;
while (in.fgets(buf, 256)) {
if (match_tag(buf, "</coproc>")) {
if (!strcmp(type_buf, "CUDA")) {
ncudas = count;
} else if (!strcmp(type_buf, "ATI")) {
natis = count;
}
return 0;
}
if (parse_str(buf, "<type>", type_buf, sizeof(type_buf))) continue;
if (parse_double(buf, "<count>", count)) continue;
}
return ERR_XML_PARSE;
}
int APP_VERSION::parse(MIOFILE& in) {
char buf[256];
while (in.fgets(buf, 256)) {
if (match_tag(buf, "</app_version>")) return 0;
if (parse_str(buf, "<app_name>", app_name, sizeof(app_name))) continue;
if (parse_str(buf, "<plan_class>", plan_class, sizeof(plan_class))) continue;
if (parse_int(buf, "<version_num>", version_num)) continue;
if (parse_str(buf, "<plan_class>", plan_class, sizeof(plan_class))) continue;
if (parse_str(buf, "<platform>", platform, sizeof(platform))) continue;
if (parse_double(buf, "<avg_ncpus>", avg_ncpus)) continue;
if (parse_double(buf, "<gpu_ram>", gpu_ram)) continue;
if (parse_double(buf, "<flops>", flops)) continue;
if (match_tag(buf, "<coproc>")) {
parse_coproc(in);
continue;
}
}
return ERR_XML_PARSE;
}
void APP_VERSION::clear() {
strcpy(app_name, "");
strcpy(plan_class, "");
version_num = 0;
app = NULL;
project = NULL;
memset(this, 0, sizeof(*this));
}
WORKUNIT::WORKUNIT() {