mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11329
This commit is contained in:
parent
9bfd3e72fa
commit
fc17c0202b
|
@ -11287,3 +11287,20 @@ David 20 Oct 2006
|
||||||
gui_rpc_server.C
|
gui_rpc_server.C
|
||||||
lib/
|
lib/
|
||||||
filesys.C
|
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
|
||||||
|
|
|
@ -1165,13 +1165,15 @@ int FILE_REF::parse(MIOFILE& in) {
|
||||||
fd = -1;
|
fd = -1;
|
||||||
main_program = false;
|
main_program = false;
|
||||||
copy_file = false;
|
copy_file = false;
|
||||||
|
optional = false;
|
||||||
while (in.fgets(buf, 256)) {
|
while (in.fgets(buf, 256)) {
|
||||||
if (match_tag(buf, "</file_ref>")) return 0;
|
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, "<file_name>", file_name, sizeof(file_name))) continue;
|
||||||
else if (parse_str(buf, "<open_name>", open_name, sizeof(open_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 (parse_int(buf, "<fd>", fd)) continue;
|
||||||
else if (match_tag(buf, "<main_program/>")) main_program = true;
|
else if (parse_bool(buf, "main_program", main_program)) continue;
|
||||||
else if (match_tag(buf, "<copy_file/>")) copy_file = true;
|
else if (parse_bool(buf, "copy_file", copy_file)) continue;
|
||||||
|
else if (parse_bool(buf, "optional", optional)) continue;
|
||||||
else {
|
else {
|
||||||
if (log_flags.unparsed_xml) {
|
if (log_flags.unparsed_xml) {
|
||||||
msg_printf(0, MSG_ERROR,
|
msg_printf(0, MSG_ERROR,
|
||||||
|
@ -1202,6 +1204,9 @@ int FILE_REF::write(MIOFILE& out) {
|
||||||
if (copy_file) {
|
if (copy_file) {
|
||||||
out.printf(" <copy_file/>\n");
|
out.printf(" <copy_file/>\n");
|
||||||
}
|
}
|
||||||
|
if (optional) {
|
||||||
|
out.printf(" <optional/>\n");
|
||||||
|
}
|
||||||
out.printf(" </file_ref>\n");
|
out.printf(" </file_ref>\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,9 @@ struct FILE_REF {
|
||||||
bool main_program;
|
bool main_program;
|
||||||
FILE_INFO* file_info;
|
FILE_INFO* file_info;
|
||||||
bool copy_file; // if true, core client will copy the file instead of linking
|
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 parse(MIOFILE&);
|
||||||
int write(MIOFILE&);
|
int write(MIOFILE&);
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,11 +65,17 @@ int CLIENT_STATE::app_finished(ACTIVE_TASK& at) {
|
||||||
|
|
||||||
if (rp->exit_status != ERR_ABORTED_VIA_GUI) {
|
if (rp->exit_status != ERR_ABORTED_VIA_GUI) {
|
||||||
for (i=0; i<rp->output_files.size(); i++) {
|
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;
|
if (fip->uploaded) continue;
|
||||||
get_pathname(fip, path);
|
get_pathname(fip, path);
|
||||||
retval = file_size(path, size);
|
retval = file_size(path, size);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
|
if (fref.optional) {
|
||||||
|
fip->upload_when_present = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// an output file is unexpectedly absent.
|
// an output file is unexpectedly absent.
|
||||||
//
|
//
|
||||||
fip->status = retval;
|
fip->status = retval;
|
||||||
|
|
Loading…
Reference in New Issue