I trying to get my OpenCL project compile in Ubuntu. I have a Core i5 and AMD HD 5660 which are both compatible.
when I execute the following code
cl_int status;
// Retrieve the number of platforms
cl_uint numPlatforms = 0;
status = clGetPlatformIDs(0, NULL, &numPlatforms);
if (status != CL_SUCCESS)
{
std::cout << "Error: Getting platforms!" << std::endl;
std::cin.get();
}
I get Error: Getting platforms!
When I execute clinfo
, I get: terminate called after throwing an instance of 'cl::Error \n what(): clGetPlatformIDs'
I am using AMD driver 14.4 and SDK 2.9 (it is mentioned in AMD installation guide, that setting up these two file will handle registration of icd and environmental variables)
What am I doing wrong that I cannot get my prog working?
Note that I am using Eclipse with correct path to lib (/opt/AMDAPP/lib/x86_64
). The program compiles correctly.
EDIT
Installation procedure
first install x64 driver 14.4
i installed
AMD-APP-SDK-v2.9-lnx64.tgz
(Untar the SDK and than executedsudo ./Install-AMD-APP.sh.
) as recommended in the install guide.validated
AMDAPPSDKROOT 'and
LD_LIBRARY_PATH` are correct.- created symlink to
/usr/lib64/OpenCL/vendors/amd/libOpenCl.so.1
in/use/lib
(since it is a x64 bit PC and for some reason opencl looks for x64 driver in /lib)