diff --git a/checkin_notes b/checkin_notes index 0aeb87a163..88dda53465 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1355,3 +1355,19 @@ David 3 Mar 2011 clientgui/ DlgAbout.cpp + +David 4 Mar 2011 + - scheduler: if we're not sending jobs because of user prefs + (no CPU, no GPU, selected apps) + send a message, not a notice. + Assume the user knew what they were doing, + and doesn't want to be nagged. + - scheduler: check for the existence of an app version + before checking for user selected-app prefs. + This prevents sending "no jobs available for selected apps" + message when no app versions exist for non-selected apps + - scheduler: use "tasks" instead of "work" in user messages + + sched/ + sched_array.cpp + sched_send.cpp diff --git a/sched/sched_array.cpp b/sched/sched_array.cpp index 3acd6fdb2b..dd12782074 100644 --- a/sched/sched_array.cpp +++ b/sched/sched_array.cpp @@ -50,7 +50,7 @@ static bool quick_check( if (wu_result.state != WR_STATE_PRESENT && wu_result.state != g_pid) { return false; } - + app = ssp->lookup_app(wu_result.workunit.appid); if (app == NULL) { return false; // this should never happen @@ -75,7 +75,7 @@ static bool quick_check( return false; } } - + // If this is a reliable host and we are checking for results that // need a reliable host, then continue if the result is a normal result // skip if the app is beta (beta apps don't use the reliable mechanism) @@ -87,15 +87,29 @@ static bool quick_check( return false; } } - + // don't send if we are looking for infeasible results // and the result is not infeasible // if (g_wreq->infeasible_only && (wu_result.infeasible_count==0)) { return false; } - - // check app filter if needed + + // Find the app and best app_version for this host. + // + bavp = get_app_version(wu, true, g_wreq->reliable_only); + if (!bavp) { + if (config.debug_array) { + log_messages.printf(MSG_NORMAL, + "[array] No app version\n" + ); + } + return false; + } + + // Check app filter if needed. + // Do this AFTER get_app_version(), otherwise we could send + // a misleading message to user // if (g_wreq->user_apps_only && (!g_wreq->beta_only || config.distinct_beta_apps) @@ -114,18 +128,6 @@ static bool quick_check( } } - // Find the app and best app_version for this host. - // - bavp = get_app_version(wu, true, g_wreq->reliable_only); - if (!bavp) { - if (config.debug_array) { - log_messages.printf(MSG_NORMAL, - "[array] No app version\n" - ); - } - return false; - } - // don't send job if host can't handle it // retval = wu_is_infeasible_fast( @@ -264,7 +266,7 @@ static bool result_still_sendable(DB_RESULT& result, WORKUNIT& wu) { // The choice of jobs is limited by flags in g_wreq, as follows: // infeasible_only: // send only results that were previously infeasible for some host -// reliable_only: +// reliable_only: // send only retries // user_apps_only: // Send only jobs for apps selected by user @@ -281,7 +283,7 @@ static bool scan_work_array() { DB_RESULT result; lock_sema(); - + rnd_off = rand() % ssp->max_wu_results; for (j=0; jmax_wu_results; j++) { i = (j+rnd_off) % ssp->max_wu_results; diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index 38c9919e1a..3beb4da468 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -1350,7 +1350,7 @@ static void send_user_messages() { 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", + "No tasks are available for the applications you have selected", "low" ); @@ -1364,7 +1364,7 @@ static void send_user_messages() { if (app) { char explanation[256]; sprintf(explanation, - "No work is available for %s", + "No tasks are available for %s", find_user_friendly_name(g_wreq->preferred_apps[i].appid) ); g_reply->insert_message( explanation, "low"); @@ -1378,11 +1378,11 @@ static void send_user_messages() { g_reply->insert_message(g_wreq->no_work_messages.at(j)); } g_reply->insert_message( - "Your preferences allow work from applications other than those selected", + "Your preferences allow tasks from applications other than those selected", "low" ); g_reply->insert_message( - "Sending work from other applications", "low" + "Sending tasks from other applications", "low" ); } } @@ -1391,7 +1391,7 @@ static void send_user_messages() { // if (g_wreq->njobs_sent == 0) { g_reply->set_delay(DELAY_NO_WORK_TEMP); - g_reply->insert_message("No work sent", "low"); + g_reply->insert_message("No tasks sent", "low"); // Tell the user about applications with no work // @@ -1400,7 +1400,7 @@ static void send_user_messages() { APP* app = ssp->lookup_app(g_wreq->preferred_apps[i].appid); // don't write message if the app is deprecated if (app != NULL) { - sprintf(buf, "No work is available for %s", + sprintf(buf, "No tasks are available for %s", find_user_friendly_name( g_wreq->preferred_apps[i].appid ) @@ -1417,8 +1417,8 @@ static void send_user_messages() { } if (g_wreq->no_allowed_apps_available) { g_reply->insert_message( - _("No work available for the applications you have selected. Please check your project preferences on the web site."), - "notice" + _("No tasks are available for the applications you have selected."), + "low" ); } if (g_wreq->speed.insufficient) { @@ -1454,25 +1454,25 @@ static void send_user_messages() { ); g_reply->set_delay(DELAY_NO_WORK_PERM); log_messages.printf(MSG_NORMAL, - "Not sending work because newer client version required\n" + "Not sending tasks because newer client version required\n" ); } if (g_wreq->no_cuda_prefs) { g_reply->insert_message( _("Tasks for NVIDIA GPU are available, but your preferences are set to not accept them"), - "notice" + "low" ); } if (g_wreq->no_ati_prefs) { g_reply->insert_message( _("Tasks for ATI GPU are available, but your preferences are set to not accept them"), - "notice" + "low" ); } if (g_wreq->no_cpu_prefs) { g_reply->insert_message( _("Tasks for CPU are available, but your preferences are set to not accept them"), - "notice" + "low" ); } DB_HOST_APP_VERSION* havp = quota_exceeded_version();