cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

awkehwe82397rfaowUI
Journeyman III

Printf outputs incorrect numbers in Stream SDK 2.0 Final

I think I've stumbled onto a bug with the printf function in OpenCL with the ATI Stream SDK 2.0 Final. If you look at the attached code for a sample kernel, you would expect it to output

Decimals: 1977 65000

However, it does not. Instead I get:

Decimals: 8 515546592

which is simply wrong. Is this a known bug? I was hoping to use printf to help with debugging.

__kernel void TestKernel() { int nIndex = get_global_id(0); if (nIndex == 0) printf ("Decimals: %d %ld\n", 1977, 650000L); }

0 Likes
3 Replies
genaganna
Journeyman III

Awkehwe82397rfaowUI,

    It is a know bug in windows. printf is not supported in windows yet. I am sure you are using windows.  Printf should work in linux.  Please give us your system details if you are using linux system.

 

0 Likes

Yes, I am using Windows. I will go with another route for debugging.

0 Likes

Awkehwe82397rfaowUI,

      Please use 32 bit platform when you use printf for debugging. printf works fine with 32 bit platform.

0 Likes