Closed kliem closed 3 years ago
How do you reproduce the problem in the first place? Do you just add CFLAGS=-fopenmp
when compiling?
How do you reproduce the problem in the first place? Do you just add
CFLAGS=-fopenmp
when compiling?
I don't know exactly. It happens with sage's kucalc builtbot:
https://trac.sagemath.org/ticket/31245#comment:11
Probably I should try reproducing this with tox/github actions.
I see, so this doesn't really impact cysignals itself, but rather using cysignals macros in third-party code that is being compiled with OpenMP support. It also seems to be compiler-specific as the relevant issue appears to be fixed in GCC (though I admit I don't fully understand what's being fixed here).
One concern about this is that by having configure-time checks it will disable use of _Atomic for all code using cysignals, with or without OpenMP. I'm not sure there's a good workaround to that...
Or is that what the #if _OPENMP
is supposed to address?
Answer: Yes, that seems to take care of it.
Okay, looks good to me then.
Thanks for reviewing.
I saw that link regarding GCC earlier and forgot about it again. Yes it seems to be fixed in GCC 5.0. However, sage allows GCC starting with 4.8. That might have been the problem with the kucalc buildbot.
This is supposed to fix #122. I'm not entirely sure how to test it though.