diff --git a/checkin_notes b/checkin_notes
index de5d1ea2b9..ca870d7c99 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -5138,3 +5138,14 @@ Rom 25 June 2008
clientgui/
BOINCTaskBar.cpp
+
+David 25 June 2008
+ - client: improve error messages when can't copy files
+ - client: change CUDA detection on Linux and Mac.
+ Look for libcuda.so in /usr/lib/nvidia and /usr/lib64/nvidia.
+ If we find it, assume that libcudart is in the library path.
+
+ client/
+ app_start.C
+ lib/
+ coproc.C
diff --git a/client/app_start.C b/client/app_start.C
index b151920517..a9f0717828 100644
--- a/client/app_start.C
+++ b/client/app_start.C
@@ -265,7 +265,8 @@ static int setup_file(
retval = boinc_copy(file_path, link_path);
if (retval) {
msg_printf(project, MSG_INTERNAL_ERROR,
- "Can't copy %s to %s", file_path, link_path
+ "Can't copy %s to %s: %s", file_path, link_path,
+ boincerror(retval)
);
return retval;
}
@@ -319,7 +320,8 @@ int ACTIVE_TASK::copy_output_files() {
int retval = boinc_rename(slotfile, projfile);
if (retval) {
msg_printf(wup->project, MSG_INTERNAL_ERROR,
- "Can't rename output file %s", fip->name
+ "Can't rename output file %s to %s: %s",
+ fip->name, projfile, boincerror(retval)
);
}
}
@@ -737,7 +739,7 @@ int ACTIVE_TASK::start(bool first_time) {
dup2(fd, STDOUT_FILENO);
close(fd);
- // add project dir to library path
+ // add project dir and slot dir to library path
//
char libpath[8192];
get_project_dir(wup->project, buf, sizeof(buf));
diff --git a/html/inc/bolt_cat.inc b/html/inc/bolt_cat.inc
index b83a0b0742..d6fc2f287d 100644
--- a/html/inc/bolt_cat.inc
+++ b/html/inc/bolt_cat.inc
@@ -59,4 +59,47 @@ function lookup_categorization($name) {
return null;
}
+function filter_form($sel_name, $sel_cat) {
+ global $categorizations;
+ $checked = (!$sel_name || $sel_name == "none")?"checked":"";
+ echo "
+ Filter by:
+
";
+}
+
+function breakdown_form($sel_name) {
+ global $categorizations;
+ echo "
+ Break down by:
+ ";
+}
+
?>
diff --git a/html/inc/bolt_util.inc b/html/inc/bolt_util.inc
index 46d5368a5e..8b8aacec5c 100644
--- a/html/inc/bolt_util.inc
+++ b/html/inc/bolt_util.inc
@@ -240,4 +240,38 @@ function test_stats() {
echo "lo $lo hi $hi\n";
}
+//////////// graph drawing
+
+function bar($title, $n, $width, $lo, $hi) {
+ $x1 = $width*$lo;
+ $x2 = $width*($hi-$lo);
+ $a1 = number_format($lo*100);
+ $a2 = number_format($hi*100);
+ return "
+
+ $title($n students)
+
+
+
+
+ ";
+}
+
+function bar_insuff($title, $width) {
+ return "
+
+ $title
+
+
+
+
+ ";
+}
+
?>
diff --git a/html/user/bolt_compare.php b/html/user/bolt_compare.php
index b6831d2c9d..bb9412f561 100644
--- a/html/user/bolt_compare.php
+++ b/html/user/bolt_compare.php
@@ -17,51 +17,8 @@ require_once("../inc/bolt_db.inc");
require_once("../inc/bolt_util.inc");
require_once("../inc/bolt_cat.inc");
-function filter_form($sel_name, $sel_cat) {
- global $categorizations;
- $checked = (!$sel_name || $sel_name == "none")?"checked":"";
- echo "
- Filter by:
- ";
-}
-
-function breakdown_form($sel_name) {
- global $categorizations;
- echo "
- Break down by:
- ";
-}
-
function compare_case(
- $select_unit, $snap, $filter, $filter_cat, $breakdown, $breakdown_cat
+ $title, $select_unit, $snap, $filter, $filter_cat, $breakdown, $breakdown_cat
) {
// for each select alternative, build an array of xset scores
@@ -77,27 +34,30 @@ function compare_case(
continue;
}
$z = $x->sf->selected_unit;
- echo " unit: $z ";
$u = $x->sf->selected_unit;
$a[$u][] = $x->xr->score;
}
+ if ($title) {
+ echo "
+ $title
+ ";
+ }
foreach ($select_unit->units as $child) {
if (array_key_exists($child->name, $a)) {
$scores = $a[$child->name];
$n = count($scores);
if ($n < 2) {
- $x = "insufficient data";
+ $x = bar_insuff($child->name, 600);
} else {
conf_int_90($scores, $lo, $hi);
- $x = "($lo, $hi) ($n results)";
+ //$x = "($lo, $hi) ($n results)";
+ $x = bar($child->name, $n, 600, $lo, $hi);
}
} else {
- $x = "insufficient data";
+ $x = bar_insuff($child->name, 600);
}
- echo "
- $child->name: $x
- ";
+ echo $x;
}
}
@@ -130,18 +90,24 @@ function compare_aux($select_name, $xset_name, $snap) {
page_head("Unit comparison");
echo "
- The following compares the alternatives of the
- $select_name select unit
- with respect to the $xset_name exercise set unit.
+
+ The following compares the alternatives of
+ $select_name with respect to $xset_name .
+
";
- compare_case($select_unit, $snap, $filter, $filter_cat, null, null);
+ echo "
";
+ if ($breakdown) echo "Total ";
+
+ compare_case(null, $select_unit, $snap, $filter, $filter_cat, null, null);
if ($breakdown) {
+ echo "Breakdown by $breakdown_name ";
foreach ($breakdown->categories() as $c) {
- echo "$c ";
- compare_case($select_unit, $snap, $filter, $filter_cat, $breakdown, $c);
+ compare_case($c, $select_unit, $snap, $filter, $filter_cat, $breakdown, $c);
+ echo "";
}
}
+ echo "
";
echo "