- scheduler: fix sending of NCI jobs.

We were failing to mark the cache entries as free.
- API: initialize GPU device # to -1;
    If client doesn't give us a device number, something is wrong
    and it's better to not start computing.


svn path=/trunk/boinc/; revision=26079
This commit is contained in:
David Anderson 2012-09-06 23:44:03 +00:00
parent 6ba0dd5722
commit 6b81e2ffc3
4 changed files with 24 additions and 5 deletions

View File

@ -5884,3 +5884,16 @@ David 6 Sept 2012
sched/
sched_version.cpp
file_deleter.cpp
David 6 Sept 2012
- scheduler: fix sending of NCI jobs.
We were failing to mark the cache entries as free.
- API: initialize GPU device # to -1;
If client doesn't give us a device number, something is wrong
and it's better to not start computing.
sched/
sched_array.cpp
sched_send.cpp
lib/
app_ipc.cpp

View File

@ -285,7 +285,7 @@ void APP_INIT_DATA::clear() {
fraction_done_end = 0;
checkpoint_period = 0;
strcpy(gpu_type, "");
gpu_device_num = 0;
gpu_device_num = -1;
// -1 means an older version without gpu_opencl_dev_index field
gpu_opencl_dev_index = -1;
ncpus = 0;

View File

@ -576,6 +576,7 @@ int send_job_for_app(APP& app) {
wu_result.state = g_pid;
unlock_sema();
result.id = wu_result.resultid;
wu_result.state = WR_STATE_EMPTY;
if (result_still_sendable(result, wu)) {
if (config.debug_send) {
log_messages.printf(MSG_NORMAL,
@ -583,12 +584,12 @@ int send_job_for_app(APP& app) {
);
}
add_result_to_reply(result, wu, bavp, false);
break;
return 0;
}
lock_sema();
}
unlock_sema();
return 0;
return 1;
}
// try to send jobs for non-CPU-intensive (NCI) apps
@ -629,7 +630,12 @@ int send_nci() {
for (unsigned int i=0; i<nci_apps.size(); i++) {
APP& app = nci_apps[i];
if (app.have_job) continue;
send_job_for_app(app);
retval = send_job_for_app(app);
if (retval) {
log_messages.printf(MSG_NORMAL,
"failed to send job for NCI app %s\n", app.user_friendly_name
);
}
}
return 0;
}

View File

@ -838,7 +838,7 @@ int wu_is_infeasible_fast(
retval = check_bandwidth(wu);
if (retval) return retval;
if (config.non_cpu_intensive) {
if (app.non_cpu_intensive) {
return 0;
}