I guess that on most machines there will only be one platform. In that case the examples should simply use it.

For the more general case where there are multiple platforms... I don't really have a good solution and the problem is not simply the examples. The group didn't want to have a notion of a "default platform" because it would just would cause installers to fight with each other to become the default, something like what you see with common file extensions in Windows when you install, say, Windows Media Player and Quicktime.

It's an inconvenient state of affairs and I don't know how/when it will be resolved. Maybe there's no solution that is clearly better than the rest. Delegating the decision to the app doesn't really solve things either.

Cheers,

David

On Mon, Jan 25, 2010 at 4:22 PM, Andreas Klöckner <lists@informa.tiker.net> wrote:
On Montag 25 Januar 2010, Rohit Garg wrote:
> Hi,
>
> I just downloaded, compiled and installed pyopencl from the git tree.
> I am using AMD's opencl sdk for cpu's and it is working alright. When
> I tried to run the demo.py example in the pyopencl distribution, it
> threw an error.
>
> Traceback (most recent call last):
>   File "demo.py", line 8, in <module>
>     ctx = cl.Context()
> pyopencl.LogicError: Context failed: invalid platform
>
>
> It appears that these examples have to be modified to specifically
> select the device as now AMD's sdk ships with an ICD.

Thanks for reporting this. This appears to affect most example code in
PyOpenCL. I'd like to poll the list regarding what we should do here.
Should the examples become interactive and ask what platform to use? Or
should they pick one at random? Any other suggestions?

Andreas


_______________________________________________
PyOpenCL mailing list
PyOpenCL@tiker.net
http://tiker.net/mailman/listinfo/pyopencl_tiker.net