Results 1 to 2 of 2

Thread: Facing problem in error -46 (CL_INVALID_KERNEL_NAME)

Hybrid View

  1. #1
    Newbie
    Join Date
    Aug 2013
    Posts
    1

    Facing problem in error -46 (CL_INVALID_KERNEL_NAME)

    When I am running my code it is returning the error:-46 which means the clCreateKernel () is not invoking and i checked the kernel name in my .cl file and in the host code but in both case it is same. But inside my .cl file I am finding some problem with the __kernel

    1. When I put my cursor on the __kernel it is flashing out with Error: this declaration has no storage class or type specifier
    2. cursor on the "jac_ker" it is flashing out with Error: incomplete type is not allowed
    3. cursor on the argument "__global" it is flashing out with Error: identifier __global is undefined
    4. cursor on the "double*" it is flashing out Error: expected a ")"

    __kernel void jac_ker(__global double* memobjA,
    __global double* memobjU,
    int k,int wA,int wU)

    I expect some immediate help.
    Thank You
    Ramanarayan
    Last edited by Dipu13; 08-13-2013 at 10:33 PM.

  2. #2
    Ramanarayan,

    It's hard to tell exactly what is going on here, but I have two things to consider:

    - First, it could be that your IDE (Visual Studio, Eclipse, etc.) doesn't recognize OpenCL C syntax. If that's the case, then the errors you see when you put your cursor on OpenCL C source may not really be errors to the OpenCL C compiler.
    - Second, perhaps the CL_INVALID_KERNEL_NAME error is being caused by errors in previous OpenCL API calls. For example, perhaps clCreateProgramWithSource and/or clBuildProgram are failing. Are you checking for errors on these calls?

    Hope this helps.

    Aaron

Posting Permissions

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