cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

quadboon
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

worked fine with SDK 2.4, but is broken now with SDK 2.5:

easy to reproduce for everyone:

download clbinary.zip from here: http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=115

$ unzip clbinary.zip
Archive:  clbinary.zip
  inflating: clbinarygen.c           
  inflating: clbinaryuse.c         

 

$ gcc -o clbinarygen clbinarygen.c -I /opt/AMDAPP/include -lOpenCL -L /opt/AMDAPP/lib/x86_64 -g
clbinarygen.c: In function ‘main’:
clbinarygen.c:180:18: warning: comparison between pointer and integer
clbinarygen.c:213:5: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘size_t’
clbinarygen.c: In function ‘printDeviceList’:
clbinarygen.c:329:9: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘cl_device_type’

$ echo '__kernel void very_big_kernel () { }' > kernel.cl

$ ulimit -c 999999999

$ ./clbinarygen
Reading in program from kernel.cl
Number of platforms found: 1
Found AMD platform
Segmentation fault (core dumped)

$ gdb ./clbinarygen core
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2

.

.

(gdb) bt
#0  0x00007f212d733b1e in ?? () from /usr/lib/libaticaldd.so
#1  0x00007f212d736651 in ?? () from /usr/lib/libaticaldd.so
#2  0x00007f212d6dfa5d in ?? () from /usr/lib/libaticaldd.so
#3  0x00007f212d6dfd56 in ?? () from /usr/lib/libaticaldd.so
#4  0x00007f212d6e1e57 in ?? () from /usr/lib/libaticaldd.so
#5  0x00007f212d8a752b in ?? () from /usr/lib/libaticaldd.so
#6  0x00007f212d6903aa in ?? () from /usr/lib/libaticaldd.so
#7  0x00007f212d691be2 in ?? () from /usr/lib/libaticaldd.so
#8  0x00007f212f56484a in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#9  0x00007f212f56edec in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#10 0x00007f212f5729c3 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#11 0x00007f212f53c25d in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#12 0x00007f212f58e565 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#13 0x00007f212f532252 in clBuildProgram () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#14 0x0000000000400fd2 in main () at clbinarygen.c:206

Tags (3)
0 Likes
10 Replies
quadboon
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

did i miss anything to report?

0 Likes
genaganna
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

Originally posted by: quadboon did i miss anything to report?

 

Could you please give following informaiton also?

OS, Driver version.

 

Could you please try following at your end and let us know what is happeing?

./Reduction --dump binaryName

 

 

0 Likes
quadboon
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

Simple Ubuntu Natty 64 bit without any modifications, Catalyst 11.7, SDK 2.5

$ uname -a
Linux sf 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cpuinfo
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 6000+

$ gcc -v
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

--

Sorry, but I can not post info about that requested "./Reduction --dump binaryName" thing since i had to switch back to v2.4 and cat 11.6. Had to continue developing and no extra testing system.

0 Likes
nou
Exemplar

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

got segfault. here is backtrace from gdb.

#0  0x00007ffff401ab1e in ?? () from /usr/lib/fglrx/libaticaldd.so
#1  0x00007ffff401d651 in ?? () from /usr/lib/fglrx/libaticaldd.so
#2  0x00007ffff3fc6a5d in ?? () from /usr/lib/fglrx/libaticaldd.so
#3  0x00007ffff3fc6d56 in ?? () from /usr/lib/fglrx/libaticaldd.so
#4  0x00007ffff3fc8e57 in ?? () from /usr/lib/fglrx/libaticaldd.so
#5  0x00007ffff418e52b in ?? () from /usr/lib/fglrx/libaticaldd.so
#6  0x00007ffff3f773aa in ?? () from /usr/lib/fglrx/libaticaldd.so
#7  0x00007ffff3f78be2 in ?? () from /usr/lib/fglrx/libaticaldd.so
#8  0x00007ffff56aa84a in ?? () from /usr/lib/libamdocl64.so
#9  0x00007ffff56b4dec in ?? () from /usr/lib/libamdocl64.so
#10 0x00007ffff56b89c3 in ?? () from /usr/lib/libamdocl64.so
#11 0x00007ffff568225d in ?? () from /usr/lib/libamdocl64.so
#12 0x00007ffff56d4565 in ?? () from /usr/lib/libamdocl64.so
#13 0x00007ffff5678252 in clBuildProgram () from /usr/lib/libamdocl64.so
#14 0x00000000004071c0 in Reduction::genBinaryImage (this=0x7fffffffdf80) at Reduction.cpp:976
#15 0x0000000000408e25 in main (argc=3, argv=0x7fffffffe188) at Reduction.cpp:1349

system ubuntu natty.

EDIT: just tryed with Ubuntu 10.10 and it works fine there. i think that 11.04 is just broke some stuff so AMD OpenCL dont work properly.

0 Likes
gat3way
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

Crashes for me too.

BTW I am not using Ubuntu, but Debian testing.

0 Likes
genaganna
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

Originally posted by: nou got segfault. here is backtrace from gdb.

 

#0  0x00007ffff401ab1e in ?? () from /usr/lib/fglrx/libaticaldd.so #1  0x00007ffff401d651 in ?? () from /usr/lib/fglrx/libaticaldd.so #2  0x00007ffff3fc6a5d in ?? () from /usr/lib/fglrx/libaticaldd.so #3  0x00007ffff3fc6d56 in ?? () from /usr/lib/fglrx/libaticaldd.so #4  0x00007ffff3fc8e57 in ?? () from /usr/lib/fglrx/libaticaldd.so #5  0x00007ffff418e52b in ?? () from /usr/lib/fglrx/libaticaldd.so #6  0x00007ffff3f773aa in ?? () from /usr/lib/fglrx/libaticaldd.so #7  0x00007ffff3f78be2 in ?? () from /usr/lib/fglrx/libaticaldd.so #8  0x00007ffff56aa84a in ?? () from /usr/lib/libamdocl64.so #9  0x00007ffff56b4dec in ?? () from /usr/lib/libamdocl64.so #10 0x00007ffff56b89c3 in ?? () from /usr/lib/libamdocl64.so #11 0x00007ffff568225d in ?? () from /usr/lib/libamdocl64.so #12 0x00007ffff56d4565 in ?? () from /usr/lib/libamdocl64.so #13 0x00007ffff5678252 in clBuildProgram () from /usr/lib/libamdocl64.so #14 0x00000000004071c0 in Reduction::genBinaryImage (this=0x7fffffffdf80) at Reduction.cpp:976 #15 0x0000000000408e25 in main (argc=3, argv=0x7fffffffe188) at Reduction.cpp:1349

 

system ubuntu natty.

 

EDIT: just tryed with Ubuntu 10.10 and it works fine there. i think that 11.04 is just broke some stuff so AMD OpenCL dont work properly.

 

I hope you are using SDK2.5 and latest driver on Ubuntu 10.10.

0 Likes
k1942t
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

SDK 2.5 lists up some unknown devices. (Lions,Tigers,Bears)

It causes driver SEGV.

You can compile cl file to binary with my tool below.

http://code.google.com/p/utilities-for-amd-app-sdk/downloads/detail?name=clc-offline-0.1.zip&can=2&q=

 

0 Likes
yiuin
Journeyman III

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

I also get a segfault when I try to build using a variable length struct. ie:

 

struct Test {

int a;

float b[0];

}

 

__kernel testkernel(__global const Test* test)

{

test->b[0];

}

 

causes the compiler to segfault.

0 Likes
MicahVillmow
Staff
Staff

SDK 2.5 + CL_CONTEXT_OFFLINE_DEVICES_AMD = broken

This is a known issue and should be fixed in the net release. Thanks for reporting this.
0 Likes