diff --git a/checkin_notes b/checkin_notes index 6cde45b12c..85d8ce780c 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6301,3 +6301,16 @@ David 19 June 2006 client/ client_state.C,h cpu_sched.C + +David 19 June 2006 + - core client: remove CLIENT_STATE::handle_file_xfer_apps(). + Instead, handle this in CLIENT_STATE::update_results(). + - core client: rename RESULT::reset_files() to clear_uploaded_flags() + + client/ + client_state.C,h + client_types.C,h + cpu_sched.C + cs_apps.C + sched/ + update_stats.C diff --git a/client/client_state.C b/client/client_state.C index 80c84761c2..e1965e235d 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -1028,7 +1028,16 @@ bool CLIENT_STATE::update_results() { case RESULT_FILES_DOWNLOADING: if (input_files_available(rp)) { rp->state = RESULT_FILES_DOWNLOADED; - request_schedule_cpus("files downloaded"); + if (rp->wup->avp->app_files.size()==0) { + // if this is a file-transfer app, start the upload phase + // + rp->state = RESULT_FILES_UPLOADING; + rp->clear_uploaded_flags(); + } else { + // else try to start the computation + // + request_schedule_cpus("files downloaded"); + } action = true; } break; diff --git a/client/client_state.h b/client/client_state.h index e871fbf844..f71c243d62 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -324,7 +324,6 @@ private: int app_finished(ACTIVE_TASK&); bool start_apps(); bool handle_finished_apps(); - void handle_file_xfer_apps(); public: int schedule_result(RESULT*); diff --git a/client/client_types.C b/client/client_types.C index 0fca3d39fb..35825c3b9c 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -1489,9 +1489,8 @@ bool RESULT::is_upload_done() { // resets all FILE_INFO's in result to uploaded = false // if upload_when_present is true. -// Also updates the last time the input files were used - -void RESULT::reset_files() { +// +void RESULT::clear_uploaded_flags() { unsigned int i; FILE_INFO* fip; @@ -1500,15 +1499,6 @@ void RESULT::reset_files() { if (fip->upload_when_present) { fip->uploaded = false; } -#if 0 - fip->update_time(); -#endif - } - for (i=0; i < wup->input_files.size(); i++) { - fip = wup->input_files[i].file_info; -#if 0 - fip->update_time(); -#endif } } diff --git a/client/client_types.h b/client/client_types.h index 89b47bd804..90b5327c26 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -445,7 +445,7 @@ struct RESULT { int write(MIOFILE&, bool to_server); int write_gui(MIOFILE&); bool is_upload_done(); // files uploaded? - void reset_files(); + void clear_uploaded_flags(); FILE_REF* lookup_file(FILE_INFO*); FILE_INFO* lookup_file_logical(const char*); void abort_inactive(int); diff --git a/client/cpu_sched.C b/client/cpu_sched.C index 143a8d2e80..e97e014a56 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -404,14 +404,6 @@ void CLIENT_STATE::schedule_cpus() { } } - // mark file xfer results as completed; - // TODO: why do this here?? - // - // Dr. A. This has been here quite a while. - // Either we should remove the comment or we should move the code. jm7 - // - handle_file_xfer_apps(); - // set temporary variables // for (i=0; iwup->avp->app_files.size() == 0 && rp->state == RESULT_FILES_DOWNLOADED) { - rp->state = RESULT_FILES_UPLOADING; - rp->reset_files(); - } - } -} - void CLIENT_STATE::request_enforce_schedule(const char* where) { // The CPU scheduler runs when a result is completed, // when the end of the user-specified scheduling period is reached, diff --git a/sched/update_stats.C b/sched/update_stats.C index 2f6ababa61..139d5820ee 100644 --- a/sched/update_stats.C +++ b/sched/update_stats.C @@ -221,6 +221,7 @@ int main(int argc, char** argv) { } } + log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL, "Finished\n"); return 0; }