Yes, i was able to install pyopencl by creating a folder and symlinking all library files there plus libOpenCL.so -> libOpenCL.so.1. If compiling with gcc the LIBRARY_PATH must be set. For python LD_LIBRARY_PATH must be set.
But unfortunately the journey is not yet completed. I am now struggling with the ICD loader. /etc/OpenCL/vendors doesn’t exist in my case and I don’t have root privileges. I found that I can set OPENCL_VENDOR_PATH and or OCL_ICD_VENDORS to point to my icd files. But it seems like it doesn’t accept the variables (trying to run in C compiled with gcc). Thanks so far for your help! Best regards Jesse > Am 01.03.2016 um 21:50 schrieb Andreas Kloeckner <[email protected]>: > > Jesse Hinrichsen <[email protected] <mailto:[email protected]>> writes: > >> Hi Andreas, >> >> yes CL/cl.h exists. >> I were able to get a few steps further and successfully compile it with pip >> by setting the >> C++ library path (LIBRARY_PATH) and and the C++ include path >> (CPLUS_INCLUDE_PATH). >> Unfortunately i get an error now when importing pyopencl in python. >> >>>>> import pyopencl >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "~/gpupy/local/lib/python2.7/site-packages/pyopencl/__init__.py", line >> 28, in >> <module> >> import pyopencl._cl as _cl >> ImportError: libOpenCL.so.1: cannot open shared object file: No such file or >> directory >> >> Even though I am able to run >> >> gcc test.cpp -lOpenCL -o test >> >> without any problem. >> I don't understand though how the linking of those extensions actually work. >> In the library >> path I don't have libOpenCL.so.1 but I have libnvidia-opencl.so.1 . >> I guess this libnvidia-opencl.so.1 is responsible for -lOpenCL to work but >> _cl.so tries to >> find libOpenCL.so.1 based on the library name. >> >> I don't know if I am on the right track. I guess I have to investigate the >> pyopencl source >> files to understand how it compiles. Or do you have an idea? > > Looks like you might be close. Set LD_LIBRARY_PATH to include wherever > Nvidia's libOpenCL.so.1 ended up, and you should be good to go. > > Andreas
_______________________________________________ PyOpenCL mailing list [email protected] https://lists.tiker.net/listinfo/pyopencl
