Hi all,

To keep my directory folder clean, I installed python into
C:\Program Files (x86)\python.

It turns out that the Nvidia openCL runtimes do not really like
paths with spaces, even if properly enqouted. Since pyOpenCL
adds it's own path as include, this goes wrong in my case.

A workaround is to modify pyopencl/__init__.py such that
_find_pyopencl_include_path() reads:

    for inc_path in possible_include_paths:
        if exists(inc_path):
            if sys.platform.count('win') > 0:
                import ctypes
                buf = bytes(256,'ascii')
                ctypes.windll.kernel32.GetShortPathNameW( inc_path, buf,
256 )
                inc_path = buf.decode('utf-16')
            return inc_path

I know it's a nasty hack, but it's the only way I got it working.
Does anyone have some suggestions on how to improve this?

With regards,

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

Reply via email to