Page 1 of 1

Original matrix reconstruction after calling xGELS

PostPosted: Mon Jun 03, 2013 6:49 pm
by jgpallero
Hello:

Calling xGELS routines means to solve the problem using the QR or LQ decomposition. After the routine execution the argument storing A on input stores que QR decomposition details as output from xGEQRF or xGELQF. xGEQRF and xGELQF returns also the TAU vector containing the factors of the elementary reflectors. I can see in the code of xGELS that the first part of the WORK auxiliary vector is used to store the TAU reflectors from xGEQRF or xGELQF. But at the end of the code in xGELS the optimal size of WORK is stored in WORK(1), so the first TAU reflector is destroyed and then it is imposible to reconstruct the Q matrix for QR or LQ. Am I right? Exists any way to recover the Q matrix after calling xGELS using only the data returned by xGELS?

Cheers

Re: Original matrix reconstruction after calling xGELS

PostPosted: Mon Jun 03, 2013 7:03 pm
by Julien Langou
Hi,

[ see Sven's answer below ]

Cheers,
Julien.

Re: Original matrix reconstruction after calling xGELS

PostPosted: Mon Jun 03, 2013 7:13 pm
by jgpallero
Julien,

thank you for your detailed answer :)

Cheers

Re: Original matrix reconstruction after calling xGELS

PostPosted: Wed Jun 05, 2013 3:07 am
by sven
Hi,

Another solution would be to modify xGELS so that it does return what you require. Since the computationally intense part is in xGEQRF or xGELQF you would not lose out on efficiency.

I don't quite agree with Julien. These high level drivers are intended to solve a high level problem and be straightforward to use by the inexpert user. The expert user who wishes to do more can call the computational routines directly - of course, the high level drivers can often be used as templates. The LAPACK Users' Guide gives a lot of background information on the computational routines.

Best wishes,

Sven Hammarling.