cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

gopal1234
Journeyman III

Why program is not displaying anything in CL_PROGRAM_BUILD_LOG param to get log info, while using clGetProgramBuildInfo() ?

I am using ATI RV770 graphics card, OpenCl 1.0 and ati-stream-sdk-v2.3-lnx64 on linux to write OpenCL programs.

everything went fine, but at the line "clBuildProgram(program, num_devices, devices_id, options, NULL, NULL);".  I am getting error "program failed to Build". To check errors of kernel code I used following function ....

if(clBuildProgram(program, num_devices, devices_id, options, NULL, NULL) != CL_SUCCESS)

{

    printf("Error building program\n");

    char buffer[45339];

        size_t length = 0;

       err = clGetProgramBuildInfo(

                program,

                devices_id,

        CL_PROGRAM_BUILD_LOG,

                sizeof(buffer),

                buffer,

                &length

        );

if(err == CL_INVALID_DEVICE)

    printf("device\n");

if(err == CL_INVALID_VALUE)

    printf("value\n");

if(err == CL_INVALID_PROGRAM)

    printf("program\n");

        printf("BLANK???%s : %lu \n", buffer,length);

    return 1;

}

But Buffer string not printing anything why?

I also used malloc() to firstly get log_size as given below But it still not displaying anything....

printf("log_size = %lu\n", (unsigned long)log_size);    ////It is displaying the size 207326632960...

build_log = (char* )malloc((log_size+1));

0 Likes
0 Replies