thehazard

clGetPlatformIDs failing - "Error: clGetPlatformIDs failed. Error code : unknown error code"

Discussion created by thehazard on Jan 17, 2010
Latest reply on Jan 23, 2010 by genaganna
I cannot get any of the samples to run properly because of the error message above

 

 

Hi everybody,

 

I got the SDK and compiled it on Linux (ubuntu 9.10 x86_64 installed on /usr/local/src/ati-stream-sdk-v2.0-lnx64). It all compiled well (after a little hack on one of the samples because of a missing header). I'm using a Radeon 5770. More debug info can be found on: atisysteminfo-report.txt

After successfuly building the libs and includes and samples and everything, I just copied them over to Ubuntu's directories:

 

root@niceguy:/usr/lib64# ls -la /usr/lib | grep '2010-01-17'

drwxr-xr-x 250 root root    98304 2010-01-17 03:48 .

-rwxr-xr-x   1 root root  9554348 2010-01-17 02:33 builtins_amdil_opt.bc

-rwxr-xr-x   1 root root  5570188 2010-01-17 02:33 builtins_x86-64.bc

drwxr-xr-x   2 root root     4096 2010-01-17 03:48 dri

-rw-r--r--   1 root root   248245 2010-01-17 03:48 libatiadlxx.so

-rw-r--r--   1 root root   229566 2010-01-17 03:48 libaticalcl.so

-rw-r--r--   1 root root  6149488 2010-01-17 03:48 libaticaldd.so

-rw-r--r--   1 root root   238718 2010-01-17 03:48 libaticalrt.so

-rwxr-xr-x   1 root root 10782944 2010-01-17 02:33 libatiocl64.so

-rw-r--r--   1 root root    10386 2010-01-17 03:48 libfglrx_dm.a

-rw-r--r--   1 root root    16242 2010-01-17 03:48 libfglrx_dm.so.1.0

-rw-r--r--   1 root root     7792 2010-01-17 03:48 libfglrx_gamma.a

-rw-r--r--   1 root root    13935 2010-01-17 03:48 libfglrx_gamma.so.1.0

-rw-r--r--   1 root root     5602 2010-01-17 03:48 libfglrx_tvout.a

-rw-r--r--   1 root root     8304 2010-01-17 03:48 libfglrx_tvout.so.1.0

-rwxr-xr-x   1 root root   454362 2010-01-17 02:33 libGLEW.a

-rwxr-xr-x   1 root root   428135 2010-01-17 02:33 libGLEW.so

lrwxrwxrwx   1 root root       23 2010-01-17 03:48 libGL.so -> /usr/lib64/libGL.so.1.2

lrwxrwxrwx   1 root root       23 2010-01-17 03:48 libGL.so.1 -> /usr/lib64/libGL.so.1.2

-rw-r--r--   1 root root   762392 2010-01-17 03:48 libGL.so.1.2

-rwxr-xr-x   1 root root   753434 2010-01-17 02:33 libglut.so

-rwxr-xr-x   1 root root    22792 2010-01-17 02:33 libOpenCL.so

-rwxr-xr-x   1 root root   930560 2010-01-17 02:33 libSDKUtil.a

root@niceguy:/usr/lib64# 

 

Then I did the same with the includes:

 

root@niceguy:/usr/local/include# ls -la /usr/local/include

total 136

drwxr-xr-x  5 root root  4096 2010-01-17 02:38 .

drwxr-xr-x 10 root root  4096 2010-01-17 02:24 ..

-rwxr-xr-x  1 root root 13095 2010-01-17 02:38 calcl.h

-rwxr-xr-x  1 root root  7980 2010-01-17 02:38 cal_ext_counter.h

-rwxr-xr-x  1 root root  6892 2010-01-17 02:38 cal_ext_d3d10.h

-rwxr-xr-x  1 root root  8442 2010-01-17 02:38 cal_ext_d3d9.h

-rwxr-xr-x  1 root root 13873 2010-01-17 02:38 cal_ext.h

