cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

nikkej
Journeyman III

Problem running any of the OpenCL examples, 'ERROR: cl::Platform::get() (1)'

Hi !

After compiling all OpenCL samples, picking randomly some of them for try gives me an error like "ERROR: cl:latform::get() (1)". Checking with strace gives me some hint something could be missing from libraries (some metadata?).

Looks like file / directory named 'vendors' is missing and I was not able to find anything from the SDK for that name (I was thinking could it be SDK installation error but maybe not)

My system is:

AMD Phenom II X4 940, Sapphire Radeon HD 4870, Fedora 11 64bit, fglrx-8.682.2-x86_64, 8GB RAM

-nikke

 

... open("/lib64/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\34020\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=49352, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f01b5ecc000 mmap(0x3032e00000, 2128816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3032e00000 mprotect(0x3032e07000, 2093056, PROT_NONE) = 0 mmap(0x3033006000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x3033006000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f01b5ecb000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f01b5eca000 arch_prctl(ARCH_SET_FS, 0x7f01b5eca710) = 0 mprotect(0x3033006000, 4096, PROT_READ) = 0 mprotect(0x3031d64000, 16384, PROT_READ) = 0 mprotect(0x3032081000, 4096, PROT_READ) = 0 mprotect(0x3036cec000, 28672, PROT_READ) = 0 mprotect(0x7f01b60d2000, 4096, PROT_READ) = 0 mprotect(0x3032402000, 4096, PROT_READ) = 0 mprotect(0x3032816000, 4096, PROT_READ) = 0 mprotect(0x608000, 4096, PROT_READ) = 0 mprotect(0x303181e000, 4096, PROT_READ) = 0 munmap(0x7f01b60d5000, 152052) = 0 set_tid_address(0x7f01b5eca7e0) = 7078 set_robust_list(0x7f01b5eca7f0, 0x18) = 0 futex(0x7fffbfce215c, FUTEX_WAKE_PRIVATE, 1) = 0 futex(0x7fffbfce215c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f01b5eca710) = -1 EAGAIN (Resource temporarily unavailable) rt_sigaction(SIGRTMIN, {0x3032605750, [], SA_RESTORER|SA_SIGINFO, 0x303260eea0}, NULL, 😎 = 0 rt_sigaction(SIGRT_1, {0x30326057e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x303260eea0}, NULL, 😎 = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 😎 = 0 getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 futex(0x3036cf5b88, FUTEX_WAKE_PRIVATE, 2147483647) = 0 open("/usr/lib/OpenCL/vendors/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "ERROR: ", 7ERROR: ) = 7 write(2, "cl::Platform::get()", 19cl::Platform::get()) = 19 write(2, " (", 2 () = 2 write(2, "1", 11) = 1 write(2, ")", 1)) = 1 write(2, "\n", 1 ) = 1 exit_group(1) = ?

0 Likes
7 Replies
nou
Exemplar

you must create simlink to libatiocl64.so in /usr/lib/OpenCL/vendors directory. read Getting Started in docs.

0 Likes
nikkej
Journeyman III

Thanks, nou!

Did help a lot. Now I'm facing that same Segmentation fault as in Problem by running HelloCP post.

0 Likes

Nikke,

Fedora 11 is not officially supported currently. You might face issues running OpenCL in it. However users have been trying to run OpenCL in Fedora11, a search on older post could give you more info.

0 Likes

Omkaranathan,

I understand, thanks. I'll check if I can hack my system to the state where these things start to work, and if not, I swap over to some of the supported distros (OpenSUSE f.ex, I have DVD on my desk already 😉


-nikke

0 Likes

Hi all!

Adding nopat option to kernel boot parameters did help on my system so now I'm able to run CAL and OpenCL examples without errors even on my Fedora 11.

-nikke

0 Likes

I had this problem fixed by the symlinks to libatiocl64.so and libatiocl32.so.

My actual problem was that the pdf docs give the wrong source directory for the symlink!  They say "[INSTALLDIR]/x86/libatiocl32.so" and "[INSTALLDIR]/x86_64/libatiocl64.so" but the actual files are in "[INSTALLDIR]/lib/x86/libatiocl32.so" and "[INSTALLDIR]/lib/x86_64/libatiocl64.so"

Check that you know EXACTLY where the source file for the symlink is before you create it, because if it's wrong, it'll fail without an error

0 Likes

Originally posted by: stevedcc I had this problem fixed by the symlinks to libatiocl64.so and libatiocl32.so.

 

My actual problem was that the pdf docs give the wrong source directory for the symlink!  They say "[INSTALLDIR]/x86/libatiocl32.so" and "[INSTALLDIR]/x86_64/libatiocl64.so" but the actual files are in "[INSTALLDIR]/lib/x86/libatiocl32.so" and "[INSTALLDIR]/lib/x86_64/libatiocl64.so"

 

Check that you know EXACTLY where the source file for the symlink is before you create it, because if it's wrong, it'll fail without an error

 

Stevedcc,

              Thanks for reporting this.  we caught and ifxed interally this typo

0 Likes