mirror of https://github.com/BOINC/boinc.git
- client: bug fixes to the above.
Don't fetch work for an unable resource. svn path=/trunk/boinc/; revision=19302
This commit is contained in:
parent
d6efa7dabb
commit
9f93535428
|
@ -8656,3 +8656,12 @@ David 14 Oct 2009
|
|||
coproc.cpp,h
|
||||
sched/
|
||||
sched_locality.cpp
|
||||
|
||||
David 14 Oct 2009
|
||||
- client: bug fixes to the above.
|
||||
Don't fetch work for an unable resource.
|
||||
|
||||
client/
|
||||
cpu_sched.cpp
|
||||
cs_scheduler.cpp
|
||||
work_fetch.cpp
|
||||
|
|
|
@ -191,35 +191,39 @@ struct PROC_RESOURCES {
|
|||
// see whether there's been a change in coproc usability;
|
||||
// if so set or clear "coproc_missing" flags and return true.
|
||||
//
|
||||
#include "filesys.h"
|
||||
bool check_coproc_usable(COPROC* cp) {
|
||||
int i;
|
||||
unsigned int i;
|
||||
bool is_cuda = (cp==coproc_cuda);
|
||||
bool new_usable = cp->is_usable();
|
||||
//bool new_usable = !boinc_file_exists("unusable");
|
||||
if (cp->usable) {
|
||||
if (!cp->is_usable()) {
|
||||
if (!new_usable) {
|
||||
cp->usable = false;
|
||||
for (i=0; i<gstate.results.size(); i++) {
|
||||
RESULT* rp = gstate.results[i];
|
||||
if (rp->avp->ncudas) {
|
||||
if (is_cuda?rp->avp->ncudas:rp->avp->natis) {
|
||||
rp->coproc_missing = true;
|
||||
}
|
||||
}
|
||||
msg_printf(NULL, MSG_INFO,
|
||||
"%s GPU has become unusable; disabling tasks",
|
||||
cp==coproc_cuda?"NVIDIA":"ATI"
|
||||
is_cuda?"NVIDIA":"ATI"
|
||||
);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (cp->is_usable()) {
|
||||
if (new_usable) {
|
||||
cp->usable = true;
|
||||
for (i=0; i<gstate.results.size(); i++) {
|
||||
RESULT* rp = gstate.results[i];
|
||||
if (rp->avp->ncudas) {
|
||||
if (is_cuda?rp->avp->ncudas:rp->avp->natis) {
|
||||
rp->coproc_missing = false;
|
||||
}
|
||||
}
|
||||
msg_printf(NULL, MSG_INFO,
|
||||
"%s GPU has become usable; enabling tasks",
|
||||
cp==coproc_cuda?"NVIDIA":"ATI"
|
||||
is_cuda?"NVIDIA":"ATI"
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -833,8 +833,11 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
|
|||
rp->set_state(RESULT_NEW, "handle_scheduler_reply");
|
||||
if (rp->avp->ncudas) {
|
||||
est_cuda_duration += rp->estimated_duration(false);
|
||||
coproc_cuda->usable = true;
|
||||
// trigger a check of whether GPU is actually usable
|
||||
} else if (rp->avp->natis) {
|
||||
est_ati_duration += rp->estimated_duration(false);
|
||||
coproc_ati->usable = true;
|
||||
} else {
|
||||
est_cpu_duration += rp->estimated_duration(false);
|
||||
}
|
||||
|
|
|
@ -284,10 +284,10 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) {
|
|||
|
||||
void WORK_FETCH::set_shortfall_requests(PROJECT* p) {
|
||||
cpu_work_fetch.set_shortfall_request(p);
|
||||
if (coproc_cuda) {
|
||||
if (coproc_cuda && coproc_cuda->usable) {
|
||||
cuda_work_fetch.set_shortfall_request(p);
|
||||
}
|
||||
if (coproc_ati) {
|
||||
if (coproc_ati && coproc_ati->usable) {
|
||||
ati_work_fetch.set_shortfall_request(p);
|
||||
}
|
||||
}
|
||||
|
@ -480,28 +480,31 @@ PROJECT* WORK_FETCH::choose_project() {
|
|||
gstate.rr_simulation();
|
||||
set_overall_debts();
|
||||
|
||||
if (coproc_cuda) {
|
||||
bool cuda_usable = coproc_cuda && coproc_cuda->usable;
|
||||
bool ati_usable = coproc_ati && coproc_ati->usable;
|
||||
|
||||
if (cuda_usable) {
|
||||
p = cuda_work_fetch.choose_project(FETCH_IF_IDLE_INSTANCE);
|
||||
}
|
||||
if (coproc_ati) {
|
||||
if (ati_usable) {
|
||||
p = ati_work_fetch.choose_project(FETCH_IF_IDLE_INSTANCE);
|
||||
}
|
||||
if (!p) {
|
||||
p = cpu_work_fetch.choose_project(FETCH_IF_IDLE_INSTANCE);
|
||||
}
|
||||
if (!p && coproc_cuda) {
|
||||
if (!p && cuda_usable) {
|
||||
p = cuda_work_fetch.choose_project(FETCH_IF_MAJOR_SHORTFALL);
|
||||
}
|
||||
if (!p && coproc_ati) {
|
||||
if (!p && ati_usable) {
|
||||
p = ati_work_fetch.choose_project(FETCH_IF_MAJOR_SHORTFALL);
|
||||
}
|
||||
if (!p) {
|
||||
p = cpu_work_fetch.choose_project(FETCH_IF_MAJOR_SHORTFALL);
|
||||
}
|
||||
if (!p && coproc_cuda) {
|
||||
if (!p && cuda_usable) {
|
||||
p = cuda_work_fetch.choose_project(FETCH_IF_MINOR_SHORTFALL);
|
||||
}
|
||||
if (!p && coproc_ati) {
|
||||
if (!p && ati_usable) {
|
||||
p = ati_work_fetch.choose_project(FETCH_IF_MINOR_SHORTFALL);
|
||||
}
|
||||
if (!p) {
|
||||
|
@ -511,10 +514,10 @@ PROJECT* WORK_FETCH::choose_project() {
|
|||
// don't try to maintain GPU work for all projects,
|
||||
// since we don't use round-robin scheduling for GPUs
|
||||
//
|
||||
if (!p && coproc_cuda) {
|
||||
if (!p && cuda_usable) {
|
||||
p = cuda_work_fetch.choose_project(FETCH_IF_PROJECT_STARVED);
|
||||
}
|
||||
if (!p && coproc_ati) {
|
||||
if (!p && ati_usable) {
|
||||
p = ati_work_fetch.choose_project(FETCH_IF_PROJECT_STARVED);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue