Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: opencl build error..!!

  1. #1

    opencl build error..!!

    I face to opencl program build error.
    This erro is "CL_BUILD_PROGRAM_FAILURE".
    I read the document of opencl 1.0.43 provide by KHRONOS.

    "CL_BUILD_PROGRAM_FAILURE if there is a failure to build the program executable.
    This error will be returned if clBuildProgram does not return until the build has
    completed."

    But I don't know why this error is occured. Before I builded to command window, it isn't occured any error.
    I builded to mfc, however, it is occured cl_build_program_failure error.

    Is my soruce code wrong or miss anything??

  2. #2
    Junior Member
    Join Date
    Mar 2010
    Posts
    22

    Re: opencl build error..!!

    Are you sure your openCL kernel it's OK? Try commenting the code of the kernel and seeing if compile. If it happens, there is a kernel code error, with CL_PROGRAM_BUILD_STATUS flag in clGetProgramBuildInfo you can check where is the problem.

  3. #3

    Re: opencl build error..!!

    Quote Originally Posted by santtt
    Are you sure your openCL kernel it's OK? Try commenting the code of the kernel and seeing if compile. If it happens, there is a kernel code error, with CL_PROGRAM_BUILD_STATUS flag in clGetProgramBuildInfo you can check where is the problem.
    I attempt "clGetProgramBuildInfo()" before, and I got this information.
    :160: error: expected identifier or '('

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    22

    Re: opencl build error..!!

    It seems that you have an kernel code error, i suggest you that read de code in the line that appear in the error and look for an error in the neighborhood.

  5. #5

    Re: opencl build error..!!

    Quote Originally Posted by santtt
    It seems that you have an kernel code error, i suggest you that read de code in the line that appear in the error and look for an error in the neighborhood.
    When I build the same opencl kernel source in command(with c), it never occured error.
    But now, I build with mfc, it is occured error. (opencl kernel source is same!!)
    Therefore I don't understand in this situation..

  6. #6
    Junior Member
    Join Date
    Mar 2010
    Posts
    22

    Re: opencl build error..!!

    Do you have multiples kernels on the opencl kernel file? If that, try to make a file with only one kernel.

  7. #7

    Re: opencl build error..!!

    Quote Originally Posted by santtt
    Do you have multiples kernels on the opencl kernel file? If that, try to make a file with only one kernel.
    No I don't have multiples kernels on the opencl kernel file..
    It has only one kernel.

    I want to complie opencl from mfc project. Is it a problem??

  8. #8
    Junior Member
    Join Date
    Mar 2010
    Posts
    22

    Re: opencl build error..!!

    sorry, mfc? what is that?

  9. #9

    Re: opencl build error..!!

    Quote Originally Posted by santtt
    sorry, mfc? what is that?
    MFC is Microsoft Foundation Class Library in windows.

    The Microsoft Foundation Class Library (also Microsoft Foundation Classes or MFC) is a library that wraps portions of the Windows API in C++ classes, including functionality that enables them to use a default application framework.
    Classes are defined for many of the handle-managed Windows objects and also for predefined windows and common controls.

  10. #10
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: opencl build error..!!

    I suggest doing as santtt says and looking around line 160 to see what is wrong with the kernel source that is producing error: expected identifier or '('

    Maybe the kernel code is not exactly what you think and that's why it's producing an error now. MFC should have nothing to do with the error you are seeing.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Page 1 of 2 12 LastLast

Similar Threads

  1. error to build program executable
    By zovasili in forum OpenCL
    Replies: 6
    Last Post: 01-15-2013, 08:59 AM
  2. Program Build Error
    By dlw in forum OpenCL
    Replies: 5
    Last Post: 06-28-2011, 12:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •