问题
I am trying to run some OpenCL programs. I have a NVidia graphics card (GeForce 6600).
But , when I execute my program and I get a error : Unable to get platforms -1001
My OS is ArchLinux and I already install the following packages ( from pacman ): 1. libcl 2. opencl-headers 3. opencl-nvidia-304xx 4. lib32-opencl-nvidia-304xx
How to fix this problem in my environment? or what necessary packages need to install?
thanks.
回答1:
OpenCL-error -1001 "CL_PLATFORM_NOT_FOUND_KHR"
doesn't necessarily mean you don't have any OpenCL-capable device. This means, that cl_khr_icd-extention
have a trouble to load the proper vendor driver.
Try to run your OpenCL-program(s) as root. Or try to use clIcdGetPlatformIDsKHR
.
If you not running X11, you need to create device files manually or by script
来源:https://stackoverflow.com/questions/29315603/opencl-clgetplatformids-error-1001