OpenCL multi-thread error: HAL Kern Error: Read failed from addr 20
Platform: terasic De10-nano (CycloneV soc)
Software version: OpenCL SDK 18.1, MMD version 14.1
Problem description: I am developing an application using multi-thread (while only one thread will run NDRange and execute the FPGA kernel) and got this error:
HAL Kern Error: Read failed from addr 20, read -1237012464 expected 4 HAL Kern Error: Read failed from addr 20, read -1237012464 expected 4 HAL Kern Error: Write failed to addr 1000 with value 0, wrote -1237012464 expected 4 HAL Kern Error: Write failed to addr 20 with value be80a2dc, wrote -1237012464 expected 4
Sometimes the program will be killed and sometimes will not.
I suspect it may due to multi-thread somehow, so I test the intel official example multithread_vector_operation (which is attached)
A similar error comes out but with only read failed.
HAL Kern Error: Read failed from addr 20, read -1234415600 expected 4
I used gdb to debug this and found out the SIG44 was received when two threads were at clWaitForEvents().
I notice that someone already asked a similar question and mentioned that it may be due to the obsolete MMD library. But I saw that all csoc5 RTE are with MMD 14.1.
Can anyone shed a light on this problem, please?
Thanks in advance!