The quick summary:
I get these four errors
I was able to find forum posts discussing all of the above except the last.
- Cannot import intern (eminating from six and pytools)
- undefined symbol: clCreateSubDevice
- No module named 'pyopencl._cffi'
The long story:
System configuration: $ uname -a && cat /etc/lsb-release && lspci | grep NV
Graphics drivers obtained thusly:
- Linux 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
- DISTRIB_DESCRIPTION="Linux Mint 17.3 Rosa"
- 01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 730] (rev a1)
- sudo add-apt-repository ppa:xorg-edgers/ppa
- sudo apt-get update
- sudo apt-get install nvidia-346 nvidia-settings
At first I attempted to install by building the latest OpenCL source from github
This runs into trouble when attempting to import "intern" from the package six. The stated resolution to this issue is to modify the pyopencl source to skip this import if it is unavailable. After I did this the same error recurred, this time eminating from pytools. As a workaround, I removed pytools (previously intalled from the system package manager) and reinstalled both it and six for my user using pip:
- sudo apt-get install libboost-all-dev python-setuptools python-numpy libffi-dev nvidia-opencl-dev
- git clone --recursive http://git.tiker.net/trees/pyopencl.git
- cd pyopencl/
- python ./configure.py
- sudo make install
This resolved the `intern` import error, but then the error `No module named 'pyopencl._cffi'` appeared. I didn't find anyone else with this error via Google, as most people are reporting that they can't find *cffi*, which is in fact installed on my system and imports just fine. Not really knowing what to do, I repeated the install process, this time as described here
- sudo pip uninstall pytools
- sudo pip install six --upgrade --user
- sudo pip install pytools --upgrade --user
I could now import pyopencl without error, but I couldn't run the demos. I got the `PLATFORM_NOT_FOUND_KHR` error. According to the NVidia forums, the solution to this should be to run a script to register the card properly so OpenCL can find it. This doesn't seem to be relevant, as the drivers are already loaded and the appropriate devices are already initialized in /dev.
I rebooted the machine, same error. I cleaned, rebuilt, and reinstalled `pyopencl-2016.1`. I then got a new error: `undefined symbol: clCreateSubDevices`. This post suggested that the workaround is to define `CL_PRETEND_VERSION = "1.1"` in the siteconf.py file within the opencl source directory. I did this and reran `make clean && make && sudo make install`. This did not resolve the issue.I tried purging the installation and starting again from scratch, but ran into the `No module named 'pyopencl._cffi'` error again. At this point I'm stuck.Thoughts?