Closed PhilippWph closed 5 years ago
I'm not sure I'd expect this to work at all with the Ubuntu/Debian package, since it only provides liboclgrind-rt.so
and not liboclgrind-rt-icd.so
which has the ICD compatible interface. You could try downloading the prebuilt binaries from the GitHub releases page which does provide the liboclgrind-rt-icd.so
library, but I haven't tested the ICD interface with that lately.
Thanks for the fast reply. I tried to use the binary (liboclgrind-rt-icd.so) and created an ICD file that directs to this library. However then no platform is detected at all (in my program and in clinfo
).
How do you debug your host code? Using oclgrind
in Eclipse is not a big issue for me, however I would like to use Eclipse to debug the host code (only).
Weird, I get the same thing (no platforms) if I use the Ubuntu-provided ICD loader (ocl-icd-libopencl1
), but if I use the official Khronos ICD loader it works just fine. I'll keep digging.
I believe the issue with Oclgrind not showing up with the Ubuntu provided ICD loader (ocl-icd) should have been fixed via #161.
Hello @jrprice, I experience a segmentation fault when I use the ICD file in /etc/OpenCL/vendors. My program works if I use oclgrind directly. First of all some facts:
/usr/lib/oclgrind/liboclgrind-rt.so
clinfo
works, in both cases this means with the ICD file in /etc/OpenCL/vendors as well as by usingoclgrind
directly.oclgrind
works.Here is a small walkthrough through may program (VectorAddition, it calculates simply a+b=c for vectors):
CL_DEVICE_TYPE_CPU
(by the way, the device is found)And that's exactly where the segmentation fault happens.
Please let me know if I can provide you with any further information. For me the usage of oclgrind directly is fine. However it would be nice if the ICD file solution would work. My primary concern is that I want to develop and debug (the host code) from Eclipse C++. I was able to configure a run configuration but did not manage to create a debug configuration. So if you know a possibility for a gdb-based Eclipse debug configuration this would also solve this issue for me.
Best regards, viswph