mirror of https://github.com/BOINC/boinc.git
WRAPPER: Make creating/writing the graphics status file part of the job file configuration. No need to write it if there is not going to be a running graphics application.
This commit is contained in:
parent
106ef1e837
commit
8168008631
|
@ -98,6 +98,7 @@ int gpu_device_num = -1;
|
|||
double runtime = 0;
|
||||
// run time this session
|
||||
double trickle_period = 0;
|
||||
bool enable_graphics_support = false;
|
||||
vector<string> unzip_filenames;
|
||||
string zip_filename;
|
||||
vector<regexp*> zip_patterns;
|
||||
|
@ -520,6 +521,7 @@ int parse_job_file() {
|
|||
parse_zip_output(xp);
|
||||
continue;
|
||||
}
|
||||
if (xp.parse_bool("enable_graphics_support", enable_graphics_support)) continue;
|
||||
fprintf(stderr,
|
||||
"%s unexpected tag in job.xml: %s\n",
|
||||
boinc_msg_prefix(buf2, sizeof(buf2)), xp.parsed_tag
|
||||
|
@ -1143,11 +1145,13 @@ int main(int argc, char** argv) {
|
|||
check_trickle_period();
|
||||
}
|
||||
|
||||
boinc_write_graphics_status(
|
||||
task.starting_cpu + cpu_time,
|
||||
checkpoint_cpu_time + task.elapsed_time,
|
||||
frac_done + task.weight/total_weight
|
||||
);
|
||||
if (enable_graphics_support) {
|
||||
boinc_write_graphics_status(
|
||||
task.starting_cpu + cpu_time,
|
||||
checkpoint_cpu_time + task.elapsed_time,
|
||||
frac_done + task.weight/total_weight
|
||||
);
|
||||
}
|
||||
|
||||
boinc_sleep(POLL_PERIOD);
|
||||
if (!task.suspended) {
|
||||
|
|
Loading…
Reference in New Issue