From cfbf124d4ddbd1d567cdcf9f56ffe67a9ae46d64 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 8 Apr 2005 21:40:32 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5809 --- checkin_notes | 16 ++++++++++++++++ client/app_graphics.C | 2 ++ html/inc/host.inc | 33 +++++++++++++++++++++++++++------ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 5cb490f80a..b64914d423 100755 --- a/checkin_notes +++ b/checkin_notes @@ -26899,3 +26899,19 @@ David 8 April 2005 MainDocument.cpp MainFrame.cpp ViewMessages.cpp + +David 8 April 2005 + - user web: weaken the test for hosts to be considered compatible + for the "merge" function. + This is needed because different versions of the core client + reported CPU vendor/model differently. + + If two hosts have the words "Intel" and "Pentium" anywhere + in their vendor/model, + and they don't have conflicting xxxGHz strings, + consider them compatible + + client/ + app_graphics.C + html/inc/ + host.inc diff --git a/client/app_graphics.C b/client/app_graphics.C index 5c06a8d59b..5352b266e3 100644 --- a/client/app_graphics.C +++ b/client/app_graphics.C @@ -33,6 +33,8 @@ #include "app.h" #include "util.h" +//#define SS_DEBUG 1 + void ACTIVE_TASK::request_graphics_mode(GRAPHICS_MSG& m) { char buf[MSG_CHANNEL_SIZE], buf2[256]; diff --git a/html/inc/host.inc b/html/inc/host.inc index 2b81a33d67..2c18a197c9 100644 --- a/html/inc/host.inc +++ b/html/inc/host.inc @@ -49,9 +49,9 @@ function show_host($host, $private, $ipprivate) { row2("Created", time_str($host->create_time)); row2("Total Credit", format_credit($host->total_credit)); row2("Recent average credit", format_credit($host->expavg_credit)); - row2("CPU type", "$host->p_vendor $host->p_model"); + row2("CPU type", "$host->p_vendor
$host->p_model"); row2("Number of CPUs", $host->p_ncpus); - row2("Operating System", "$host->os_name $host->os_version"); + row2("Operating System", "$host->os_name
$host->os_version"); $x = $host->m_nbytes/(1024*1024); $y = round($x, 2); row2("Memory", "$y MB"); @@ -201,8 +201,8 @@ function show_host_row($host, $i, $private, $show_owner) { printf(" %s %s - %s %s - %s %s", + %s
%s + %s
%s", format_credit($host->expavg_credit), format_credit($host->total_credit), $host->p_vendor, $host->p_model, $host->os_name, $host->os_version @@ -216,9 +216,30 @@ function show_host_row($host, $i, $private, $show_owner) { // return true iff it's possible that the hosts are actually // the same machine // +function ghz($x) { + $y = explode(" ", $x); + foreach ($y as $z) { + if (strstr($z, "GHz")) return $z; + } +} + function hosts_compatible($host1, $host2) { - if ($host2->p_vendor != $host1->p_vendor) return false; - if ($host2->p_model != $host1->p_model) return false; + // we screwed around with Intel processor names, + // so count them as compatible if both contain "Intel" and "Pentium", + // and don't have conflicting clock rate info + // + $p1 = "$host1->p_vendor $host1->p_model"; + $p2 = "$host2->p_vendor $host2->p_model"; + if (strstr($p1, "Pentium") && strstr($p1, "Intel") + && strstr($p2, "Pentium") && strstr($p2, "Intel") + ) { + $g1 = ghz($p1); + $g2 = ghz($p2); + if ($g1 && $g2 && ($g1!=$g2)) return false; + } else { + if ($host2->p_vendor != $host1->p_vendor) return false; + if ($host2->p_model != $host1->p_model) return false; + } if ($host2->os_name != $host1->os_name) return false; return true; }