Hello,

I spent the day in porting a pyopencl application from Linux to MacOSX. 
I don't blame pyopencl at all but I found the porting was quite
difficult for a couple of portable tools like python and OpenCL.

I am working on a freshly installed MacOSX Lion on a MacBook Pro from
2008 with a dual core "core2" from intel and two GPUs from NVidia 9400M
and 9600M.

First bug: "RuntimeError: Device not available"
I selected the most powerfull GPU when creating the context but the queue 
creation failed ... It seems only the   gfxCardStatus external tool is able to 
activate (actually switch) GPUs.

Question: Is there a way within PyOpenCL to know if a device is actually 
available or not ?
The flag: device.available is set to 1 regardless if the GPU is actually ON or 
OFF. The only unacceptable solution I found is based on try/except :(

try: queue=pyopencl.CommandQueue(ctx)
except RuntimeError: print("Sorry, switched off")

Second bug: "pyopencl.RuntimeError: clBuildProgram failed: build program 
failure"
Solution: options to build the kernel need to be stripped under MacOSX !!!

Third bug: "LogicError: clEnqueueNDRangeKernel failed: invalid work group size"
When running on CPU, I have the fealing that the only valid workgroup size is 
"1", even when 
device.max_work_group_size advertizes 1024 !!!

I found track of such bugs on this mailing list and others but I have the 
feeling the community developing opencl application on MacOSX is not that 
large, am I wrong ?

Cheers.
-- 
Jérôme Kieffer
Data analysis unit - ESRF

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to