cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

nibal
Challenger

Clinfo crashes in Ubuntu 14.04 x64

My Ubuntu 14.04 x64 worked fine right from the bat. Then i decided to install Windows as well, and made it dual boot. Bad call. Windows installer trashed my Ubuntu and couldn't login to it anymore. Had to reinstall Ubuntu and recover from backups.

Unfortunately, this time AMD ocl didn't like it. I installed the 2.9,.1 SDK again. At first clinfo worked partially. Could only see my CPU as ocl device. I have a radeon Saphari R290 video card, and my CPU is AMD FX-8320 8-core. Thinking that it could be an installation problem, I removed the /opt/AMDAPPSDK directory and its contents, and reinstalled. I have tried it a few times, but since then clinfo crashes:

DrWho:~/work/radeon/openCL-> clinfo

terminate called after throwing an instance of 'cl::Error'

  what(): clGetPlatformIDs

Aborted (core dumped)

ldd shows clinfo linking to the correct libOpenCL.so:

DrWho:~/work/radeon/openCL-> ldd $(which clinfo)

linux-vdso.so.1 => (0x00007fffe2600000)

libOpenCL.so.1 => /opt/AMDAPPSDK-2.9-1/lib/x86_64/libOpenCL.so.1 (0x00007f6b6e4e0000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6b6e2a0000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6b6df98000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6b6dd90000)

libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6b6db78000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6b6d7b0000)

/lib64/ld-linux-x86-64.so.2 (0x00007f6b6e6f0000)

nm shows that  /opt/AMDAPPSDK-2.9-1/lib/x86_64/libOpenCL.so.1 (0x00007f6b6e4e0000) defines clGetPlatformIDs:

DrWho:~-> nm -D /opt/AMDAPPSDK-2.9-1/lib/x86_64/libOpenCL.so.1 | grep clGetPlatformIDs
0000000000003f00 T clGetPlatformIDs

Finally strace shows that clinfo correctly opens and reads the right libOpenCL.so.1:

.

.

.

open("/opt/AMDAPPSDK-2.9-1/lib/x86_64/libOpenCL.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 $\0\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=27352, ...}) = 0

mmap(NULL, 2122648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6265c0000

mprotect(0x7fa6265c6000, 2097152, PROT_NONE) = 0

mmap(0x7fa6267c6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fa6267c6000

close(3)

.

.

.

fcntl(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)

fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

fcntl(1, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)

fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)

fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)

fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

openat(AT_FDCWD, "/home/nikos/AMDAPPSDK-2.9-1/etc/OpenCL/vendors/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

futex(0x7fa6267c6390, FUTEX_WAKE_PRIVATE, 2147483647) = 0

futex(0x7fa625e8d850, FUTEX_WAKE_PRIVATE, 2147483647) = 0

write(2, "terminate called after throwing "..., 48terminate called after throwing an instance of ') = 48

write(2, "cl::Error", 9cl::Error) = 9

write(2, "'\n", 2') = 2

write(2, " what(): ", 11 what(): ) = 11

write(2, "clGetPlatformIDs", 16clGetPlatformIDs) = 16

write(2, "\n", 1) = 1

rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 😎 = 0

tgkill(3200, 3200, SIGABRT) = 0

--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=3200, si_uid=1000} ---

+++ killed by SIGABRT (core dumped) +++

Aborted (core dumped)

What is wrong and how can I have clinfo back? Note that hardware or linux distro hasn't changed since last time that it worked without a problem 😞

0 Likes
1 Solution
nibal
Challenger

Update:

1 of the SDK reinstalls I did was as a simple user. I didn't remove the exported globals in my .bashrc, didn't know about them, so this created the crashes.

However, the original problem still remains. clinfo recognizes only my CPU and not my video card as a valid ocl device.

This is a different problem, though. I will mark this thread answered and start a new one for that.

View solution in original post

0 Likes
1 Reply
nibal
Challenger

Update:

1 of the SDK reinstalls I did was as a simple user. I didn't remove the exported globals in my .bashrc, didn't know about them, so this created the crashes.

However, the original problem still remains. clinfo recognizes only my CPU and not my video card as a valid ocl device.

This is a different problem, though. I will mark this thread answered and start a new one for that.

0 Likes