Hi All,
We have a DELL server PowerEdge M600 with Intel Xeon processor E5450 @ 3.00 GHz running RedHat RHEL6 [2.6.32-573.7.1.el6.x86_64] on 64bit platform.
ruby and redhat-lsb-core have been installed.
Has downloaded ocl-icd-2.2.7.tar.gz, untarred and built successfully.
opencl_runtime_15.1_x64_5.0.0.57.tgz has been installed successfully too.
when running a simple python script:
import pyopencl
pyopencl.create_some_context()
will always get this error message:
Choose platform:
[0] <pyopencl.Platform 'Intel(R) OpenCL' at 0x1691680>
Choice [0]:
Set the environment variable PYOPENCL_CTX='' to avoid being asked again.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/test/pyopencl/__init__.py", line 886, in create_some_context
return Context(devices)
pyopencl.RuntimeError: Context failed: device not available
This problem does not occur on other Dell poweredge server with E5xxx processor.
Anyone has a clue and solution to this?
Link Copied
Hi Teddy,
Could you download and run the following very basic OpenCL sample: https://software.intel.com/en-us/articles/caps-basic ? Please post the output to this forum. Just want to make sure that your OpenCL is actually installed properly.
Hi Teddy,
I am suspecting that what's happening is that you are by default trying to select a GPU device, which is not available for your platform. Try to explicitly select a CPU device:
import pyopencl as cl
platform = cl.get_platforms()[0]
device = platform.get_devices()[0]
print(device)
Let me know if that worked for you.
Hi Robert,
Thanks for the codes, it works.
But its strange that the previous codes dont work on that particular machine, others are fine.
Dear all.
I have the same problem and i can't find a solution.
The first thing to check is that OpenCL is installed and working.
You can try the OpenCL CapsBasic sample: https://software.intel.com/en-us/articles/caps-basic
This processor does not contain an Intel integrated graphics GPU, so you will need to select a CPU device.
The implementation of pyopencl is a bit out of our scope, but we can help with getting OpenCL going.
For more complete information about compiler optimizations, see our Optimization Notice.