I am answering myself ...

I downgraded the OpenCL headers to 1.1 and installed the nvidia libopencl1 
library which is limited to v1.1.

But now I am no more able to compile pyopencl which fails at the link time with:
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -DNDEBUG -fPIC 
-DPYGPU_PACKAGE=pyopencl -DPYGPU_PYOPENCL=1 -DPYOPENCL_PRETEND_CL_VERSION=4112 
-DPYOPENCL_USE_DEVICE_FISSION=1 -DHAVE_GL=1 
-I/usr/lib/pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c 
src/wrapper/bitlog.cpp -o build/temp.linux-x86_64-2.7/src/wrapper/bitlog.o
g++ -pthread -shared -Wl,-Bsymbolic-functions -Wl,-z,relro 
build/temp.linux-x86_64-2.7/src/wrapper/wrap_cl.o 
build/temp.linux-x86_64-2.7/src/wrapper/wrap_cl_part_1.o 
build/temp.linux-x86_64-2.7/src/wrapper/wrap_cl_part_2.o 
build/temp.linux-x86_64-2.7/src/wrapper/wrap_constants.o 
build/temp.linux-x86_64-2.7/src/wrapper/wrap_mempool.o 
build/temp.linux-x86_64-2.7/src/wrapper/bitlog.o -lboost_python-py27 -lOpenCL 
-o build/lib.linux-x86_64-2.7/pyopencl/_cl.so
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1


Now clinfo (which uses this same library) works a bit and complains before 
segfaulting:

$ clinfo 
clinfo: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1: no version information 
available (required by clinfo)
Number of platforms:                             3
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 1.1 CUDA 6.0.1
  Platform Name:                                 NVIDIA CUDA
  Platform Vendor:                               NVIDIA Corporation
  Platform Extensions:                           cl_khr_byte_addressable_store 
cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options 
cl_nv_device_attribute_query cl_nv_pragma_unroll 
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 1.2 AMD-APP (937.2)
  Platform Name:                                 AMD Accelerated Parallel 
Processing
  Platform Vendor:                               Advanced Micro Devices, Inc.
  Platform Extensions:                           cl_khr_icd 
cl_amd_event_callback cl_amd_offline_devices
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 1.2 LINUX
  Platform Name:                                 Intel(R) OpenCL
  Platform Vendor:                               Intel(R) Corporation
  Platform Extensions:                           cl_khr_icd 
cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics 
cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics 
cl_khr_byte_addressable_store cl_khr_spir cl_khr_fp64 


  Platform Name:                                 NVIDIA CUDA
Number of devices:                               1
  Device Type:                                   CL_DEVICE_TYPE_GPU
  Device ID:                                     4318
[...]  
  Global memory size:                            5032706048
  Constant buffer size:                          65536
  Max number of constant args:                   9
  Local memory type:                             Scratchpad
  Local memory size:                             49152
Segmentation fault

If I replace this library with the one from AMD or the open-source one, 
pyopencl compiles but seg-faults when creating an Nvidia context.

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

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

Reply via email to