diff --git a/checkin_notes b/checkin_notes index 6f949244a3..4bd4b70be3 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4835,6 +4835,7 @@ David 13 June 2008 David 13 June 2008 - API/runtime system: remove "fraction done update period" stuff. This was always 1 second, which is fine. + Rom: please back-port. api/ boinc_api.C @@ -4842,3 +4843,15 @@ David 13 June 2008 app_start.C lib/ app_ipc.C,h + +David 13 June 2008 + - client/API: add "computation_deadline" to APP_INIT_DATA. + This supports apps that can do variable amounts of computing; + they can boinc_finish() if their deadline is near. + Rom: please back-port. + + client/ + app_start.C + client_types.h + lib/ + app_ipc.C,h diff --git a/client/app_start.C b/client/app_start.C index ab987b00ab..fd0d9a4a42 100644 --- a/client/app_start.C +++ b/client/app_start.C @@ -186,6 +186,7 @@ int ACTIVE_TASK::write_app_init_file() { aid.rsc_fpops_bound = wup->rsc_fpops_bound; aid.rsc_memory_bound = wup->rsc_memory_bound; aid.rsc_disk_bound = wup->rsc_disk_bound; + aid.computation_deadline = result->computation_deadline(); aid.checkpoint_period = gstate.global_prefs.disk_interval; aid.fraction_done_start = 0; aid.fraction_done_end = 1; diff --git a/client/client_types.h b/client/client_types.h index aa8cd88554..e046b278ae 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -590,8 +590,7 @@ struct RESULT { // used to keep cpu scheduler from scheduling a result twice // transient; used only within schedule_cpus() double computation_deadline(); - // used by the CPU scheduler to determine if there is a cause for - // a pre-emption of running results. + // report deadline - prefs.work_buf_min - time slice bool rr_sim_misses_deadline; bool last_rr_sim_missed_deadline; diff --git a/lib/app_ipc.C b/lib/app_ipc.C index 1cf065599f..89c012147e 100644 --- a/lib/app_ipc.C +++ b/lib/app_ipc.C @@ -142,7 +142,8 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) { "%f\n" "%f\n" "%f\n" - "%f\n", + "%f\n" + "%f\n", ai.slot, ai.wu_cpu_time, ai.user_total_credit, @@ -156,7 +157,8 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) { ai.rsc_fpops_est, ai.rsc_fpops_bound, ai.rsc_memory_bound, - ai.rsc_disk_bound + ai.rsc_disk_bound, + ai.computation_deadline ); MIOFILE mf; mf.init_file(f); @@ -242,6 +244,7 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) { if (xp.parse_double(tag, "rsc_fpops_bound", ai.rsc_fpops_bound)) continue; if (xp.parse_double(tag, "rsc_memory_bound", ai.rsc_memory_bound)) continue; if (xp.parse_double(tag, "rsc_disk_bound", ai.rsc_disk_bound)) continue; + if (xp.parse_double(tag, "computation_deadline", ai.computation_deadline)) 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_start", ai.fraction_done_start)) continue; diff --git a/lib/app_ipc.h b/lib/app_ipc.h index d4ff15c36e..d477112a38 100644 --- a/lib/app_ipc.h +++ b/lib/app_ipc.h @@ -178,6 +178,7 @@ struct APP_INIT_DATA { double rsc_fpops_bound; double rsc_memory_bound; double rsc_disk_bound; + double computation_deadline; // the following are used for compound apps, // where each stage of the computation is a fixed fraction of the total.