- admin web: improve script for browsing credit info

- client: add a coproc-missing message


svn path=/trunk/boinc/; revision=26074
This commit is contained in:
David Anderson 2012-09-06 03:58:24 +00:00
parent 487916c8e9
commit 19602f45f0
4 changed files with 169 additions and 51 deletions

View File

@ -5851,3 +5851,14 @@ David 2 Sept 2012
crypt.cpp
client/
cs_files.cpp
David 5 Sept 2012
- admin web: improve script for browsing credit info
- client: add a coproc-missing message
html/ops/
credit.php
client/
client_types.cpp
sched/
sched_customize.cpp

View File

@ -811,6 +811,9 @@ int APP_VERSION::parse(XML_PARSER& xp) {
if (!retval) {
rt = rsc_index(cp.type);
if (rt <= 0) {
msg_printf(0, MSG_INFO,
"app version refers to missing GPU type %s", cp.type
);
missing_coproc = true;
missing_coproc_usage = cp.count;
strcpy(missing_coproc_name, cp.type);

View File

@ -22,9 +22,10 @@ error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('display_startup_errors', true);
require_once("../inc/util.inc");
require_once("../inc/boinc_db.inc");
define('COBB_SCALE', 100/86400e9);
define('COBB_SCALE', 200/86400e9);
function gavid($avid, $appid) {
if ($avid < 0) {
@ -67,20 +68,6 @@ Credit:
}
}
function show_av($avid) {
$av = BoincAppVersion::lookup_id($avid);
if (!$av) {
echo "app version $avid not found";
return;
}
echo "<hr>
App version ID: $avid
plan class: $av->plan_class
PFC: ".$av->pfc_avg."
scale: ".$av->pfc_scale."
";
}
function handle_result($resultid) {
$r = BoincResult::lookup_id($resultid);
$w = BoincWorkunit::lookup_id($r->workunitid);
@ -96,36 +83,140 @@ function handle_result($resultid) {
}
}
function host_history($hostid, $avid) {
function show_host_av($host_id, $av_id) {
$hav = BoincHostAppVersion::lookup("host_id=$host_id and $app_version_id=$av_id");
page_head("Host $host_id / app_version $av_id credit");
echo "Results";
$rs = BoincResult::enum("hostid=$hostid and app_version_id=$avid and validate_state=1 order by id desc limit 100");
echo "<pre>Results for host $hostid\n";
start_table();
table_header("Workunit", "Elapsed", "Proj FLOPS", "Raw credit", "granted");
$n = 0;
$total=0;
foreach($rs as $r) {
$raw_credit = $r->elapsed_time*$r->flops_estimate*COBB_SCALE;
$n++;
$total += $raw_credit;
echo "ID <a href=credit.php?resultid=$r->id>$r->id</a> raw $raw_credit
";
table_row(
"<a href=credit.php?wu_id=$r->workunitid>$r->workunitid</a>",
$r->elapsed_time,
$r->projected_flops,
$raw_credit,
$r->granted_credit
);
}
$avg = $total/$n;
echo "avg: $avg\n";
echo "</pre>\n";
start_table();
row2("PFC nsamples", $hav->pfc_n);
row2("PFC avg", $hav->pfc_avg);
row2("Average raw credit", $total/$n);
end_table();
page_tail();
}
if (array_key_exists('resultid', $_GET)) {
$resultid = $_GET['resultid'];
handle_result($resultid);
function av_string($av_id) {
if ($av_id> 0) {
$av = BoincAppVersion::lookup($av_id);
$plat = BoincPlatform::lookup_id($av->platformid);
$x = "<a href=credit.php?av_id=$av_id>$plat->name $av->plan_class</a>";
} else {
$x = "Anonymous platform";
}
return $x;
}
function show_workunit($wu_id) {
page_head("Workunit credit");
$wu = BoincWorkunit::lookup_id($wu_id);
$app = BoincApp::lookup_id($wu->appid);
start_table();
row2("App", "<a href=credit.php?app_id=$app->id>$app->user_friendly_name</a>");
end_table();
echo "Results";
start_table();
table_header("Host", "App version", "Elapsed", "FLOPS est");
$results = BoincResult::enum("workunitid=$wu->id and validate_state=1");
foreach ($results as $r) {
table_row(
"<a href=credit.php?host_id=$r->hostid>$r->hostid</a>",
av_string($r->app_version_id),
$r->elapsed_time,
$r->flops_estimate
);
}
end_table();
page_tail();
}
function show_av($av_id) {
$av = BoincAppVersion::lookup_id($av_id);
$app = BoincApp::lookup_id($av->appid);
$plat = BoincPlatform::lookup_id($av->platformid);
$av_desc = "$plat->name $av->plan_class";
page_head("App version $av_desc credit");
start_table();
row2("PFC samples", $av->pfc_n);
row2("PFC average", $av->pfc_avg);
row2("PFC scale", $av->pfc_scale);
row2("App", $app->user_friendly_name);
end_table();
$results = BoincResult::enum("app_version_id=$av_id and validate_state=1");
start_table();
table_header("Host/App_version", "Elapsed", "FLOPS est");
foreach ($results as $r) {
$avs = av_string($r->app_version_id);
table_row(
"<a href=credit.php?host_id=$r->hostid&a_id=$r->app_version_id> host $r->hostid AV $avs</a>",
$r->elapsed_time,
$r->flops_estimate
);
}
end_table();
page_tail();
}
function show_app($app_id) {
$app = BoincApp::lookup_id($app_id);
page_head("App $app->user_friendly_name credit");
$avs = BoincAppVersion::enum("appid=$app_id and deprecated=0");
start_table();
table_header("platform/class/version", "PFC nsamples", "PFC avg", "PFC scale");
foreach ($avs as $av) {
$plat = BoincPlatform::lookup_id($av->platformid);
table_row(
"<a href=credit.php?av_id=$av->id>$plat->user_friendly_name $av->plan_class $av->version_num</a>",
$av->pfc_n,
$av->pfc_avg,
$av->pfc_scale
);
}
end_table();
page_tail();
}
$wu_id = get_int("wu_id", true);
$host_id = get_int("host_id", true);
$av_id = get_int("av_id", true);
$app_id = get_int("app_id", true);
if ($wu_id) {
show_workunit($wu_id);
exit;
}
if ($host_id && $av_id) {
show_host_av($host_id, $av_id);
exit;
}
if ($av_id) {
show_av($av_id);
exit;
}
if ($app_id) {
show_app($app_id);
exit;
}
$hostid = $_GET['hostid'];
$avid = $_GET['avid'];
if ($hostid && $avid) {
host_history($hostid, $avid);
exit;
}
echo "??";
error_page("no command");
?>

View File

@ -142,14 +142,18 @@ static bool ati_check(COPROC_ATI& c, HOST_USAGE& hu,
if (need_amd_libs) {
if (!c.amdrt_detected) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,"[version] AMD run time libraries not found\n");
log_messages.printf(MSG_NORMAL,
"[version] AMD run time libraries not found\n"
);
}
return false;
}
} else {
if (!c.atirt_detected) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,"[version] ATI run time libraries not found\n");
log_messages.printf(MSG_NORMAL,
"[version] ATI run time libraries not found\n"
);
}
return false;
}
@ -162,7 +166,8 @@ static bool ati_check(COPROC_ATI& c, HOST_USAGE& hu,
int dev_major=c.version_num/10000000;
int dev_minor=(c.version_num%10000000)/10000;
int dev_rev=(c.version_num%10000);
log_messages.printf(MSG_NORMAL,"[version] Bad display driver revision %d.%d.%d<%d.%d.%d.\n",
log_messages.printf(MSG_NORMAL,
"[version] Bad display driver revision %d.%d.%d<%d.%d.%d.\n",
dev_major,dev_minor,dev_rev,app_major,app_minor,app_rev
);
}
@ -170,7 +175,8 @@ static bool ati_check(COPROC_ATI& c, HOST_USAGE& hu,
}
if (c.available_ram < min_ram) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,"[version] Insufficient GPU RAM %f>%f.\n",
log_messages.printf(MSG_NORMAL,
"[version] Insufficient GPU RAM %f>%f.\n",
min_ram, c.available_ram
);
}
@ -284,17 +290,19 @@ static bool cuda_check(COPROC_NVIDIA& c, HOST_USAGE& hu,
) {
int cc = c.prop.major*100 + c.prop.minor;
if (min_cc && (cc < min_cc)) {
log_messages.printf(MSG_NORMAL,"[version] App requires compute capability > %d.%d (has %d.%d).\n",
min_cc/100,min_cc%100,
c.prop.major,c.prop.minor
log_messages.printf(MSG_NORMAL,
"[version] App requires compute capability > %d.%d (has %d.%d).\n",
min_cc/100, min_cc%100,
c.prop.major, c.prop.minor
);
return false;
}
if (max_cc && cc >= max_cc) {
log_messages.printf(MSG_NORMAL,"[version] App requires compute capability <= %d.%d (has %d.%d).\n",
max_cc/100,max_cc%100,
c.prop.major,c.prop.minor
log_messages.printf(MSG_NORMAL,
"[version] App requires compute capability <= %d.%d (has %d.%d).\n",
max_cc/100, max_cc%100,
c.prop.major, c.prop.minor
);
return false;
}
@ -309,7 +317,9 @@ static bool cuda_check(COPROC_NVIDIA& c, HOST_USAGE& hu,
//
if (!c.cuda_version && !c.display_driver_version) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,"[version] Client did not provide cuda or driver version.\n");
log_messages.printf(MSG_NORMAL,
"[version] Client did not provide cuda or driver version.\n"
);
}
return false;
}
@ -318,7 +328,8 @@ static bool cuda_check(COPROC_NVIDIA& c, HOST_USAGE& hu,
if (config.debug_version_select) {
double app_version=(double)(min_cuda_version/1000)+(double)(min_cuda_version%100)/100.0;
double client_version=(double)(c.cuda_version/1000)+(double)(c.cuda_version%100)/100.0;
log_messages.printf(MSG_NORMAL,"[version] Bad CUDA version %f>%f.\n",
log_messages.printf(MSG_NORMAL,
"[version] Bad CUDA version %f>%f.\n",
app_version, client_version
);
}
@ -328,18 +339,20 @@ static bool cuda_check(COPROC_NVIDIA& c, HOST_USAGE& hu,
if (c.display_driver_version) {
if (min_driver_version && (c.display_driver_version < min_driver_version)) {
if (config.debug_version_select) {
double app_version=(double)(min_driver_version)/100.0;
double client_version=(double)(c.display_driver_version)/100.0;
log_messages.printf(MSG_NORMAL,"[version] Bad display driver revision %f>%f.\n",
app_version, client_version
);
double app_version=(double)(min_driver_version)/100.0;
double client_version=(double)(c.display_driver_version)/100.0;
log_messages.printf(MSG_NORMAL,
"[version] Bad display driver revision %f>%f.\n",
app_version, client_version
);
}
return false;
}
}
if (c.available_ram < min_ram) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,"[version] Insufficient GPU RAM %f>%f.\n",
log_messages.printf(MSG_NORMAL,
"[version] Insufficient GPU RAM %f>%f.\n",
min_ram, c.available_ram
);
}