*** empty log message ***

svn path=/trunk/boinc/; revision=6374
This commit is contained in:
David Anderson 2005-06-18 02:20:56 +00:00
parent 993e8420ba
commit adc8baa88a
5 changed files with 33 additions and 12 deletions

View File

@ -7974,3 +7974,13 @@ David 17 June 2005
clientgui/
MainDocument.cpp,h
MainFrame.cpp
David 17 June 2005
- Run CPU on the same # of CPUs that BOINC will use,
reflecting global preferences.
(from Glenn Dill)
client/
cs_benchmark.C
cs_scheduler.C

View File

@ -188,12 +188,12 @@ void CLIENT_STATE::start_cpu_benchmarks() {
if (!benchmark_descs) {
benchmark_descs = (BENCHMARK_DESC*)calloc(
host_info.p_ncpus, sizeof(BENCHMARK_DESC)
ncpus, sizeof(BENCHMARK_DESC)
);
}
benchmarks_running = true;
for (i=0; i<host_info.p_ncpus; i++) {
for (i=0; i<ncpus; i++) {
benchmark_descs[i].ordinal = i;
benchmark_descs[i].done = false;
benchmark_descs[i].error = false;
@ -274,7 +274,7 @@ void check_benchmark(BENCHMARK_DESC& desc) {
void CLIENT_STATE::abort_cpu_benchmarks() {
int i;
if (!benchmarks_running) return;
for (i=0; i<host_info.p_ncpus; i++) {
for (i=0; i<ncpus; i++) {
abort_benchmark(benchmark_descs[i]);
}
}
@ -348,7 +348,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
}
int ndone = 0;
bool had_error = false;
for (i=0; i<host_info.p_ncpus; i++) {
for (i=0; i<ncpus; i++) {
if (!benchmark_descs[i].done) {
check_benchmark(benchmark_descs[i]);
}
@ -357,7 +357,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
if (benchmark_descs[i].error) had_error = true;
}
}
if (ndone == host_info.p_ncpus) {
if (ndone == ncpus) {
if (had_error) {
msg_printf(NULL, MSG_ERROR, "CPU benchmarks error");
host_info.p_fpops = DEFAULT_FPOPS;
@ -369,19 +369,19 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
host_info.p_iops = 0;
host_info.p_membw = 0;
host_info.m_cache = 0;
for (i=0; i<host_info.p_ncpus; i++) {
for (i=0; i<ncpus; i++) {
host_info.p_fpops += benchmark_descs[i].host_info.p_fpops;
host_info.p_iops += benchmark_descs[i].host_info.p_iops;
host_info.p_membw += benchmark_descs[i].host_info.p_membw;
host_info.m_cache += benchmark_descs[i].host_info.m_cache;
}
host_info.p_fpops /= host_info.p_ncpus;
host_info.p_iops /= host_info.p_ncpus;
host_info.p_membw /= host_info.p_ncpus;
host_info.m_cache /= host_info.p_ncpus;
host_info.p_fpops /= ncpus;
host_info.p_iops /= ncpus;
host_info.p_membw /= ncpus;
host_info.m_cache /= ncpus;
}
msg_printf(NULL, MSG_INFO, "Benchmark results:");
msg_printf(NULL, MSG_INFO, " Number of CPUs: %d", host_info.p_ncpus);
msg_printf(NULL, MSG_INFO, " Number of CPUs: %d", ncpus);
msg_printf(
NULL, MSG_INFO, " %.0f double precision MIPS (Whetstone) per CPU",
host_info.p_fpops/1e6

View File

@ -749,7 +749,14 @@ int CLIENT_STATE::handle_scheduler_reply(
msg_printf(project, MSG_ERROR, "Can't parse general preferences");
} else {
show_global_prefs_source(found_venue);
int ncpus_old = ncpus;
install_global_prefs();
if (ncpus != ncpus_old) {
msg_printf(0, MSG_INFO,
"Number of usable CPUs has changed. Running benchmarks."
);
run_cpu_benchmarks = true;
}
}
}

View File

@ -54,6 +54,8 @@ startup of BOINC on various versions of Unix:
<a href=autostart_dennett.txt>Red Hat 9, should also work on Solaris</a>
<li>
<a href=gentoo.txt>Gentoo Linux</a> (from Gabor Nagy)
<li>
<a href=hpux.txt>HPUX</a> (mostly relevant to UNIX in general)
</ul>
";

View File

@ -14,7 +14,9 @@ The following sites offer downloads of BOINC software
and BOINC project applications, compiled for various platforms.
These downloads are not endorsed by BOINC or any BOINC project;
Use them at your own risk.
<p>
<p>
Read <a href=bare_core.php>Installing the command-line client</a>.
<p>
";
list_start();
list_heading_array(array(