Results 1 to 3 of 3

Thread: How to display error code

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    10

    How to display error code

    Hi everyone,

    I'm having some trouble with the following function :
    Code :
    errNum = clEnqueueNDRangeKernel(commandQueue,kernel,1,NULL,globalWorkSize,localWorkSize,0,NULL,NULL);
        printf("errNum = %d\n",errNum);

    As you can see, I get the error code -52.

    It seems that each error code has a meaning ( CL_INVALID_MEM_OBJECT, CL_INVALID_PROGRAM and so far and so on)

    Is there a way to associate my -52 error to a meaning?
    for instance : -52 <=> CL_INVALID_BINARY

    I thank you beforehand for your answers

    Regards,

    Elrachal

  2. #2
    Junior Member
    Join Date
    May 2012
    Posts
    13

    Re: How to display error code

    I think I saw elsewhere that you're using Nvidia, but MacOS implementation has a header file called util_opencl.h with the following function in it
    Code :
    static char *print_cl_errstring(cl_int err)
    Personally though, I just have a copy of cl.h open and I can quickly run my eye down to the right error code.

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    10

    Re: How to display error code

    Personally though, I just have a copy of cl.h open and I can quickly run my eye down to the right error code
    That's optimal !!

    Thank you

Similar Threads

  1. clEnqueueNDRangeKernel, error code -54
    By a.mirzaean in forum OpenCL
    Replies: 2
    Last Post: 06-26-2012, 12:26 AM
  2. Error code -54
    By achinda99 in forum OpenCL
    Replies: 3
    Last Post: 11-27-2009, 12:07 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
  •