Results 1 to 4 of 4

Thread: What is error -5 : out of resource

  1. #1
    Junior Member
    Join Date
    Apr 2010

    What is error -5 : out of resource

    I have this kind of error while compiling the kernel

    but I really don't find any syntex error in my code.

    what shall be the problem?

    error -5 : out of resource

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

    Re: What is error -5 : out of resource

    The problem you see is not due to a syntax error. It is happening because your kernel is consuming too many resources. What does that mean? Typically it could be local memory, but it could be other things like private memory (general-purpose registers), constants, etc.

    If compilation failed, the best way to know what is the problem is looking into the program build log. Try doing something like this:

    Code :
    cl_char build_log;
    size_t log_len;
    cl_int errcode = clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_len);
    if(errcode) panic();
    build_log = calloc(log_len + 1, sizeof(cl_char));
    errcode = clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, log_len, build_log, NULL);
    if(errcode) panic();
    printf("Build log: %s\n", build_log);
    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 2010

    Re: What is error -5 : out of resource


    I'll try this! have a good day!

  4. #4

    Re: What is error -5 : out of resource

    For example, imagine you are working with a graphics card with 512Mb of memory, and you're trying to pass to your kernel a cl_int array with size of 50000*10000. Making some calculations.. you're trying to pass it more than 1,86 gigabytes!

Similar Threads

  1. Replies: 1
    Last Post: 01-29-2013, 07:45 AM
  2. Any OpenMax resource?
    By zcao in forum OpenMAX
    Replies: 2
    Last Post: 03-03-2006, 02:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean