mirror of https://github.com/BOINC/boinc.git
- 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. svn path=/trunk/boinc/; revision=15395
This commit is contained in:
parent
3eaff2b345
commit
77c7ff3649
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -142,7 +142,8 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
"<rsc_fpops_est>%f</rsc_fpops_est>\n"
|
||||
"<rsc_fpops_bound>%f</rsc_fpops_bound>\n"
|
||||
"<rsc_memory_bound>%f</rsc_memory_bound>\n"
|
||||
"<rsc_disk_bound>%f</rsc_disk_bound>\n",
|
||||
"<rsc_disk_bound>%f</rsc_disk_bound>\n"
|
||||
"<computation_deadline>%f</computation_deadline>\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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue