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
scipy.interpolate.RectBivariateSpline construction locks PyQt event loop #4673
Comments
Seems like Fortran functions in interpolate/src/fitpack.pyf are not marked as thread safe. Is there a reason for that? |
There is an affirmative reason to make them thread-safe. For example, this interpolator may be created for several seconds or even more. While it's being created, without GIL release, we have only three ways:
|
I don't remember this being asked or looked into before, could be that there's no good reason. Fitpack code doesn't seem to have |
Fortran didn't use to have stack variables, and after they were introduced they were't the default. Hmm... See http://stackoverflow.com/questions/2582409/are-local-variables-in-fortran-77-static-or-stack-dynamic |
Note that LAPACK threadsafety also relies on the fortran compiler having |
You must be referring to this one: bug112 :: DSYEVR does not seem to be thread-safe. The problem was solved by compiling LAPACK with |
Anyway, I've looked through FITPACK sources and haven't found any local arrays larger than 160 bytes. The default value for |
Construction of a RectBivariateSpline is time-consuming, and I want to create it in a background PyQt thread and then pass to my GUI. Alas, its construction even in dedicated thread freezes PyQt event loop. Why does it happen? AFAIK, scipy calls do release GIL lock?
Here is my sample code
The text was updated successfully, but these errors were encountered: