diff --git a/checkin_notes b/checkin_notes index e1f5632117..f46f18e992 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3981,3 +3981,16 @@ Rom 21 May 2012 clientgui/ AdvancedFrame.cpp + +David 22 May 2012 + - add script to repair damaged user.global_prefs fields + - compile warning fixes + + sched/ + delete_file.cpp + sched_version.cpp + html/ops/ + fix_venue.php + vda/ + stats.cpp + ssim.php diff --git a/doc/index.php b/doc/index.php index a8711daa98..498bab89f9 100644 --- a/doc/index.php +++ b/doc/index.php @@ -17,7 +17,7 @@ require_once("../html/inc/translation.inc"); function show_participant() { $i = rand(0, 99); $j = $i+1; - echo " + echo "
".tra("Computing power")." @@ -36,7 +36,7 @@ function show_participant() { function show_totals() { $fn = "boinc_state.xml"; if (!file_exists($fn) || filemtime($fn) < time()-86400) { - $x = file_get_contents("http://www.boincstats.com/xml/boinc_state.php"); + $x = file_get_contents("http://boincstats.com/en/xml/boincState"); if ($x) { $f = fopen($fn, "w"); fwrite($f, $x); diff --git a/doc/projects.inc b/doc/projects.inc index bb2e28cd2e..f180529871 100644 --- a/doc/projects.inc +++ b/doc/projects.inc @@ -292,6 +292,14 @@ $mixed = array( $math = array( tra("Mathematics, computing, and games"), array( + array( + "NumberFields@home", + "http://stat.la.asu.edu/NumberFields/", + "Arizona State University, school of Mathematics", + "Mathematics", + "NumberFields@home searches for fields with special properties. The primary application of this research is in the realm of algebraic number theory. Number theorists can mine the data for interesting patterns to help them formulate conjectures about number fields. Ultimately, this research will lead to a deeper understanding of the profound properties of numbers, the basic building blocks of all mathematics.", + "nf_banner_10.jpg" + ), array( "SAT@home", "http://sat.isa.ru/pdsat/", diff --git a/html/ops/fix_venue.php b/html/ops/fix_venue.php new file mode 100644 index 0000000000..f91399cfc0 --- /dev/null +++ b/html/ops/fix_venue.php @@ -0,0 +1,53 @@ +\n" before "" +// This fixes an XML error introduced at some point in the past +// +function repair_prefs($prefs) { + $x = strstr($prefs, "", true); + if (!$x) return null; + return "$x\n \n\n"; +} + +function process_set($users) { + foreach ($users as $user) { + if (!$user->global_prefs) { + //echo "$user->id: no prefs\n"; + continue; + } + $retval = @simplexml_load_string($user->global_prefs); + if ($retval) { + //echo "$user->id: good\n"; + } else { + echo "$user->id: prefs don't parse\n"; + $p = repair_prefs($user->global_prefs); + if ($p) { + $retval = @simplexml_load_string($p); + if ($retval) { + $user->update("global_prefs='$p'"); + echo "repair succeeded for $user->id\n"; + } else { + echo "couldn't repair prefs for user $user->id\n"; + } + } else { + echo "bad prefs for user $user->id\n"; + } + } + } +} + + +$n = 0; +while (1) { + $users = BoincUser::enum("true limit $n,1000"); + echo "processing from $n\n"; + if (!$users) break; + process_set($users); + $n += sizeof($users); +} +?> diff --git a/sched/delete_file.cpp b/sched/delete_file.cpp index 18048d5ba1..e9a9c62020 100644 --- a/sched/delete_file.cpp +++ b/sched/delete_file.cpp @@ -43,12 +43,13 @@ void usage(char* name) { fprintf(stderr, - "Usage: delete_file [options] : delete a file from a host \n\n" + "Usage: %s [options] : delete a file from a host \n\n" "Options:\n" " --file_name F file name\n" " --host_id H host DB ID\n" " [-h | --help] Show this help text.\n" - " [-v | --version] Show version information.\n" + " [-v | --version] Show version information.\n", + name ); } diff --git a/sched/sched_version.cpp b/sched/sched_version.cpp index 3509cfaa87..b3aa594a66 100644 --- a/sched/sched_version.cpp +++ b/sched/sched_version.cpp @@ -426,7 +426,7 @@ static double max_32b_address_space() { // - check if we need work for the resource // static BEST_APP_VERSION* check_homogeneous_app_version( - WORKUNIT& wu, bool reliable_only + WORKUNIT& wu, bool /* reliable_only */ // TODO: enforce reliable_only ) { static BEST_APP_VERSION bav; diff --git a/vda/ssim.php b/vda/ssim.php index cc45e8749f..11bb6a878c 100644 --- a/vda/ssim.php +++ b/vda/ssim.php @@ -5,13 +5,19 @@ // usage: ssim.php infile // // format of infile -// policy policyfile1 +// policy policy_file_1 // ... -// policy policyfilen +// policy policy_file_n // host_life_mean x1 ... xn // connect_interval x // mean_xfer_rate x +// output graphs: +// infile_ft.png: fault tolerance level vs time +// infile_du.png: disk usage vs time +// infile_ub.png: upload BW vs time +// infile_db.png: download BW vs time + function parse_input_file($filename) { $x = null; $x->name = $filename; diff --git a/vda/stats.cpp b/vda/stats.cpp index 7da23649f5..1178245ada 100644 --- a/vda/stats.cpp +++ b/vda/stats.cpp @@ -59,10 +59,10 @@ void STATS_ITEM::sample(double v, bool collecting_stats, double now) { #ifdef SAMPLE_DEBUG switch (kind) { case DISK: - printf("%s: %s: %fGB -> %fGB\n", now_str(), name, value/1e9, v/1e9); + printf("%s: %s: %f GB -> %f GB\n", now_str(), name, value/1e9, v/1e9); break; case NETWORK: - printf("%s: %s: %fMbps -> %fMbps\n", now_str(), name, value/1e6, v/1e6); + printf("%s: %s: %f Mbps -> %f Mbps\n", now_str(), name, value/1e6, v/1e6); break; case FAULT_TOLERANCE: printf("%s: %s: %.0f -> %.0f\n", now_str(), name, value, v); @@ -109,12 +109,12 @@ void STATS_ITEM::print(double now) { double dt = now - start_time; switch (kind) { case DISK: - printf(" mean: %fGB. Max: %fGB at %s\n", + printf(" mean: %f GB. Max: %f GB at %s\n", (integral/dt)/1e9, extreme_val/1e9, time_str(extreme_val_time) ); break; case NETWORK: - printf(" mean: %fMbps. Max: %fMbps at %s\n", + printf(" mean: %f Mbps. Max: %f Mbps at %s\n", (integral/dt)/1e6, extreme_val/1e6, time_str(extreme_val_time) ); break;