Possible bug in DORGR2

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

Possible bug in DORGR2

Postby hrautila » Mon Aug 03, 2015 4:00 pm

Hi,

I have been working on implementing in C some of the LAPACK algorithms and occasionally verifying output from my version to corresponding LAPACK functions. Some time ago I had problems with generating the Q matrix from RQ factorization. Whenever I set value of K less than M the outputs were different. Suspect was my code but I could not any obvious bug. When I commputed identity ||I - Q*Q.T|| which should be close to zero, I noticed that the identity did not hold with matrix generated with dorgr2 when K != M.

Looking at the code of DORGR2 it seems that indexing of the elementary vector is not in sync with indexing of the tau coefficent. In the code below it should read 'tau(ii)' instead of 'tau(i)'


Code: Select all
     
    DO 40 i = 1, k
         ii = m - k + i

*      Apply H(i) to A(1:m-k+i,1:n-k+i) from the right
*
         a( ii, n-m+ii ) = one
         CALL dlarf( 'Right', ii-1, n-m+ii, a( ii, 1 ), lda, tau( i ),
     $               a, lda, work )
         CALL dscal( n-m+ii-1, -tau( i ), a( ii, 1 ), lda )
          a( ii, n-m+ii ) = one - tau( i )
*
*        Set A(m-k+i,n-k+i+1:n) to zero
*
         DO 30 l = n - m + ii + 1, n
            a( ii, l ) = zero
   30    CONTINUE
   40 CONTINUE



regards,
Harri

P.S. For the curious my code is available in https://github.com/hrautila/armas
hrautila
 
Posts: 1
Joined: Mon Aug 03, 2015 2:37 pm

Re: Possible bug in DORGR2

Postby admin » Thu Aug 13, 2015 9:17 am

Dear hrautila,
We logged your issue as bug 131 - http://www.netlib.org/lapack/Errata/ind ... _in_dorgr2
We will look at it very shortly
Julie
admin
Site Admin
 
Posts: 608
Joined: Wed Dec 08, 2004 7:07 pm


Return to Bug report

Who is online

Users browsing this forum: No registered users and 2 guests