Context failure because CL_DEVICE_NOT_AVAILABLE

Sorry if this has already been addressed, but every search string I can come up with refuses to search these boards (apparently underscores are treated as spaced, so CL_DEVICE_NOT_AVAILABLE, cannot be searched for successfully, even if it is quoted).

Is it normal for cl::Context::Context to sometimes fail with this message:

I run the program I am working on multiple times.
Sometimes it returns that ‘error’ status and sometimes it does not.

For now I will fall back to not using OCL when this happens, but it seems very strange that it it isn’t more consistent.


That’s interesting. Technically it’s legal. However, I wonder why does it sometimes work and sometimes fail.

Could you describe the system where you are running this? Intel/AMD/NVidia? Apple?

I am running Windows 7 on a Dell Laptop, with a NVIDIA Quadro FX 360M.