For unknown reasons, testing opencl_device_ids[[i] works only for debug builds, so add a new array bool have_opencls[] to COPROC struct in which we record which devices are openCL-capable before we clear the ati_opencls and nvidia_opencls vectors.
Suppose
- the host has 2 GPUs of same vendor; A is OpenCL capable, B isn't
- the volunteer sets "use_all_gpus" config flag
Then the client will try to run OpenCL jobs on B.
Depending on how the app is written,
it may run on B and fail, or run on A and overload A.
Solution: when assigning GPUs to OpenCL jobs,
check that the GPU instance is OpenCL capable.
Note: this problem would go away if we treated each GPU as a separate resource.