mirror of https://github.com/BOINC/boinc.git
- client: don't print error message if output file with <copy_file>
attribute is missing. That's the app's problem, not BOINC's - sample assimilator: if a canonical instance has no output files, rather than quitting create a file named WU_NAME_no_output_files svn path=/trunk/boinc/; revision=19082
This commit is contained in:
parent
ba23e2fa83
commit
76583d54d9
|
@ -7801,3 +7801,14 @@ David 17 Sept 2009
|
|||
generate_svn_version.sh
|
||||
sched/
|
||||
(most).cpp
|
||||
|
||||
David 17 Sept 2009
|
||||
- client: don't print error message if output file with <copy_file>
|
||||
attribute is missing. That's the app's problem, not BOINC's
|
||||
- sample assimilator: if a canonical instance has no output files,
|
||||
rather than quitting create a file named WU_NAME_no_output_files
|
||||
|
||||
client/
|
||||
app_start.cpp
|
||||
sched/
|
||||
sample_assimilator.cpp
|
||||
|
|
|
@ -339,12 +339,18 @@ int ACTIVE_TASK::copy_output_files() {
|
|||
sprintf(slotfile, "%s/%s", slot_dir, fref.open_name);
|
||||
get_pathname(fip, projfile, sizeof(projfile));
|
||||
int retval = boinc_rename(slotfile, projfile);
|
||||
#if 0
|
||||
// this isn't a BOINC error.
|
||||
// it just means the app didn't create an output file
|
||||
// that it was supposed to.
|
||||
//
|
||||
if (retval) {
|
||||
msg_printf(wup->project, MSG_INTERNAL_ERROR,
|
||||
"Can't rename output file %s to %s: %s",
|
||||
fip->name, projfile, boincerror(retval)
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ int assimilate_handler(
|
|||
const char *copy_path;
|
||||
get_output_file_infos(canonical_result, output_files);
|
||||
unsigned int n = output_files.size();
|
||||
bool file_copied = false;
|
||||
for (i=0; i<n; i++) {
|
||||
FILE_INFO& fi = output_files[i];
|
||||
if (n==1) {
|
||||
|
@ -67,12 +68,17 @@ int assimilate_handler(
|
|||
copy_path = config.project_path("sample_results/%s_%d", wu.name, i);
|
||||
}
|
||||
retval = boinc_copy(fi.path.c_str() , copy_path);
|
||||
if (retval && !fi.optional) {
|
||||
sprintf(buf, "couldn't copy file %s\n", fi.path.c_str());
|
||||
write_error(buf);
|
||||
return retval;
|
||||
if (!retval) {
|
||||
file_copied = true;
|
||||
}
|
||||
}
|
||||
if (!file_copied) {
|
||||
copy_path = config.project_path(
|
||||
"sample_results/%s_%s", wu.name, "no_output_files"
|
||||
);
|
||||
FILE* f = fopen(copy_path, "w");
|
||||
fclose(f);
|
||||
}
|
||||
} else {
|
||||
sprintf(buf, "%s: 0x%x\n", wu.name, wu.error_mask);
|
||||
return write_error(buf);
|
||||
|
|
Loading…
Reference in New Issue