client: fix job scheduling bug. Sort by avg_ncpus doesn't apply to GPU jobs

This commit is contained in:
David Anderson 2014-07-03 21:53:38 -07:00
parent 5250f55c8a
commit a177ef0068
2 changed files with 6 additions and 4 deletions

View File

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

View File

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