Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Chapter 16 Example #67

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment
Open

Problem Chapter 16 Example #67

GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I am trying to run the example code from chapter 16 on a 2011 macbook pro.
If i use cmake and generate unix make files i get an abort trap in the program. 
On the other hand, if i run it with Xcode, the --ref runs well (6.4s) but all 
the other ones crash and give the following errors


Line 229 in File 
/Users/tomcool/opencl-book-samples-read-only/src/Chapter_16/Dijkstra/oclDijkstra
Kernel.cpp


with lines 228 and 229 being
errNum = clEnqueueNDRangeKernel(commandQueue, initializeKernel, 1, NULL, 
&globalWorkSize, &localWorkSize,
                                    0, NULL, NULL);
    checkError(errNum, CL_SUCCESS);

Would you have any idea as to what the problem could be?
Thanks
T.


Original issue reported on code.google.com by [email protected] on 17 Feb 2012 at 2:57

@GoogleCodeExporter
Copy link
Author

If you add the lines below to runDijkstra you'll find localWorkSize is actually 
smaller than the value returned by the CL_DEVICE_MAX_WORK_GROUP_SIZE check.

    size_t kernelLocalSize;
    errNum = clGetKernelWorkGroupInfo(initializeBuffersKernel, deviceId, CL_KERNEL_WORK_GROUP_SIZE, sizeof(kernelLocalSize), &kernelLocalSize, NULL);

The enqueue function will fail if the localWorkSize is larger than 
kernelLocalSize.

Original comment by [email protected] on 23 Feb 2012 at 8:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant