LAPACKE_dtr_nancheck called on trapezoidal matrix by LAPACKE

Post here if you want to report a bug to the LAPACK team

LAPACKE_dtr_nancheck called on trapezoidal matrix by LAPACKE

Postby kortschak » Mon Oct 05, 2015 4:40 pm

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.

See for more details.
Posts: 3
Joined: Sun Sep 06, 2015 5:02 pm

Re: LAPACKE_dtr_nancheck called on trapezoidal matrix by LAP

Postby Julien Langou » Mon Oct 05, 2015 10:13 pm


Thanks for the bug report, this is a bug in LAPACKE. Correct. The comments on the GITHUB website are correct as well.

The quickest way to remove the bug is to add a MIN indeed. But this is not a good fix. (As noted on the GITHUB website.)

I applied your quick bug fix (svn revision 1598). Better than nothing. But this needs some more work.

Either we fix the bug in LAPACKE_dlantr. This is without interface changes. This is fine. Ugly and not really functional, but that would work.

Or the cleanest way to fix this would be to change LAPACKE_dtr_nancheck so that the TR is not for TRIANGULAR but for TRAPEZOID, and so we would add an extra parameter so that the input matrix can be an M-by-N matrix, so a trapezoid. As opposed to an n-by-n matrix for now.

I think I will try to work on the cleanest fix.

Thanks for the bug report.

Julien Langou
Posts: 835
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Return to Bug report

Who is online

Users browsing this forum: No registered users and 1 guest