solving underdetermined system and LAPACKE_dormqr error
Trying to do the same as in Matlab (snippet below) but using MKL produces at the point of doing the Q'*b with LAPACKE_dormqr "MKL ERROR: Parameter 10 (ldb) was incorrect on entry to cblas_dtrsm". Is it a valid case trying to solve underdetermined systems with MKL? I know this doesn't make a lot of sense i.e. infinite solutions but Matlab is quite robust in that respect.
I managed to get the append column QR update bit working green unit tests yippiiiii :) and this underdetermined system was a border case test which results in the MKL error above.
If you have an undetermined system, with A an m X n matrix, rank(A) = m < n, and you want the minimum norm solution, you can use the LQ factorization. See the MKL Reference Manual under LAPACK Routines: Least Squares and Eigenvalue Problems. To obtain such a solution in Matlab, you would type in
There is an example, dgelqfx.f, and associated input data dgelqfx.d, in the MKL examples/lapack directory. With this code, but your data above, I get the minimum norm solution as
-0.0540 -0.0954 0.2668 0.1395 -0.1821
which agrees with the result from the Matlab calculation pinv(A)*b.
If you want help with a problem with calling MKL, at a minimum you have to show the routine invocation and the declarations of the routine arguments. It would be better to post a complete example, if feasible.