Hi,

        This is mostly a note in case someone has the same issue.

        I am setting up a debian8 virtual machine, with nvidia drivers from 
jessie-backports.

        After installing fresh pyopencl using pip, I got an error:

---> 39 from pyopencl._cffi import ffi as _ffi
     40 from .compyte.array import f_contiguous_strides, c_contiguous_strides
     41 

ImportError: 
/home/pynx/pynx-env/lib/python3.4/site-packages/pyopencl/_cffi.abi3.so: 
undefined symbol: clSVMFree


        After some digging, this is due to the fact that pyopencl was compiled 
with OpenCL 2.0 support, which the installed libraries do not support.

        And that in turn is due to debian8’s OpenCL headers, which as of 
version 2.0~svn31815-2~bpo8+1 includes:
#define CL_VERSION_1_0                              1
#define CL_VERSION_1_1                              1
#define CL_VERSION_1_2                              1
#define CL_VERSION_2_0                              1

        ..and that ‘CL_VERSION_2_0’ triggers the OpenCL 2.0 support in pyopencl…

        The solution is either to not install the opencl-headers from backports 
(only the nvidia drivers), or to use the 'CL_PRETEND_VERSION’ option (but that 
requires manual compilation, less convenient than pip for deployment)..

        So, problem solved, but I find this less than satisfying. 
- Should pyopencl compile with OpenCL 2.0 support even if no OpenCL 2 
devices/libraries are present (which is the case according to clinfo) ?
- Does that also mean that on a system with a mixture of 1.2 and 2.0 devices 
different pyopencl versions would be needed ? 
- Or is it a bug in debian8 backports with the wrong header ?
- Or maybe I should blame nvidia for sticking to 1.2 only...
        
        
— 
Vincent Favre-Nicolin

_______________________________________________
PyOpenCL mailing list
PyOpenCL@tiker.net
https://lists.tiker.net/listinfo/pyopencl

Reply via email to