diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp index a108017e95..599124135d 100644 --- a/client/cpu_sched.cpp +++ b/client/cpu_sched.cpp @@ -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; diff --git a/client/log_flags.cpp b/client/log_flags.cpp index c33feb1173..9fa79a8dec 100644 --- a/client/log_flags.cpp +++ b/client/log_flags.cpp @@ -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; }