-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add gfortran -frecursive option from upstream and #1847 #1857
Conversation
Should fix #1847 thread safety issue |
I have been meaning to look up the reasoning behind the "only on 64bit Linux" note, for what looks more like a gfortran topic. (And I seem to remember some attempt to eliminate the need for it in Reference-LAPACK a while back). |
It is still there in reference lapack. Probably needs to be looked at while importing... |
also discussed in #1690 |
@hjbreg OpenBLAS does not have alternative implementation of LAPACK, it just includes a copy of reference implementation. They use -frecursive with gfortran, and now so will we. |
Also discussed in http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=1930 - the one attempt to get rid of -frecursive in netlib was apparently based on a misunderstanding of the scope of the problem. |
I think discussion there goes about gaming compiler allocating (bigger fixed size private) temporary arrays as global structures. Since there is no deep recursion in LAPACK they get allocated on the stack and we are fine. |
Yes, but the entire point of |
Exactly.... And in this issue we hit a problem that single-threaded build is presumed thread-safe, when it is not courtesy GCC. |
Either he was using a different fortran compiler at that time (and got a warning about an unknown option) or he misjudged the consequences. Putting it in the middle of an unrelated changeset certainly did not help. |
Most people assume thread-safety from single-threaded calls. This is not the case by default with gfortran. It is hinted already by LAPACK makefile.inc