mirror of https://github.com/BOINC/boinc.git
client: fix job scheduling bug. Sort by avg_ncpus doesn't apply to GPU jobs
This commit is contained in:
parent
5250f55c8a
commit
a177ef0068
|
@ -1011,10 +1011,12 @@ static inline bool more_important(RESULT* r0, RESULT* r1) {
|
|||
if (unfin0 && !unfin1) return true;
|
||||
if (!unfin0 && unfin1) return false;
|
||||
|
||||
// favor jobs that use more CPUs
|
||||
// for CPU jobs, favor jobs that use more CPUs
|
||||
//
|
||||
if (r0->avp->avg_ncpus > r1->avp->avg_ncpus) return true;
|
||||
if (r1->avp->avg_ncpus > r0->avp->avg_ncpus) return false;
|
||||
if (!cp0) {
|
||||
if (r0->avp->avg_ncpus > r1->avp->avg_ncpus) return true;
|
||||
if (r1->avp->avg_ncpus > r0->avp->avg_ncpus) return false;
|
||||
}
|
||||
|
||||
// favor jobs selected first by schedule_cpus()
|
||||
// (e.g., because their project has high sched priority)
|
||||
|
|
|
@ -418,7 +418,7 @@ int create_shmem(key_t key, int size, gid_t gid, void** pp) {
|
|||
}
|
||||
if (id < 0) {
|
||||
perror("shmget");
|
||||
fprintf(stderr,"shmem size: %d\n", size);
|
||||
fprintf(stderr, "shmem size: %d\n", size);
|
||||
return ERR_SHMGET;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue