-
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
LAPACK_dtr_nancheck called by LAPACKE_dlantr assumes triangular matrix #642
Comments
@kortschak , sorry for the delay. Did you report it to LAPACK forum? |
I have now. |
I downloaded the new OpenBLAS to check on issue #615 , and I'm getting Dlantr failures again. The failures are not consistent, but I sometimes get the following test failure:
(where the -7 is from cgo, and should be impossible from a norm) and less frequently get a panic trace like in @kortschak 's post |
The issue is as Dan suggests, the nancheck size is wrong. |
Bug report and bug fix from Dan Kortschak. See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4810 OpenMathLib/OpenBLAS#642 This is a quick bug fix, this only checks the triangular part of the trapezoid, the rectangular part is not checked. Another commit should follow up soon.
Bug report and bug fix from Dan Kortschak. See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4810 OpenMathLib/OpenBLAS#642 This is a quick bug fix, this only checks the triangular part of the trapezoid, the rectangular part is not checked. Another commit should follow up soon.
Suggesting to close this as the "quick and dirty bug fix" from Reference-LAPACK has been imported since. (I see no indication of continuing work towards a "proper" solution there however, still the problem seems to be fundamentally a Reference-LAPACK one) |
LAPACKE_dlantr works on a m by n triangular or trapezoidal matrix, but calls LAPACKE_dtr_nancheck with n. Under some circumstances (m < n), this can result in a segfault (reproducer in called from Go - pure C reproducer not available):
This fault is prevented by making the following change:
I don't believe that this is the proper fix though, as that leaves the non-triangular portion of a trapezoidal matrix unchecked for NaN. The correct fix is to either fix the signature for LAPACKE_*tr_nancheck and include the m (this requires changes in ~80 call sites) or add a trapezoidal NaN check version of *tr_nancheck.
The text was updated successfully, but these errors were encountered: