- API/runtime system: remove "fraction done update period" stuff.

This was always 1 second, which is fine.


svn path=/trunk/boinc/; revision=15394
This commit is contained in:
David Anderson 2008-06-12 18:35:19 +00:00
parent a1db66c12b
commit 3eaff2b345
5 changed files with 22 additions and 23 deletions

View File

@ -91,7 +91,6 @@ static FILE_LOCK file_lock;
APP_CLIENT_SHM* app_client_shm = 0;
static volatile int time_until_checkpoint;
// time until enable checkpoint
static volatile int time_until_fraction_done_update;
// time until report fraction done to core client
static volatile double fraction_done;
static volatile double last_checkpoint_cpu_time;
@ -376,7 +375,6 @@ int boinc_init_options_general(BOINC_OPTIONS& opt) {
fraction_done = -1;
time_until_checkpoint = (int)aid.checkpoint_period;
last_checkpoint_cpu_time = aid.wu_cpu_time;
time_until_fraction_done_update = (int)aid.fraction_done_update_period;
last_wu_cpu_time = aid.wu_cpu_time;
if (standalone) {
@ -514,7 +512,6 @@ int boinc_parse_init_data_file() {
aid.host_total_credit = 0;
aid.host_expavg_credit = 0;
aid.checkpoint_period = DEFAULT_CHECKPOINT_PERIOD;
aid.fraction_done_update_period = DEFAULT_FRACTION_DONE_UPDATE_PERIOD;
if (!boinc_file_exists(INIT_DATA_FILE)) {
fprintf(stderr,
@ -598,13 +595,14 @@ int resume_activities() {
#endif
return 0;
}
int restore_activities() {
int retval;
if (boinc_status.suspended) {
retval = suspend_activities();
} else {
retval = resume_activities();
}
retval = suspend_activities();
} else {
retval = resume_activities();
}
return retval;
}
@ -883,18 +881,14 @@ static void timer_handler() {
// don't bother reporting CPU time etc. if we're suspended
//
if (options.send_status_msgs && !boinc_status.suspended) {
time_until_fraction_done_update -= 1;
if (time_until_fraction_done_update <= 0) {
double cur_cpu;
cur_cpu = boinc_worker_thread_cpu_time();
last_wu_cpu_time = cur_cpu + initial_wu_cpu_time;
update_app_progress(last_wu_cpu_time, last_checkpoint_cpu_time);
time_until_fraction_done_update = (int)aid.fraction_done_update_period;
}
double cur_cpu = boinc_worker_thread_cpu_time();
last_wu_cpu_time = cur_cpu + initial_wu_cpu_time;
update_app_progress(last_wu_cpu_time, last_checkpoint_cpu_time);
}
// If running under V5 client, notify the client if the graphics app
// exits (e.g., if user clicked in the graphics window's close box.)
// If running under V5 client, notify the client if the graphics app exits
// (e.g., if user clicked in the graphics window's close box.)
//
if (ga_win.pid) {
if (! ga_win.is_running()) {
app_client_shm->shm->graphics_reply.send_msg(

View File

@ -4831,3 +4831,14 @@ David 13 June 2008
html/user/
create_profile.php
David 13 June 2008
- API/runtime system: remove "fraction done update period" stuff.
This was always 1 second, which is fine.
api/
boinc_api.C
client/
app_start.C
lib/
app_ipc.C,h

View File

@ -187,7 +187,6 @@ int ACTIVE_TASK::write_app_init_file() {
aid.rsc_memory_bound = wup->rsc_memory_bound;
aid.rsc_disk_bound = wup->rsc_disk_bound;
aid.checkpoint_period = gstate.global_prefs.disk_interval;
aid.fraction_done_update_period = DEFAULT_FRACTION_DONE_UPDATE_PERIOD;
aid.fraction_done_start = 0;
aid.fraction_done_end = 1;
#ifdef _WIN32

View File

@ -137,7 +137,6 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
"<host_expavg_credit>%f</host_expavg_credit>\n"
"<resource_share_fraction>%f</resource_share_fraction>\n"
"<checkpoint_period>%f</checkpoint_period>\n"
"<fraction_done_update_period>%f</fraction_done_update_period>\n"
"<fraction_done_start>%f</fraction_done_start>\n"
"<fraction_done_end>%f</fraction_done_end>\n"
"<rsc_fpops_est>%f</rsc_fpops_est>\n"
@ -152,7 +151,6 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
ai.host_expavg_credit,
ai.resource_share_fraction,
ai.checkpoint_period,
ai.fraction_done_update_period,
ai.fraction_done_start,
ai.fraction_done_end,
ai.rsc_fpops_est,
@ -246,7 +244,6 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
if (xp.parse_double(tag, "rsc_disk_bound", ai.rsc_disk_bound)) continue;
if (xp.parse_double(tag, "wu_cpu_time", ai.wu_cpu_time)) continue;
if (xp.parse_double(tag, "checkpoint_period", ai.checkpoint_period)) continue;
if (xp.parse_double(tag, "fraction_done_update_period", ai.fraction_done_update_period)) continue;
if (xp.parse_double(tag, "fraction_done_start", ai.fraction_done_start)) continue;
if (xp.parse_double(tag, "fraction_done_end", ai.fraction_done_end)) continue;
xp.skip_unexpected(tag, true, "parse_init_data_file");

View File

@ -113,7 +113,6 @@ struct MSG_QUEUE {
bool timeout(double);
};
#define DEFAULT_FRACTION_DONE_UPDATE_PERIOD 1
#define DEFAULT_CHECKPOINT_PERIOD 300
#define SHM_PREFIX "shm_"
@ -191,7 +190,6 @@ struct APP_INIT_DATA {
double checkpoint_period; // recommended checkpoint period
SHMEM_SEG_NAME shmem_seg_name;
double wu_cpu_time; // cpu time from previous episodes
double fraction_done_update_period;
APP_INIT_DATA();
APP_INIT_DATA(const APP_INIT_DATA&); // copy constructor