client: don't include GPUs that lack OpenCL/Cal/CUDA when main GPU has it

E.g.: if the "best" AMD GPU can do OpenCL, don't include AMD GPUs that can't,
even if use_all_gpus is set.
Otherwise lots of jobs will error out.
This commit is contained in:
David Anderson 2014-04-26 09:05:00 -07:00
parent 3a82ec871f
commit 4901e27282
2 changed files with 8 additions and 0 deletions

View File

@ -404,6 +404,10 @@ void COPROC_ATI::correlate(
ati_gpus[i].description(buf, sizeof(buf));
if (in_vector(ati_gpus[i].device_num, ignore_devs)) {
ati_gpus[i].is_used = COPROC_IGNORED;
} else if (this->have_opencl && !ati_gpus[i].have_opencl) {
ati_gpus[i].is_used = COPROC_UNUSED;
} else if (this->have_cal && !ati_gpus[i].have_cal) {
ati_gpus[i].is_used = COPROC_UNUSED;
} else if (use_all || !ati_compare(ati_gpus[i], *this, true)) {
device_nums[count] = ati_gpus[i].device_num;
count++;

View File

@ -393,6 +393,10 @@ void COPROC_NVIDIA::correlate(
for (i=0; i<nvidia_gpus.size(); i++) {
if (in_vector(nvidia_gpus[i].device_num, ignore_devs)) {
nvidia_gpus[i].is_used = COPROC_IGNORED;
} else if (this->have_opencl && !nvidia_gpus[i].have_opencl) {
nvidia_gpus[i].is_used = COPROC_UNUSED;
} else if (this->have_cuda && !nvidia_gpus[i].have_cuda) {
nvidia_gpus[i].is_used = COPROC_UNUSED;
} else if (use_all || !nvidia_compare(nvidia_gpus[i], *this, true)) {
device_nums[count] = nvidia_gpus[i].device_num;
pci_infos[count] = nvidia_gpus[i].pci_info;