Hi and sorry for the late answer,
Not sure which LAPACK you are using, but we had some problem in 3.2.1 with dlarfg.
If you are noticing problem with 3.2.2 please let us know.
(*) Revert DLARFG to 3.1.0, move DLARFG to DLARFP and improved DLARFP
(*) svn :: (r706, r707, r708, r710, r712, r713) + (r755)
o Bug reported by Pat Quillen (MathWorks)
o The Householder reflector generation routine dlarfg (for double precision)
has been changed in LAPACK-3.2 by dlarfp to generate nonnegative
diagonal elements (on the diagonal of the R factor of a QR
factorization). There is an issue in the dlarfp subroutine in
LAPACK-3.2. The bug report is from Pat Quillen from MathWorks, have
participated in the bug fix: Pat Quillen, Jim Demmel, Sven Hammarling,
Mark Hoemmen, Guillaume Revy, William Kahan, Julie Langou and Julien
o Extensive work by Jim Demmel, Guillaume Revy, and William Kahan have
revealed that the new Householder reflector that guarantees a positive
diagonal of R in QR has two apparently unfixable drawbacks compared to
the old reflector:
1) the computed reflector can be less orthogonal by a factor of about 4,
(Jim, Guillaume and William are not sure why.)
2) this new routine is intrinsically more sensitive to over/underflow,
this is now well understood, details are skipped here.
None of these issues arise with the conventional Householder reflector.
o So the decision is to
1) Fix as much as possible the xLARFP routines. This was corrected by
Julien (see (r706, r707, r708, r710, r712, r713)) based on Jim's idea.
2) Back out the changes in LAPACK to go back to using the old reflector
(xlarfg) everywhere (e.g. in xGEQRF, xGEQR2, etc.).
3) Keep the change that saves flops when u has lots of trailing zeros,
since this is independently a good idea.
4) Change the name from xLARFP to xLARFGP and introduce new QR routines
(xGEQRFP and xGEQR2P) that uses xlarfp to guarantee a new positive
diagonal of R, for who needs it.
5) This requires to adapt the test suites
6) Note: only the QR routines have an xGEQRFP. While it seems that quite
a few users care for QR factorization with nonnegative diagonal R. Noone
seemed to care for this feature on LQ, QL or RQ. So we have left out
7) Steps 2 to 6 were done during r755 by Julie.