Page 1 of 1

Problem with dormqr

PostPosted: Wed Oct 30, 2013 1:17 pm
by tmp_hallenser
I was testing MAGMA a bit and stumbled across the following issue concering the function dormqr (as well as sormqr and some others). I hope some can confirm and/or solve my issues:

(a) The testing code "testing_dormqr.cpp" has to be modified, the array W may be too small depending on the input parameters. The length should read in line 73 as

lwork_max = max(max( m*nb, n*nb ), 2*nb*nb);

(b) The MAGMA functions for dormqr/sormqr seem to calculate wrong results for small matrices, i.e. executing "./testing_dormqr -m 4 -n 1 -k 4" procudes an relative error of the order of unity.

(c) Origin of the problem: I think, the problem seems to be the file "dormqr.cpp": In line 203, the LAPACK function gets called, but with an offset of one in the vector tau. I think, this offset is the cause of the error.

(d) Other affected functions: ?unmqr

Re: Problem with dormqr

PostPosted: Thu Oct 31, 2013 5:31 pm
by mgates3
Thank you for reporting these issues. Yes, your analysis appears to be correct. Attached is a patch that implements the 2 changes that you suggest.