*** empty log message ***

svn path=/trunk/boinc/; revision=11329
This commit is contained in:
David Anderson 2006-10-20 20:21:33 +00:00
parent 9bfd3e72fa
commit fc17c0202b
4 changed files with 34 additions and 4 deletions

View File

@ -11287,3 +11287,20 @@ David 20 Oct 2006
gui_rpc_server.C
lib/
filesys.C
David 20 Oct 2006
- Output files can be tagged as "optional".
If the application doesn't generate an optional output file,
the client treats it as normal
(i.e. doesn't flag it as an error)
NOTES:
1) to make an output file optional,
put <optional/> in its <file_ref>
element in the result template file
2) clients earlier than 5.8 don't recognize this attribute;
they will mark results as "compute error" if
any of their output files are missing
client/
client_types.C,h
cs_apps.C

View File

@ -1165,13 +1165,15 @@ int FILE_REF::parse(MIOFILE& in) {
fd = -1;
main_program = false;
copy_file = false;
optional = false;
while (in.fgets(buf, 256)) {
if (match_tag(buf, "</file_ref>")) return 0;
else if (parse_str(buf, "<file_name>", file_name, sizeof(file_name))) continue;
else if (parse_str(buf, "<open_name>", open_name, sizeof(open_name))) continue;
else if (parse_int(buf, "<fd>", fd)) continue;
else if (match_tag(buf, "<main_program/>")) main_program = true;
else if (match_tag(buf, "<copy_file/>")) copy_file = true;
else if (parse_bool(buf, "main_program", main_program)) continue;
else if (parse_bool(buf, "copy_file", copy_file)) continue;
else if (parse_bool(buf, "optional", optional)) continue;
else {
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_ERROR,
@ -1202,6 +1204,9 @@ int FILE_REF::write(MIOFILE& out) {
if (copy_file) {
out.printf(" <copy_file/>\n");
}
if (optional) {
out.printf(" <optional/>\n");
}
out.printf(" </file_ref>\n");
return 0;
}

View File

@ -126,7 +126,9 @@ struct FILE_REF {
bool main_program;
FILE_INFO* file_info;
bool copy_file; // if true, core client will copy the file instead of linking
bool optional;
// for output files: app may not generate file;
// don't treat as error if file is missing.
int parse(MIOFILE&);
int write(MIOFILE&);
};

View File

@ -65,11 +65,17 @@ int CLIENT_STATE::app_finished(ACTIVE_TASK& at) {
if (rp->exit_status != ERR_ABORTED_VIA_GUI) {
for (i=0; i<rp->output_files.size(); i++) {
fip = rp->output_files[i].file_info;
FILE_REF& fref = rp->output_files[i];
fip = fref.file_info;
if (fip->uploaded) continue;
get_pathname(fip, path);
retval = file_size(path, size);
if (retval) {
if (fref.optional) {
fip->upload_when_present = false;
continue;
}
// an output file is unexpectedly absent.
//
fip->status = retval;