diff --git a/checkin_notes b/checkin_notes index e58e7160ef..bc93a7cf0b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -60,3 +60,17 @@ Rom 4 Jan 2010 MainDocument.cpp lib/ gui_rpc_client_ops.cpp + +Bernd 5 Jan 2010 + a couple of locality scheduling fixes: + - remove obsolete and buggy code from transitioner (create_result() in backend_lib) + - account for 'mixed' scheduling in explain_to_user() in sched_send.cpp + - finish transition to configurable patterns for distinguishing files reported by the client + in the Einstein@home-specific part of send_work_locality in sched_locality + (removed previous hardcoded strcmps) + + tools/ + backend_lib.cpp + sched/ + sched_send.cpp + sched_locality.cpp diff --git a/sched/sched_locality.cpp b/sched/sched_locality.cpp index 5cd5bdbc2a..ccb5ca86b0 100644 --- a/sched/sched_locality.cpp +++ b/sched/sched_locality.cpp @@ -1019,7 +1019,6 @@ bool is_sticky_file(char*fname) { return false; } - bool is_workunit_file(char*fname) { for (unsigned int i=0; isize(); i++) { if (!regexec(&((*config.locality_scheduling_workunit_file)[i]), fname, 0, NULL, 0)) { @@ -1044,44 +1043,12 @@ void send_work_locality() { for (i=0; i 10 || - ( - strncmp("H1_", fname, 3) && - strncmp("h1_", fname, 3) && - strncmp("w1_", fname, 3) && - strncmp("W1_", fname, 3) && - strncmp("l1_", fname, 3) && - strncmp("L1_", fname, 3) - ); -#if 0 - // here, put a list of patterns of ALL files that are still needed to be - // sticky, but are not 'data' files for locality scheduling purposes, eg they - // do not have associated WU with names FILENAME__* - // - bool data_files = - strncmp("grid_", fname, 5) - && strncmp("skygrid_", fname, 8) - && strncmp("Config_", fname, 7); - if (strlen(fname)==15 && !strncmp("l1_", fname, 3)) { - data_files = false; - } -#endif - - if (is_workunit_file(fname)) { - // these files WILL be deleted from the host + // these are files that we will use for locality scheduling and + // to search for work // - g_request->files_not_needed.push_back(eah_copy[i]); - if (config.debug_locality) { - log_messages.printf(MSG_NORMAL, - "[locality] [HOST#%d] adding file %s to files_not_needed list\n", - g_reply->host.id, fname - ); - } - } else if (is_sticky_file(fname)) { + g_request->file_infos.push_back(eah_copy[i]); + } else if (is_sticky_file(fname)) { // was if(!data_files) // these files MIGHT be deleted from host if we need to make // disk space there // @@ -1093,10 +1060,15 @@ void send_work_locality() { ); } } else { - // these are files that we will use for locality scheduling and - // to search for work + // these files WILL be deleted from the host // - g_request->file_infos.push_back(eah_copy[i]); + g_request->files_not_needed.push_back(eah_copy[i]); + if (config.debug_locality) { + log_messages.printf(MSG_NORMAL, + "[locality] [HOST#%d] adding file %s to files_not_needed list\n", + g_reply->host.id, fname + ); + } } } #endif // EINSTEIN_AT_HOME diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index 02cdc2d9a8..ff033c8353 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -1224,7 +1224,7 @@ static void explain_to_user() { // If work was sent from apps the user did not select, explain. // NOTE: this will have to be done differently with matchmaker scheduling // - if (!config.locality_scheduling && !config.matchmaker) { + if (!config.locality_scheduling && !config.locality_scheduler_fraction && !config.matchmaker) { if (g_wreq->njobs_sent && !g_wreq->user_apps_only) { g_reply->insert_message( "No work can be sent for the applications you have selected", diff --git a/tools/backend_lib.cpp b/tools/backend_lib.cpp index a1cfada9fa..cbe839bc3b 100644 --- a/tools/backend_lib.cpp +++ b/tools/backend_lib.cpp @@ -501,19 +501,6 @@ int create_result( } } - // if using locality scheduling, advertise data file - // associated with this newly-created result - // - if (config_loc.locality_scheduling) { - const char *datafilename; - char *last=strstr(result.name, "__"); - if (result.name