Problem with dormqr

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Posts: 2
Joined: Wed Oct 30, 2013 12:51 pm

Problem with dormqr

Post by tmp_hallenser » Wed Oct 30, 2013 1:17 pm

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

Posts: 842
Joined: Fri Jan 06, 2012 2:13 pm

Re: Problem with dormqr

Post by mgates3 » Thu Oct 31, 2013 5:31 pm

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.
(4.87 KiB) Downloaded 80 times

Post Reply