View Full Version : 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
05-07-2010, 04:19 PM
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:
cl_int errcode = clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_len);
build_log = calloc(log_len + 1, sizeof(cl_char));
errcode = clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, log_len, build_log, NULL);
printf("Build log: %s\n", build_log);
I'll try this! have a good day! :)
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!
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.