- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm struggling to get the 1.5 SDK working in Linux. I copied the code from the User's Guide (with a tiny fix - noted below). But when I execute the code, it only finds my NVIDIA card as a possible platform.
The Intel files are at least being polled, but somehow rejected.
How can I debug this further?
THE OUTPUT FROM 'strace -eopen':
...
open("/etc/OpenCL/vendors/", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
open("/etc/OpenCL/vendors/nvidia.icd", O_RDONLY) = 4
open("/etc/ld.so.cache", O_RDONLY) = 5
open("/usr/lib64/libcuda.so", O_RDONLY) = 5
open("/usr/lib64/libz.so.1", O_RDONLY) = 5
open("/proc/stat", O_RDONLY) = 5
open("/dev/nvidiactl", O_RDWR) = 5
open("/dev/nvidia0", O_RDWR) = 6
open("/proc/interrupts", O_RDONLY) = 7
open("/dev/nvidia0", O_RDWR) = 7
open("/proc/interrupts", O_RDONLY) = 8
open("/dev/nvidia0", O_RDWR) = 8
open("/proc/interrupts", O_RDONLY) = 9
open("/etc/OpenCL/vendors/intelocl64.icd", O_RDONLY) = 4
open("/usr/lib64/OpenCL/vendors/intel/libintelocl.so", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/tls/x86_64/libcl_logger.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/OpenCL/vendors/intel/tls/libcl_logger.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/OpenCL/vendors/intel/x86_64/libcl_logger.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/OpenCL/vendors/intel/libcl_logger.so", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libtask_executor.so", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libnuma.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 9
open("/usr/lib64/libnuma.so.1", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libtbb.so.2", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libtbbmalloc.so.2", O_RDONLY) = 9
open("/lib64/librt.so.1", O_RDONLY) = 9
FOUND A PLATFORM: NVIDIA Corporation
THE CODE:
The Intel files are at least being polled, but somehow rejected.
How can I debug this further?
THE OUTPUT FROM 'strace -eopen':
...
open("/etc/OpenCL/vendors/", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
open("/etc/OpenCL/vendors/nvidia.icd", O_RDONLY) = 4
open("/etc/ld.so.cache", O_RDONLY) = 5
open("/usr/lib64/libcuda.so", O_RDONLY) = 5
open("/usr/lib64/libz.so.1", O_RDONLY) = 5
open("/proc/stat", O_RDONLY) = 5
open("/dev/nvidiactl", O_RDWR) = 5
open("/dev/nvidia0", O_RDWR) = 6
open("/proc/interrupts", O_RDONLY) = 7
open("/dev/nvidia0", O_RDWR) = 7
open("/proc/interrupts", O_RDONLY) = 8
open("/dev/nvidia0", O_RDWR) = 8
open("/proc/interrupts", O_RDONLY) = 9
open("/etc/OpenCL/vendors/intelocl64.icd", O_RDONLY) = 4
open("/usr/lib64/OpenCL/vendors/intel/libintelocl.so", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/tls/x86_64/libcl_logger.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/OpenCL/vendors/intel/tls/libcl_logger.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/OpenCL/vendors/intel/x86_64/libcl_logger.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/OpenCL/vendors/intel/libcl_logger.so", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libtask_executor.so", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libnuma.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 9
open("/usr/lib64/libnuma.so.1", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libtbb.so.2", O_RDONLY) = 9
open("/usr/lib64/OpenCL/vendors/intel/libtbbmalloc.so.2", O_RDONLY) = 9
open("/lib64/librt.so.1", O_RDONLY) = 9
FOUND A PLATFORM: NVIDIA Corporation
THE CODE:
[cpp]#include#include int main() { cl_platform_id * platforms = NULL; char vendor_name[128] = {0}; cl_uint num_platforms = 0; // get number of available platforms cl_int err = clGetPlatformIDs(0, NULL, & num_platforms); if (CL_SUCCESS != err) { // handle error } platforms = (cl_platform_id*)malloc( sizeof(cl_platform_id)* num_platforms); // ***THE USER'S GUIDE PDF HAS A SLIGHT TYPO HERE*** if (NULL == platforms) { // handle error } err = clGetPlatformIDs(num_platforms, platforms, NULL); if (CL_SUCCESS != err) { // handle error } for (cl_uint ui=0; ui< num_platforms; ++ui) { err = clGetPlatformInfo(platforms[ui], CL_PLATFORM_VENDOR, 128 * sizeof(char), vendor_name,NULL); if (CL_SUCCESS != err) { // handle error } if (vendor_name != NULL) { { std::cout << "FOUND A PLATFORM: " << vendor_name << std::endl; } } } return 0; } [/cpp]
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check the origination of libOpenCL.so.
Is it comes from NVidia or Intel? Which OCL version of the NVidia drivers do you have?
It's possiable that thereare compatability issues.
Is it comes from NVidia or Intel? Which OCL version of the NVidia drivers do you have?
It's possiable that thereare compatability issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Evgeny,
I've tried switching between the NVIDIA and Intel libOpenCL.so and issue occurs in both cases. When using the Intel version, I get two extra output lines from strace:
open("/sys/devices/system/node", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
open("/sys/devices/system/node", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
Dumping out more data about the identified NVIDIA platform:
CL_DEVICE_NAME: Quadro 4000
CL_DEVICE_VENDOR: NVIDIA Corporation
CL_DRIVER_VERSION: 275.28
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
...
clDeviceQuery, Platform Name = NVIDIA CUDA, Platform Version = OpenCL 1.0 CUDA 4.0.1, NumDevs = 1, Device = Quadro 4000
Thanks
- Rob
I've tried switching between the NVIDIA and Intel libOpenCL.so and issue occurs in both cases. When using the Intel version, I get two extra output lines from strace:
open("/sys/devices/system/node", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
open("/sys/devices/system/node", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
Dumping out more data about the identified NVIDIA platform:
CL_DEVICE_NAME: Quadro 4000
CL_DEVICE_VENDOR: NVIDIA Corporation
CL_DRIVER_VERSION: 275.28
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
...
clDeviceQuery, Platform Name = NVIDIA CUDA, Platform Version = OpenCL 1.0 CUDA 4.0.1, NumDevs = 1, Device = Quadro 4000
Thanks
- Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which linux version are you using?
Please try to link directly with libintelocl.so.
Evgeny
Please try to link directly with libintelocl.so.
Evgeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Evgeny,
I'm using Linux 2.6.18-238 CentOS release 5.5
Some progress here. Trying to directly link in the Intel libraries, I'm now getting:
/usr/lib64/OpenCL/vendors/intel/libintelocl.so:-1: error: undefined reference to `std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long)@GLIBCXX_3.4.9'
/usr/lib64/OpenCL/vendors/intel/libintelocl.so:-1: error: undefined reference to `numa_node_to_cpus@libnuma_1.2'
/usr/lib64/OpenCL/vendors/intel/libintelocl.so:-1: error: undefined reference to `numa_max_node@libnuma_1.1'
I'm not sure what's triggering these last two, but I know the first one. If I go back to not linking in libintelocl.so and force my process at runtime to use a newer libstdc++.so (from GCC 4.3.5 instead of 4.1.2), then I now get both "NVIDIA" and "Intel" as identified platforms.
Next step: try an actual kernel. I'll post back and let you know if I have any success with this.
Cheers!
- Rob
I'm using Linux 2.6.18-238 CentOS release 5.5
Some progress here. Trying to directly link in the Intel libraries, I'm now getting:
/usr/lib64/OpenCL/vendors/intel/libintelocl.so:-1: error: undefined reference to `std::basic_ostream
/usr/lib64/OpenCL/vendors/intel/libintelocl.so:-1: error: undefined reference to `numa_node_to_cpus@libnuma_1.2'
/usr/lib64/OpenCL/vendors/intel/libintelocl.so:-1: error: undefined reference to `numa_max_node@libnuma_1.1'
I'm not sure what's triggering these last two, but I know the first one. If I go back to not linking in libintelocl.so and force my process at runtime to use a newer libstdc++.so (from GCC 4.3.5 instead of 4.1.2), then I now get both "NVIDIA" and "Intel" as identified platforms.
Next step: try an actual kernel. I'll post back and let you know if I have any success with this.
Cheers!
- Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Success! All CPU cores go to 100% and I get the same results as from my GPU.
Looks like it was as simple as libintelocl.so expecting a newer version of libstdc++
Looks like it was as simple as libintelocl.so expecting a newer version of libstdc++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rob,
We support only gcc 4.3.x and up, supporting RH6 and SUSE11.1, older/other OS's currently are not supported.
I suggest youtotry upgradeto CentOS 6.0, although it's not officially supported.
Thanks,
Evgeny
We support only gcc 4.3.x and up, supporting RH6 and SUSE11.1, older/other OS's currently are not supported.
I suggest youtotry upgradeto CentOS 6.0, although it's not officially supported.
Thanks,
Evgeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Evgeny.
Unfortunately upgrading the OS isn't an option for me at the moment, so I'll have to fight my way forward in "unsupported mode".
Fortunately, as mentioned, switching to the gcc4.3 version of libstdc++ is doing the trick.
Cheers!
- Rob
Unfortunately upgrading the OS isn't an option for me at the moment, so I'll have to fight my way forward in "unsupported mode".
Fortunately, as mentioned, switching to the gcc4.3 version of libstdc++ is doing the trick.
Cheers!
- Rob

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page