I found a bug in the Lapack implementation in one of the LU related routines [0]. I'm not sure how we want to deal with this. This bug is also present in OpenBLAS. I'm not sure the correct way to handle it.
On the one hand, it's not necessarily true that all c-based implementations have this bug present, so it seems wrong to change the behavior of the function to provide a workaround for this bug. On the other hand, with the current failure a warning is printed and otherwise the function proceeds as if normal (so it is easy to get the incorrect result). It seems dangerous to allow this behavior. Furthermore, do there exist other implementations of row-major lapack? If all C based implementations have the same wrong behavior then we can just work around it.
Thoughts? If the time to fix is short enough then it doesn't matter, but even then there will likely be many users who have not updated their lapack library.
[0]
https://github.com/xianyi/OpenBLAS/issues/615