- client: if have coproc jobs but coproc is missing,

skip those jobs in RR sim.
    Otherwise we add stuff to uninitialized data structures,
    and a crash can result.
- client: initialize the above data structures anyway


svn path=/trunk/boinc/; revision=20753
This commit is contained in:
David Anderson 2010-02-28 04:32:10 +00:00
parent df7f9d884b
commit b7d48765a8
3 changed files with 16 additions and 8 deletions

View File

@ -1442,3 +1442,14 @@ David 26 Feb 2009
coproc_detect.cpp
file_xfer.cpp
pers_file_xfer.cpp
David 27 Feb 2009
- client: if have coproc jobs but coproc is missing,
skip those jobs in RR sim.
Otherwise we add stuff to uninitialized data structures,
and a crash can result.
- client: initialize the above data structures anyway
client/
work_fetch.cpp
rr_sim.cpp

View File

@ -286,7 +286,7 @@ void CLIENT_STATE::rr_simulation() {
p = rp->project;
p->pwf.has_runnable_jobs = true;
p->cpu_pwf.nused_total += rp->avp->avg_ncpus;
if (rp->uses_cuda()) {
if (rp->uses_cuda() && coproc_cuda) {
p->cuda_pwf.nused_total += rp->avp->ncudas;
p->cuda_pwf.has_runnable_jobs = true;
if (cuda_work_fetch.sim_nused < coproc_cuda->count) {
@ -295,7 +295,7 @@ void CLIENT_STATE::rr_simulation() {
} else {
cuda_work_fetch.pending.push_back(rp);
}
} else if (rp->uses_ati()) {
} else if (rp->uses_ati() && coproc_ati) {
p->ati_pwf.nused_total += rp->avp->natis;
p->ati_pwf.has_runnable_jobs = true;
if (ati_work_fetch.sim_nused < coproc_ati->count) {

View File

@ -644,12 +644,9 @@ void PROJECT_WORK_FETCH::reset(PROJECT* p) {
void WORK_FETCH::rr_init() {
cpu_work_fetch.rr_init();
if (coproc_cuda) {
cuda_work_fetch.rr_init();
}
if (coproc_ati) {
ati_work_fetch.rr_init();
}
// do these even if no device; there may be "coproc_missing" jobs
cuda_work_fetch.rr_init();
ati_work_fetch.rr_init();
for (unsigned int i=0; i<gstate.projects.size(); i++) {
PROJECT* p = gstate.projects[i];
p->pwf.can_fetch_work = p->pwf.compute_can_fetch_work(p);