- 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


svn path=/trunk/boinc/; revision=23168
This commit is contained in:
David Anderson 2011-03-04 19:40:59 +00:00
parent dc7857392c
commit e480cef000
3 changed files with 49 additions and 31 deletions

View File

@ -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

View File

@ -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; j<ssp->max_wu_results; j++) {
i = (j+rnd_off) % ssp->max_wu_results;

View File

@ -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();