client: if a GPU exclusion refers to non-existent device num, ignore it

This commit is contained in:
David Anderson 2015-08-16 01:06:28 -07:00
parent 0f2adb5ab7
commit 1431a21d99
2 changed files with 7 additions and 2 deletions

View File

@ -178,8 +178,7 @@ struct PROC_RESOURCES {
// for that resource type.
// Inefficient, but necessary to avoid starvation cases.
//
bool dont_reserve = rsc_work_fetch[rt].has_exclusions;
if (!dont_reserve) {
if (! rsc_work_fetch[rt].has_exclusions) {
reserve_coprocs(*rp);
}
//ncpus_used_st += rp->avp->avg_ncpus;

View File

@ -583,6 +583,12 @@ void process_gpu_exclusions() {
COPROC& cp = coprocs.coprocs[k];
if (eg.type == cp.type) {
found = true;
// skip exclusions of non-existent devices
//
if (eg.device_num && (cp.device_num_index(eg.device_num) < 0)) {
break;
}
rsc_work_fetch[k].has_exclusions = true;
break;
}