Results 1 to 4 of 4

Thread: clBuildProgram return -45 error

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    3

    clBuildProgram return -45 error

    Hi,
    I wrote some kernels and now I am testing them.
    Whole program (C++ & 2 kernels) is working fine when it is executed on AMD based environment (OpenCL compiled for CPU, GPU, everything is fine). But on NVidia (both linux and windows, both CPU and GPU), clBuildProgram returns error -45 (CL_INVALID_PROGRAM_EXECUTABLE) for all kernels, but other programs and kernels are running fine on same machine. I have tested it on more computers. When kernels are compiled in simpler program, but with same compiling procedure, compilation is successful.

    Are there any general reasons, why kernels cannot be compiled with nvidia drivers?
    Anyone have any idea, what I have to do to compile it?
    Thanks a lot
    stopa

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

    Re: clBuildProgram return -45 error

    Have you tried querying the build log with clGetProgramBuildInfo(..., CL_PROGRAM_BUILD_LOG, ...)?

    Have you passed a notify function "pfn_notify" to clCreateContext()?
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    3

    Re: clBuildProgram return -45 error

    my bad
    clBuildProgram is OK. clCreateKernel returns this error.

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

    Re: clBuildProgram return -45 error

    clCreateKernel returns CL_INVALID_PROGRAM_EXECUTABLE.
    That means that the program has compiled with errors. Check the build log as I mentioned earlier. Just because clBuildProgram() returned CL_SUCCESS it doesn't mean that compilation was successful -- yes, it's a bit counterintuitive. The way to know whether compilation was successful is to call clGetProgramBuildInfo(..., CL_PROGRAM_BUILD_STATUS, ...)

    The reason clBuildProgram() works like that is because in some (most?) OpenCL implementations, clBuildProgram() runs in separate threads for best performance.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. error in the clBuildProgram
    By caravel_6 in forum OpenCL
    Replies: 1
    Last Post: 09-08-2010, 09:03 AM
  2. clBuildProgram return 1
    By matrem in forum OpenCL
    Replies: 16
    Last Post: 01-11-2010, 07:13 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
  •