-
Notifications
You must be signed in to change notification settings - Fork 11
Adddtrtri #52
Conversation
This very reliably crashed in cgo in Dlansy
|
Checking I have up to date OpenBLAS |
After updating, the crashes are intermittant, and look like they may have Dlantr as the root cause. |
Try making the minor change I have here to see if the fault goes away. |
I don't see faults here in either state of OpenBLAS, but I do see this:
The pattern of success/failure is consistent over runs which suggests to me that it's a function of the PRNG and so the failures are matrix element dependent. |
Do you have any idea about the failures above? |
// Dtrtri computes the inverse of a triangular matrix, storing the result in place | ||
// into a. This is the BLAS level 3 version of the algorithm. | ||
// | ||
// Dtrti returns whether the matrix a is singular. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns whether it's singular or whether it's not singular; ok is ambiguous here. I think we have words elsewhere that dealt with this better.
It's worth explaining briefly the difference here between the BLAS level 3 and 2 algorithms.
LGTM, except minor comments and I'd like to now about the failures in cgo. |
Do the failures go away when you decrease the tolerance (make it closer to 1)? The condition number of these randomly generated matrices is often pretty bad, so the error in the final solution can be high even when the algorithm is correct. You can see how high it has to be in Dgetri, so maybe it needs to be higher here as well. |
(The failures don't happen on my machine) |
They go away at 1e-4. |
// into a. This is the BLAS level 3 version of the algorithm which builds upon | ||
// Dtrti2 to operate on matrix blocks instead of only individual columns. | ||
// | ||
// Dtrti returns whether the matrix a is singular or whether it's not singular. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be better: "Dtrtri will not perform the inversion if the matrix is singular, and returns a boolean indicating whether the inversion was successful."
I think that covers the behaviour.
No description provided.