-rwxr-xr-x  1 root root 54041 2010-01-17 02:38 cal.h

drwxr-xr-x  2 root root  4096 2010-01-17 02:38 CL

drwxr-xr-x  2 root root  4096 2010-01-17 02:38 GL

drwxr-xr-x  2 root root  4096 2010-01-17 02:38 SDKUtil

root@niceguy:/usr/local/include# 

 

So I was able to build some stuff that uses OpenCL successfuly, but it didn't work giving out an error message "Could not retrieve OpenCL device IDs.".

 

I'm also unable to run the samples. For example:

 

root@niceguy:/usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/opencl/bin/x86_64# ldd AESEncryptDecrypt

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

libpthread.so.0 => /lib/libpthread.so.0 (0x00007f37bfb9d000)

libdl.so.2 => /lib/libdl.so.2 (0x00007f37bf999000)

libOpenCL.so => /usr/lib/libOpenCL.so (0x00007f37bf793000)

libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f37bf483000)

libm.so.6 => /lib/libm.so.6 (0x00007f37bf1ff000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f37befe8000)

libc.so.6 => /lib/libc.so.6 (0x00007f37bec79000)

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

librt.so.1 => /lib/librt.so.1 (0x00007f37bea71000)

root@niceguy:/usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/opencl/bin/x86_64# ./AESEncryptDecrypt

 

Encrypting Image ....

 

Input Image : lena512.bmp

 

Key : 15 201 51 89 92 34 96 66 11 225 161 96 81 211 108 124 

 

Error: clGetPlatformIDs failed. Error code : unknown error code

 

root@ niceguy:/usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/opencl/bin/x86_64# 

 

All OpenCL samples fail with the same error message. The Cal samples don't work either:

 

root@niceguy:/usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/cal/bin/x86_64# ldd FindNumDevices 

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

libpthread.so.0 => /lib/libpthread.so.0 (0x00007f7a25ae2000)

libdl.so.2 => /lib/libdl.so.2 (0x00007f7a258de000)

libaticalrt.so => /usr/lib/libaticalrt.so (0x00007f7a25dd6000)

libaticalcl.so => /usr/lib/libaticalcl.so (0x00007f7a257c0000)

libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f7a254b0000)

libm.so.6 => /lib/libm.so.6 (0x00007f7a2522c000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f7a25015000)

libc.so.6 => /lib/libc.so.6 (0x00007f7a24ca6000)

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

librt.so.1 => /lib/librt.so.1 (0x00007f7a24a9e000)

libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f7a2488c000)

libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f7a24556000)

libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f7a24353000)

libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f7a24137000)

libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f7a23f32000)

root@niceguy:/usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/cal/bin/x86_64# ./FindNumDevices -v 

Supported CAL Runtime Version: 1.3.185

Found CAL Runtime Version: 1.4.515

Use -? for help

Segmentation fault

 

root@niceguy:/usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/cal/bin/x86_64# gdb ./FindNumDevices 

GNU gdb (GDB) 7.0-ubuntu

Copyright (C) 2009 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>...

Reading symbols from /usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/cal/bin/x86_64/FindNumDevices...done.

(gdb) run

Starting program: /usr/local/src/ati-stream-sdk-v2.0-lnx64/samples/cal/bin/x86_64/FindNumDevices 

[Thread debugging using libthread_db enabled]

Supported CAL Runtime Version: 1.3.185

Found CAL Runtime Version: 1.4.515

Use -? for help

 

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff5a38a9a in ?? () from /usr/lib/libaticaldd.so

(gdb) 

 

 

About the lib file:

/usr/lib/libaticaldd.so:     file format elf64-x86-64

/usr/lib/libaticaldd.so

architecture: i386:x86-64, flags 0x00000150:

HAS_SYMS, DYNAMIC, D_PAGED

start address 0x000000000008a6c0

 

Does anyone here know how I can fix this ? Let me know if you need more debug info.

 

Thanks !





 

ddd

Outcomes