spcl / open-earth-compiler

development repository for the open earth compiler
https://arxiv.org/abs/2005.13014
Other
76 stars 14 forks source link

Multi-threading bug in compiler #22

Open muellch opened 4 years ago

muellch commented 4 years ago

To reproduce:

The bug only appears sometimes. The bug goes away if multi threading is deactivated for OEC with --mlir-disable-threading

For error message see screenshot:

Screenshot from 2020-05-26 14-05-06

jmgorius commented 4 years ago

It may be useful to run a ThreadSanitizer build to see where exactly the data race is happening. I updated the standalone template to include sanitizer build support.

If you use the sanitizers.cmake module you can enable TSAN by adding -DUSE_SANITIZER=Thread to the CMake configuration.

gysit commented 4 years ago

I fixed a gcc issue in the the development branch. We should retest this as soon as we can merge back... Thanks for the pointer to the thread sanitizer (didn't know it exists)

gysit commented 4 years ago

does the problem still appear in the latest builds?