Hi,I'm trying to excute the example OpenCL Library (Exemple 1) (Link Below). I generated my excutable file for My FPGA Arria 10. Then I get this message when I execute : Segmentation fault (core dumped).! What does it mean ? How I can find the error knowing that I follwed all steps and it works well. https://www.altera.com/support/support-resources/design-examples/design-software/opencl/library-desi... Thank You.
Segmentation faults usually occur when the executable tries to access a memory it does not have access to and may be difficult to debug (such as accessing data past a pointer's allocated space). The example should work out of the box if the binary is generated and in the expected location for the host to find. Otherwise using a debugger would be helpful to find out where the segfault is happening.
Thank you ,The example 1 doesn't' work and the binary file is generated successfully. Note that I'm using a Nallatech Board with Arria 10 FPGA and SDK for Opencl under Linux OS. Which debugger you use ?
I normally use gdb which i found to be pretty helpful. If you run it on your host application, you'll need to ignore interrupts otherwise it will treat them as breakpoints for SIG44 and SIG64 (https://www.altera.com/en_us/pdfs/literature/hb/opencl-sdk/aocl_programming_guide.pdf#_opentopic_toc...) or just continue whenever you hit a break from the interrupt signal. Then you can use a backtrace (bt) when the debugger hits the seg fault and it can tell you what line it is occurring on.Also you'll need to add the -g flag to gcc to enable debug info to get more meaningful information from gdb.