Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I've tried other peoples code,including the code samples from the OpenCL book and all fail with CL_INVALID_VALUE can't create Command queue.

I'm really stumped (and in despair to be honest, as I need this to work for my master thesis). I tried the examples in admin and standard accounts, and using gfxCardStatus forcing to use discrete graphics.


Have you installed anything besides XCode?
 
I've tried gcc and clang from the command line with the same result (clang -framework OpenCL hello.c -o hello). Using gfxCardStatus, I've tried both Automatic Switching and Discrete Only, neither of which failed. When set to Automatic Switching, I see the Growl notification that the 650M is briefly engaged before switching back to the 4000. I can only get it to fail if I set properties to a non-zero value in the call to clCreateCommandQueue.

Have you tried passing an error notification callback function into clCreateContext to see if you get anything useful?

e.g.
Code:
#include <OpenCL/cl_ext.h>

context = clCreateContext(0, 1, &device_id, [B]clLogMessagesToStdoutAPPLE[/B], NULL, &err);
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.