AnsweredAssumed Answered

Segmentation fault at clWaitForEvents

Question asked by ealbayrak on Apr 6, 2011
Latest reply on Aug 13, 2013 by himanshu.gautam

 

Hi I'm encountring with a segmentation fault right at clWaitForEvents line, and I copied the whole code from another code that I wrote and modified it for my new problem, the other code is working fine, but this one is throwing segmentation fault at clWaitForEvents line. I've checked every single line but still couldn't find the main reason.

Any ideas about it? has anybody encountered with a similar stuff?

Thank you for your help

Code:

globalThreads[0] = noOfTransactions;

    localThreads[0]  = 1;

    status = clEnqueueNDRangeKernel(

    commandQueue,

                 kernel_supportCounting,

                 1,

                 NULL,

                 globalThreads,

                 localThreads,

                 0,

                 NULL,

                 &events[0]);

    if(status != CL_SUCCESS) 

std::cout<< "Error: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)\n";

return 1;

}

 

status = clWaitForEvents(1, &events[0]);

    if(status != CL_SUCCESS) 

std::cout<<

   "Error: Waiting for kernel run to finish. (clWaitForEvents)\n"<< (CL_OUT_OF_RESOURCES == status);

return 1;

}



Outcomes