diff --git a/api/boinc_api.C b/api/boinc_api.C
index 7e7132ed6e..9d03a4cc45 100644
--- a/api/boinc_api.C
+++ b/api/boinc_api.C
@@ -179,7 +179,12 @@ static int setup_shared_mem() {
//
static int boinc_worker_thread_cpu_time(double& cpu) {
#ifdef _WIN32
- if (boinc_thread_cpu_time(worker_thread_handle, cpu)) {
+ if (options.all_threads_cpu_time) {
+ retval = boinc_process_cpu_time(cpu);
+ } else {
+ retval = boinc_thread_cpu_time(worker_thread_handle, cpu);
+ }
+ if (retval) {
cpu = nrunning_ticks * TIMER_PERIOD; // for Win9x
}
#else
@@ -851,7 +856,7 @@ int boinc_time_to_checkpoint() {
int boinc_checkpoint_completed() {
double cur_cpu;
- boinc_calling_thread_cpu_time(cur_cpu);
+ boinc_worker_thread_cpu_time(cur_cpu);
last_wu_cpu_time = cur_cpu + aid.wu_cpu_time;
last_checkpoint_cpu_time = last_wu_cpu_time;
update_app_progress(last_checkpoint_cpu_time, last_checkpoint_cpu_time);
diff --git a/api/boinc_api.h b/api/boinc_api.h
index 7288e0e4a6..6f42ac1897 100755
--- a/api/boinc_api.h
+++ b/api/boinc_api.h
@@ -49,6 +49,9 @@ typedef struct BOINC_OPTIONS {
// if heartbeat fail, or get process control msg, take
// direction action (exit, suspend, resume).
// Otherwise just set flag in BOINC status
+ int all_threads_cpu_time;
+ // count the CPU time of all threads
+ // (for apps that have multiple worker threads)
} BOINC_OPTIONS;
typedef struct BOINC_STATUS {
diff --git a/checkin_notes b/checkin_notes
index 4ab2fee8e2..55e82ce2d7 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -4297,3 +4297,16 @@ Rom 28 Apr 2006 (by Frank S. Thomas)
configure.ac
clientgui/
BOINCGUIApp.cpp
+
+David 30 Apr 2006
+ - API: add all_threads_cpu_time flag to BOINC_OPTIONS
+ for applications that have more than one CPU-intensive thread.
+ Measure the CPU time of whole process, not just worker thread.
+ - Less insistent messages when client has worng URL for project
+
+ api/
+ boinc_api.C,h
+ client/
+ cs_scheduler.C
+ lib/
+ util.C,h
diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C
index 4119e9529d..f54756d884 100644
--- a/client/cs_scheduler.C
+++ b/client/cs_scheduler.C
@@ -751,16 +751,22 @@ int CLIENT_STATE::handle_scheduler_reply(
}
p2 = gstate.lookup_project(sr.master_url);
if (p2) {
- msg_printf(project, MSG_ERROR,
- "Duplicate attachment detected - detach all projects named %s",
+ msg_printf(project, MSG_INFO,
+ "You seem to be attached to this project twice"
+ );
+ msg_printf(project, MSG_INFO,
+ "We suggest that you detach projects named %s,",
project->project_name
);
- msg_printf(project, MSG_ERROR,
- "Then reattach to %s", sr.master_url
+ msg_printf(project, MSG_INFO,
+ "then reattach to %s", sr.master_url
);
} else {
- msg_printf(project, MSG_ERROR,
- "Detach this project, then reattach to %s",
+ msg_printf(project, MSG_INFO,
+ "Using the wrong URL can cause problems in some cases."
+ );
+ msg_printf(project, MSG_INFO,
+ "When convenient, detach this project, then reattach to %s",
sr.master_url
);
}
diff --git a/doc/boinc_news.inc b/doc/boinc_news.inc
index e1c8c89d75..153de54e8e 100644
--- a/doc/boinc_news.inc
+++ b/doc/boinc_news.inc
@@ -1,9 +1,16 @@
$project_news = array(
+array("April 30, 2006",
+ " The latest German BOINCcast
+ discusses ClimatePrediction.net;
+ earlier BOINCcasts cover SIMAP, LHC@home, and uFluids.
+
+ "
+),
array("April 14, 2006",
"The CERN Courier's Computer Newsletter features an article on
- BOINC activities at CERN.
+ BOINC activities at CERN.
"),
array("April 13, 2006",
"According to various statistics sites,
diff --git a/doc/compound_app.php b/doc/compound_app.php
index f15508c36c..71e40695bb 100644
--- a/doc/compound_app.php
+++ b/doc/compound_app.php
@@ -71,6 +71,11 @@ list_item("direct_process_action",
the BOINC_STATUS structure,
which can be polled using boinc_get_status()."
);
+list_item("all_threads_cpu_time",
+ "If set, the CPU of all threads (not just the worker thread)
+ will be counted.
+ For apps that do computation in more than one thread."
+);
list_end();
echo "
@@ -103,6 +108,7 @@ Typical worker program logic is: BOINC_OPTIONS options; options.main_program = false; +options.send_status_msgs = true; ... boinc_init_options(&options); ... diff --git a/doc/logo.php b/doc/logo.php index 4dd8046d90..a1136e7b47 100644 --- a/doc/logo.php +++ b/doc/logo.php @@ -13,6 +13,9 @@ Hi-res versions of the logo: