cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Marix
Adept II

Compiling with debug info on SDK 2.2

Is it possible to use "-g" as a compiler flag (for CPU target) on SDK 2.2? If I do there seems to be a memory leak, with clc consuming more and more memory until it finally fails to allocate more memory:

Exit code of clBuildProgram is -11.

Build log ist:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

My system is openSUSE 11.2 with Catalist 10.7, 10.8 and 10.9 tried.

It seems to be ok for small source files (like hellocl), but runs into this error for larger ones.

As it works for smaller files it might be that I am using something special causing this behaviour. Did somebody else observe such a behaviour?

0 Likes
4 Replies
himanshu_gautam
Grandmaster

Marix,

Refer to OpenCL Programming Guide Ch-3 Debugging.

Error -11 means Kernel Compilation Error.

Please Post Your code or a suitable test case.

Thanks

0 Likes

Took me a while to really narrow down the problem. Seems like the following code cannot be compiled with "-g" while it is accepted by clc when not using "-g"

The second array dimension and the pointer are essential. With only one or without the pointer it works.

typedef float float33[3][3]; void dummy(__local float33* foo ) { return; }

0 Likes

The problem can also be caused with the following code.

typedef float float33[3][3]; __kernel void dummy( ) { __local float33 buffer[64]; return; }

0 Likes

Originally posted by: Marix The problem can also be caused with the following code.

 

We reported this issue to developers. Thanks for giving this test case.

0 Likes