I'd like to do a $A=QR$ decomposition of a matrix $A$, with $m\times n$. I use
dgeqp3_) to proceed to the first part of the decomposition. Then, I can easily compute the matrix $R$ by taking the upper diagonal part of the output matrix.
If $A$ is such that $m > n$, the Lapack subroutine
dorgqr_ create the correct $Q$ matrix.
But if $A$ is such that $m < n$, the same subroutine gives me an error :
** On entry to DORGQR parameter number 2 had an illegal value
I guess it's because $m<n$... should I use another routine for this case?