From 527f0a4852753532eced377cdd7f4ab2436cd602 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 28 Apr 2006 17:23:00 +0000 Subject: [PATCH] allow locally-generated input files svn path=/trunk/boinc/; revision=10055 --- checkin_notes | 14 ++++++++++++++ client/app_start.C | 25 ++++++++++--------------- client/cs_apps.C | 4 ++-- client/cs_files.C | 2 +- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4eb51997cf..72805111c6 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4261,3 +4261,17 @@ David 28 Apr 2006 stats_sites.inc tools/ backend_lib.C + +David 28 Apr 2006 + - core client: if an input file has set, + don't try to download it. + This allows apps to use "initialization" files + that are large and/or computationally expensive to generate. + The app generates the file once, + and it will be available (assuming is set) + for subsequent workunits. + + client/ + app_start.C + cs_apps.C + cs_files.C diff --git a/client/app_start.C b/client/app_start.C index 3f2f95b06d..f355edb6fc 100644 --- a/client/app_start.C +++ b/client/app_start.C @@ -335,25 +335,20 @@ int ACTIVE_TASK::start(bool first_time) { return ERR_NOT_FOUND; } - // set up input files + // set up input, output files // - for (i=0; iinput_files.size(); i++) { - fref = wup->input_files[i]; - fip = fref.file_info; - get_pathname(fref.file_info, file_path); - if (first_time) { + if (first_time) { + for (i=0; iinput_files.size(); i++) { + fref = wup->input_files[i]; + fip = fref.file_info; + get_pathname(fref.file_info, file_path); retval = setup_file(wup, fip, fref, file_path, slot_dir); if (retval) return retval; } - } - - // set up output files - // - for (i=0; ioutput_files.size(); i++) { - fref = result->output_files[i]; - fip = fref.file_info; - get_pathname(fref.file_info, file_path); - if (first_time) { + for (i=0; ioutput_files.size(); i++) { + fref = result->output_files[i]; + fip = fref.file_info; + get_pathname(fref.file_info, file_path); retval = setup_file(wup, fip, fref, file_path, slot_dir); if (retval) return retval; } diff --git a/client/cs_apps.C b/client/cs_apps.C index 6846a2f25b..ab8d9f4b6a 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -188,9 +188,8 @@ bool CLIENT_STATE::handle_finished_apps() { return action; } -// Returns true if all the input files for a result are present +// Returns true iff all the input files for a result are present // (both WU and app version) -// false otherwise // bool CLIENT_STATE::input_files_available(RESULT* rp) { WORKUNIT* wup = rp->wup; @@ -215,6 +214,7 @@ bool CLIENT_STATE::input_files_available(RESULT* rp) { for (i=0; iinput_files.size(); i++) { fip = wup->input_files[i].file_info; + if (fip->generated_locally) continue; if (fip->status != FILE_PRESENT) return false; if (fip->verify_file(false)) return false; } diff --git a/client/cs_files.C b/client/cs_files.C index 58b1420aba..93bde07b06 100644 --- a/client/cs_files.C +++ b/client/cs_files.C @@ -91,7 +91,7 @@ int CLIENT_STATE::make_project_dirs() { // 2) if a needed file is already on disk (PERS_FILE_XFER::start_xfer()) // 3) in checking whether a result's input files are available // (CLIENT_STATE::input_files_available()). -// In this case "strictI is false, +// In this case "strict" is false, // and we just check existence and size (no checksum) // // If a failure occurs, set the file's "status" field.