BUG: fix f2py's define for threading when building with Mingw#20881
Merged
charris merged 1 commit intonumpy:mainfrom Jan 24, 2022
Merged
BUG: fix f2py's define for threading when building with Mingw#20881charris merged 1 commit intonumpy:mainfrom
charris merged 1 commit intonumpy:mainfrom
Conversation
Closes rgommers/scipy#125 This is a follow-up of numpygh-18910 (included in 1.20.3 and 1.21.0), which looks incorrect. This fixes warnings like these when building SciPy with Mingw-w64: ``` [94/1557] Compiling C object scipy/linalg/_flapack.cp39-win_amd64.pyd.p/meson-generated_..__flapackmodule.c.obj In file included from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\f2py\src/fortranobject.h:13, from scipy/linalg/_flapackmodule.c:16: scipy/linalg/_flapackmodule.c:1248:1: warning: 'thread' attribute directive ignored [-Wattributes] 1248 | static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gees__user__routines_t *_active_cb_cselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1410:1: warning: 'thread' attribute directive ignored [-Wattributes] 1410 | static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gees__user__routines_t *_active_cb_zselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1572:1: warning: 'thread' attribute directive ignored [-Wattributes] 1572 | static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gees__user__routines_t *_active_cb_sselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1738:1: warning: 'thread' attribute directive ignored [-Wattributes] 1738 | static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gees__user__routines_t *_active_cb_dselect_in_gees__user__routines = NULL; | ^~~~~~ ... ``` Also fixes numpygh-19437, where `__STDC_NO_THREADS__` should be defined but isn't (this seems to be more common, e.g. one can reports for ICC about this).
39daa5f to
0dba00e
Compare
HaoZeke
reviewed
Jan 24, 2022
HaoZeke
approved these changes
Jan 24, 2022
Member
HaoZeke
left a comment
There was a problem hiding this comment.
LGTM, though ideally f2py should reuse the macros present elsewhere, e.g. in npy_os.h.
Contributor
|
OK, this appears to fix #19437 |
Member
|
Thanks Ralf. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes rgommers/scipy#125
This is a follow-up of gh-18910 (included in 1.20.3 and 1.21.0), which looks incorrect.
This fixes warnings like these when building SciPy with Mingw-w64:
Also fixes gh-19437, where
__STDC_NO_THREADS__should be defined but isn't (this seems to be more common, e.g. one can reports for ICC about this).