10 Replies Latest reply on Mar 3, 2012 7:48 AM by pasniak

    Garbage at end of build log




      I'm really wondering if no one else is seeing this as I've read no reports about it yet: I'm always seeing garbage at the end of a build log. It looks like



      C:\Users\SEBAST~1\AppData\Local\Temp\OCL7E3F.tmp.cl(9): error: bad argument

      type to opencl image op: expected write_only image type

      write_imagef(output, pos, pixel);


      1 error detected in the compilation of "C:\Users\SEBAST~1\AppData\Local\Temp\OCL7E3F.tmp.cl".





      As I'm not seeing any garbage for other OpenCL drivers with the same code I doubt there's a bug in my code (I'm using the Khronos C++ wrapper).

      Is anyone else having garbage at the end of the build log?

        • Garbage at end of build log
          Couldn't you please post your build-log printing code? I guess there can be issue with CRLF -> LF conversion, because you have exactly 4 garbage characters which corresponds with 4 lines of the log.
            • Garbage at end of build log

              This is the code I'm using (I haven't said it explicitly yet, but I'm on Windows, by the way):

              cl::STRING_CLASS log=g_program->getBuildInfo(devices[d]);
              printf("[%s] Error: Device %d build log:\n%s",getName(),d,log.c_str());

              I already debugged into the C++ wrapper and saw that the buffer returned by the underlying call to clGetProgramBuildInfo() already contains garbage at the end.

              I believe this is because the buffer size returned by

              ::size_t required;
              cl_int err = clGetProgramBuildInfo(CL_PROGRAM_BUILD_LOG, 0, NULL, &required);

              is too big, probably because it counts newlines as \r\n (two chars) instead of just \n (one char). So I think you're right, pulec, the number of garbage chars I'm seeing much matches the numer of valid lines in the build log.

            • Re: Garbage at end of build log

              same in KernelAnalyzer 1.11.1172 / SDK 2.6. trash seems to appear when there are warnings from the compiler.