Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: f2py: fix issues with thread-local storage define #27729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

rgommers
Copy link
Member

@rgommers rgommers commented Nov 10, 2024

This is a continuing source of issues, therefore we:

  • stop using threads.h completely,
  • better document what is happening, and
  • ensure the f2py TLS define stays unchanged so users can override it at build time by passing the define as a compile flag.

Closes gh-27718

Opening as Draft to get a confirmation about it working on macOS + GCC, and also to fix the SciPy side of the problem with the documented approach of overriding F2PY_THREAD_LOCAL_DECL. done

Let's not backport this PR I'd say, since there's a nonzero chance that it breaks again on some platform we don't test on.

This is a continuing source of issues, therefore in this commit we:
- stop using `threads.h` completely,
- better document what is happening, and
- ensure the f2py TLS define stays unchanged so users can override
  it at build time by passing the define as a compile flag.

Closes numpygh-27718
@rgommers rgommers marked this pull request as ready for review November 10, 2024 20:27
Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to go to me, but I'll let @tylerjereddy make the final call.

@tylerjereddy
Copy link
Contributor

Yeah, the last two commits were just comment improvements and the cognate SciPy PR referenced seems to have a clear example of the define switch indeed.

@tylerjereddy tylerjereddy merged commit 060c28a into numpy:main Nov 13, 2024
4 checks passed
@tylerjereddy
Copy link
Contributor

Thanks Ralf, Rohit

@rgommers rgommers deleted the f2py-tls branch November 13, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: f2py threads.h on MacOS 14.x may need a shim?
3 participants