Skip to content

Commit

Permalink
- Manager: show elapsed time instead of CPU time in Task tab.
Browse files Browse the repository at this point in the history
    CPU time is visible in task Properties.
- Manager: in task Properties, show final CPU and elapsed times
    if job is finished
- client: honor backoff for account-manager-requested scheduler RPCs
- client: keep track final elapsed time for results
- GUI RPC: report final elapsed time

svn path=/trunk/boinc/; revision=17588
  • Loading branch information
davidpanderson committed Mar 11, 2009
1 parent ded5516 commit dfc62d8
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 25 deletions.
20 changes: 20 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -2974,3 +2974,23 @@ David 9 Mar 2009
client_state.cpp
cs_scheduler.cpp
scheduler_op.cpp

David 11 Mar 2009
- Manager: show elapsed time instead of CPU time in Task tab.
CPU time is visible in task Properties.
- Manager: in task Properties, show final CPU and elapsed times
if job is finished
- client: honor backoff for account-manager-requested scheduler RPCs
- client: keep track final elapsed time for results
- GUI RPC: report final elapsed time

client/
app_control.cpp
client_types.cpp,h
cs_scheduler.cpp
clientgui/
DlgItemProperties.cpp
ViewWork.cpp
lib/
gui_rpc_client.h
gui_rpc_client_ops.cpp
1 change: 1 addition & 0 deletions client/app_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ void ACTIVE_TASK::handle_exited_app(int stat) {
get_app_status_msg();
get_trickle_up_msg();
result->final_cpu_time = current_cpu_time;
result->final_elapsed_time = elapsed_time;
if (task_state() == PROCESS_ABORT_PENDING) {
set_task_state(PROCESS_ABORTED, "handle_exited_app");
} else {
Expand Down
10 changes: 8 additions & 2 deletions client/client_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,7 @@ void RESULT::clear() {
completed_time = 0;
got_server_ack = false;
final_cpu_time = 0;
final_elapsed_time = 0;
exit_status = 0;
stderr_out = "";
suspended_via_gui = false;
Expand Down Expand Up @@ -1556,6 +1557,7 @@ int RESULT::parse_state(MIOFILE& in) {
continue;
}
if (parse_double(buf, "<final_cpu_time>", final_cpu_time)) continue;
if (parse_double(buf, "<final_elapsed_time>", final_elapsed_time)) continue;
if (parse_int(buf, "<exit_status>", exit_status)) continue;
if (parse_bool(buf, "got_server_ack", got_server_ack)) continue;
if (parse_bool(buf, "ready_to_report", ready_to_report)) continue;
Expand Down Expand Up @@ -1596,12 +1598,14 @@ int RESULT::write(MIOFILE& out, bool to_server) {
"<result>\n"
" <name>%s</name>\n"
" <final_cpu_time>%f</final_cpu_time>\n"
" <final_elapsed_time>%f</final_elapsed_time>\n"
" <exit_status>%d</exit_status>\n"
" <state>%d</state>\n"
" <platform>%s</platform>\n"
" <version_num>%d</version_num>\n",
name,
final_cpu_time,
final_elapsed_time,
exit_status,
state(),
platform,
Expand Down Expand Up @@ -1690,6 +1694,7 @@ int RESULT::write_gui(MIOFILE& out) {
" <plan_class>%s</plan_class>\n"
" <project_url>%s</project_url>\n"
" <final_cpu_time>%f</final_cpu_time>\n"
" <final_elapsed_time>%f</final_elapsed_time>\n"
" <exit_status>%d</exit_status>\n"
" <state>%d</state>\n"
" <report_deadline>%f</report_deadline>\n"
Expand All @@ -1700,6 +1705,7 @@ int RESULT::write_gui(MIOFILE& out) {
plan_class,
project->master_url,
final_cpu_time,
final_elapsed_time,
exit_status,
state(),
report_deadline,
Expand Down Expand Up @@ -1825,9 +1831,9 @@ void RESULT::append_log_record() {
job_log_filename(*project, filename, sizeof(filename));
FILE* f = fopen(filename, "ab");
if (!f) return;
fprintf(f, "%f ue %f ct %f fe %f nm %s\n",
fprintf(f, "%f ue %f ct %f fe %f nm %s et %f\n",
gstate.now, estimated_duration_uncorrected(), final_cpu_time,
wup->rsc_fpops_est, name
wup->rsc_fpops_est, name, final_elapsed_time
);
fclose(f);
}
Expand Down
1 change: 1 addition & 0 deletions client/client_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ struct RESULT {
/// we're received the ack for this result from the server
bool got_server_ack;
double final_cpu_time;
double final_elapsed_time;

// the following are nonzero if reported by app
double fpops_per_cpu_sec;
Expand Down
1 change: 0 additions & 1 deletion client/cs_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ PROJECT* CLIENT_STATE::next_project_sched_rpc_pending() {
break;
case RPC_REASON_ACCT_MGR_REQ:
// This is critical for acct mgrs, to propagate new host CPIDs
honor_backoff = false;
honor_suspend = false;
break;
case RPC_REASON_INIT:
Expand Down
5 changes: 4 additions & 1 deletion clientgui/DlgItemProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ void CDlgItemProperties::renderInfos(RESULT* result) {
addProperty(_("Fraction done"), wxString::Format(wxT("%.3f %%"), result->fraction_done*100));
addProperty(_("Virtual memory size"), FormatDiskSpace(result->swap_size));
addProperty(_("Working set size"), FormatDiskSpace(result->working_set_size_smoothed));
}
} else if (result->state >= RESULT_COMPUTE_ERROR) {
addProperty(_("CPU time"), FormatTime(result->final_cpu_time));
addProperty(_("Elapsed time"), FormatTime(result->final_elapsed_time));
}
m_gbSizer->Layout();
m_scrolledWindow->FitInside();
}
Expand Down
8 changes: 5 additions & 3 deletions clientgui/ViewWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ CViewWork::CViewWork(wxNotebook* pNotebook) :
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125);
m_pListPane->InsertColumn(COLUMN_APPLICATION, _("Application"), wxLIST_FORMAT_LEFT, 95);
m_pListPane->InsertColumn(COLUMN_NAME, _("Name"), wxLIST_FORMAT_LEFT, 285);
m_pListPane->InsertColumn(COLUMN_CPUTIME, _("CPU time"), wxLIST_FORMAT_RIGHT, 80);
m_pListPane->InsertColumn(COLUMN_CPUTIME, _("Elapsed time"), wxLIST_FORMAT_RIGHT, 80);
m_pListPane->InsertColumn(COLUMN_PROGRESS, _("Progress"), wxLIST_FORMAT_RIGHT, 60);
m_pListPane->InsertColumn(COLUMN_TOCOMPLETION, _("To completion"), wxLIST_FORMAT_RIGHT, 100);
m_pListPane->InsertColumn(COLUMN_REPORTDEADLINE, _("Report deadline"), wxLIST_FORMAT_LEFT, 150);
Expand Down Expand Up @@ -868,12 +868,14 @@ void CViewWork::GetDocCPUTime(wxInt32 item, float& fBuffer) const {
fBuffer = 0;
if (result) {
if (result->active_task) {
fBuffer = result->current_cpu_time;
fBuffer = result->elapsed_time;
if (!fBuffer) fBuffer = result->current_cpu_time;
} else {
if(result->state < RESULT_COMPUTE_ERROR) {
fBuffer = 0;
} else {
fBuffer = result->final_cpu_time;
fBuffer = result->final_elapsed_time;
if (!fBuffer) fBuffer = result->final_cpu_time;
}
}
}
Expand Down
13 changes: 12 additions & 1 deletion doc/addon_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
// 7 unix date

$win = array(
array(
'http://www.bc-team.org/downloads.php?view=detail&df_id=3',
'BOINCcalculator',
'0.2.0',
'Show details of CPDN jobs',
'http://wiki.bc-team.org/index.php?title=BOINCcalculator',
'Windows (all)',
'BOINCcalculator shows details of running CPDN jobs: trickles, credits, timesteps, and checkpoints.',
1236727395
),
array(
'http://efmer.eu/boinc/',
'TThrottle',
Expand Down Expand Up @@ -82,7 +92,8 @@
'BoincView',
'1.2.5',
'Advanced BOINC manager for networks',
'http://boincview.amanheis.de',
//'http://boincview.amanheis.de',
'',
'',
'BoincView can monitor and control all your BOINC clients throughout your network. Every client can be managed via the client\'s remote control feature.',
1149517167
Expand Down
11 changes: 11 additions & 0 deletions doc/boinc_news.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?

$project_news = array(
array("March 9, 2009",
"A new add-on for Windows,
<a href=\"http://boinc.berkeley.edu/addon_item.php?platform=win&item=http%3A%2F%2Fwww.bc-team.org%2Fdownloads.php%3Fview%3Ddetail%26df_id%3D3\">BOINCcalculator</a>, shows details (trickles, credit, timesteps, checkpoints) of running CPDN jobs."
),
array("March 9, 2009",
"<a href=http://www.cosmologyathome.org/>Cosmology@Home</a>,
a project from the University of Illinois whose goal is to search
for the model that best describes our Universe,
is now listed on the <a href=http://boinc.berkeley.edu/choose_projects.php>Choose
Projects</a> page."
),
array("March 5, 2009",
"BOINC was the subject of a 40-minute radio program (in Polish)
on <a href=http://www.tok.fm/TOKFM/0,89523.html>Tok FM</a>
Expand Down
8 changes: 8 additions & 0 deletions doc/projects.inc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ $earth = array(
$astro_phys_chem = array(
"Astronomy/Physics/Chemistry",
array(
array(
"Cosmology@Home",
"http://www.cosmologyathome.org/",
"University of Illinois at Urbana-Chamapign",
"Astronomy",
"The goal of Cosmology@Home is to search for the model that best describes our Universe and to find the range of models that agree with the available astronomical particle physics data.",
"cosmo.jpg"
),
array(
"Milkyway@home",
"http://milkyway.cs.rpi.edu/milkyway/",
Expand Down
2 changes: 2 additions & 0 deletions lib/gui_rpc_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ class RESULT {
bool ready_to_report;
bool got_server_ack;
double final_cpu_time;
double final_elapsed_time;
int state;
int scheduler_state;
int exit_status;
Expand All @@ -228,6 +229,7 @@ class RESULT {
double swap_size;
double working_set_size_smoothed;
double estimated_cpu_time_remaining;
// actually, estimated elapsed time remaining
bool supports_graphics;
int graphics_mode_acked;
bool too_large;
Expand Down
36 changes: 19 additions & 17 deletions lib/gui_rpc_client_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void PROJECT_LIST_ENTRY::clear() {
platforms.clear();
home.clear();
image.clear();
rand = 0.0;
rand = 0;
}

bool PROJECT_LIST_ENTRY::operator<(const PROJECT_LIST_ENTRY& compare) {
Expand Down Expand Up @@ -234,15 +234,15 @@ int PROJECT::parse(MIOFILE& in) {

void PROJECT::clear() {
master_url.clear();
resource_share = 0.0;
resource_share = 0;
project_name.clear();
user_name.clear();
team_name.clear();
user_total_credit = 0.0;
user_expavg_credit = 0.0;
host_total_credit = 0.0;
host_expavg_credit = 0.0;
disk_usage = 0.0;
user_total_credit = 0;
user_expavg_credit = 0;
host_total_credit = 0;
host_expavg_credit = 0;
disk_usage = 0;
nrpc_failures = 0;
master_fetch_failures = 0;
min_rpc_time = 0;
Expand Down Expand Up @@ -382,6 +382,7 @@ int RESULT::parse(MIOFILE& in) {
if (parse_bool(buf, "supports_graphics", supports_graphics)) continue;
if (parse_int(buf, "<graphics_mode_acked>", graphics_mode_acked)) continue;
if (parse_double(buf, "<final_cpu_time>", final_cpu_time)) continue;
if (parse_double(buf, "<final_elapsed_time>", final_elapsed_time)) continue;
if (parse_int(buf, "<state>", state)) continue;
if (parse_int(buf, "<scheduler_state>", scheduler_state)) continue;
if (parse_int(buf, "<exit_status>", exit_status)) continue;
Expand Down Expand Up @@ -420,7 +421,8 @@ void RESULT::clear() {
report_deadline = 0;
ready_to_report = false;
got_server_ack = false;
final_cpu_time = 0.0;
final_cpu_time = 0;
final_elapsed_time = 0;
state = 0;
scheduler_state = 0;
exit_status = 0;
Expand All @@ -432,13 +434,13 @@ void RESULT::clear() {
active_task = false;
active_task_state = 0;
app_version_num = 0;
checkpoint_cpu_time = 0.0;
current_cpu_time = 0.0;
fraction_done = 0.0;
checkpoint_cpu_time = 0;
current_cpu_time = 0;
fraction_done = 0;
elapsed_time = -1;
swap_size = 0;
working_set_size_smoothed = 0;
estimated_cpu_time_remaining = 0.0;
estimated_cpu_time_remaining = 0;
supports_graphics = false;
graphics_mode_acked = 0;
too_large = false;
Expand Down Expand Up @@ -496,7 +498,7 @@ void FILE_TRANSFER::clear() {
name.clear();
project_url.clear();
project_name.clear();
nbytes = 0.0;
nbytes = 0;
generated_locally = false;
uploaded = false;
upload_when_present = false;
Expand All @@ -507,10 +509,10 @@ void FILE_TRANSFER::clear() {
first_request_time = 0;
next_request_time = 0;
status = 0;
time_so_far = 0.0;
bytes_xferred = 0.0;
file_offset = 0.0;
xfer_speed = 0.0;
time_so_far = 0;
bytes_xferred = 0;
file_offset = 0;
xfer_speed = 0;
hostname.clear();
project = NULL;
}
Expand Down

0 comments on commit dfc62d8

Please sign in to comment.