mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10068
This commit is contained in:
parent
7000900b0d
commit
3a0a20ae0d
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
<?
|
||||
|
||||
$project_news = array(
|
||||
array("April 30, 2006",
|
||||
"<img align=right width=75 height=66 src=images/Logo_blau.jpg> The latest German <a href=http://boinccast.podhost.de/>BOINCcast</a>
|
||||
discusses ClimatePrediction.net;
|
||||
earlier BOINCcasts cover SIMAP, LHC@home, and uFluids.
|
||||
<br>
|
||||
"
|
||||
),
|
||||
array("April 14, 2006",
|
||||
"The CERN Courier's Computer Newsletter features an article on
|
||||
<a href=http://www.cerncourier.com/articles/cnl/3/4/13/1>BOINC activities at CERN</a>.
|
||||
<a href=http://www.cerncourier.com/articles/cnl/3/4/14/1>BOINC activities at CERN</a>.
|
||||
"),
|
||||
array("April 13, 2006",
|
||||
"According to various <a href=links.php>statistics sites</a>,
|
||||
|
|
|
@ -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 "
|
||||
<p>
|
||||
|
@ -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);
|
||||
...
|
||||
|
|
|
@ -13,6 +13,9 @@ Hi-res versions of the logo:
|
|||
<li>
|
||||
The BOINC logo uses the Planet Benson font from
|
||||
<a href=http://www.larabiefonts.com>Larabie Fonts</a>.
|
||||
<li>
|
||||
An icon for BOINC-related Podcasts, from Christian Beer:
|
||||
<img align=top src=images/Logo_blau.jpg>
|
||||
|
||||
</ul>
|
||||
We welcome alternative ideas.
|
||||
|
|
|
@ -30,7 +30,14 @@ list_item(
|
|||
list_item(
|
||||
"input files",
|
||||
"A list of the input files: their names,
|
||||
and the names by which the application refers to them."
|
||||
and the names by which the application refers to them.
|
||||
Typically these file are downloaded from a data server.
|
||||
However, if the <generate_locally/> element is present,
|
||||
the file is generated on the client
|
||||
(typically by an earlier instance of the same application).
|
||||
Applications should use file locking to prevent
|
||||
two jobs from generating the file at the same time.
|
||||
"
|
||||
);
|
||||
list_item(
|
||||
"priority",
|
||||
|
|
23
lib/util.C
23
lib/util.C
|
@ -767,6 +767,29 @@ int boinc_thread_cpu_time(HANDLE thread_handle, double& cpu) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int boinc_process_cpu_time(double& cpu) {
|
||||
FILETIME creationTime, exitTime, kernelTime, userTime;
|
||||
|
||||
if (GetProcessTimes(
|
||||
GetCurrentProcess(), &creationTime, &exitTime, &kernelTime, &userTime)
|
||||
) {
|
||||
ULARGE_INTEGER tKernel, tUser;
|
||||
LONGLONG totTime;
|
||||
|
||||
tKernel.LowPart = kernelTime.dwLowDateTime;
|
||||
tKernel.HighPart = kernelTime.dwHighDateTime;
|
||||
tUser.LowPart = userTime.dwLowDateTime;
|
||||
tUser.HighPart = userTime.dwHighDateTime;
|
||||
totTime = tKernel.QuadPart + tUser.QuadPart;
|
||||
|
||||
// Runtimes in 100-nanosecond units
|
||||
cpu = totTime / 1.e7;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void get_elapsed_time(double& cpu) {
|
||||
static bool first = true;
|
||||
static DWORD first_count = 0;
|
||||
|
|
|
@ -101,6 +101,7 @@ extern char* windows_format_error_string(
|
|||
unsigned long dwError, char* pszBuf, int iSize
|
||||
);
|
||||
extern int boinc_thread_cpu_time(HANDLE thread_handle, double& cpu);
|
||||
extern int boinc_process_cpu_time(double& cpu);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue