Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6621 Discussions

error in dormqr switching from dgeqrf to dgeqp3?

Azua_Garcia__Giovann
210 Views
Hello,

Given that both functions have a very similar interface and produce the same result I was hoping to see some performance gain but instead I got the error "LAPACKE_dormqr failed with info = -1" trying to compute the Q^T*c with dormqr using the output generated by dgeqp3. Would this be a known bug of the MKL version composerxe-2011.4.184 I have? Or is there a slightly different workflow for this other QR dgeqp3 variant?

Thanks in advance,
Best regards,
Giovanni
0 Kudos
4 Replies
Gennady_F_Intel
Moderator
210 Views
this is an unknow behavior, please give the example for checking this issue.
Nadezhda_M_Intel
Employee
210 Views
HelloGiovanni,
In the manual is the following description for ?ormqr function
Multiplies a real matrix by the orthogonal matrix
Q of the QR factorization formed by ?geqrf or
?geqpf.
This function works with matrices formed in special way.
You try to use dgeqp3 function instead
Computes the QR factorization of a general m-by-n
matrix with column pivoting using level 3 BLAS.
You should keep in mind that this function use pivoting and as a result it produces matrix Q formed in another way.
However a message"LAPACKE_dormqr failed with info = -1" is quite strange. It says that the problem is in a matrix order parameter.
Can you give more information? May be a part of code.



Azua_Garcia__Giovann
210 Views
Hello Nadezhda,

I know but if you read the documentation of dgeqp3 specifically the "Application Notes" below of dgeqp3 you will find:

Application Notes
To solve a set of least squares problems minimizing ||A*x - b||2 for all columns b of a given matrix B, you
can call the following:
- ?geqp3 (this routine) to factorize A*P = Q*R;
- ormqr to compute C = QT*B (for real matrices);
- unmqr to compute C = QH*B (for complex matrices);
- trsm (a BLAS routine) to solve R*X = C.

So basically should be the same workflow as dgeqrf. However a friend of mine benchmarked dgeqrf vs dgeqp3 in front of me now using python and we can see dgeqp3 performing orders of magnitude slower than dgeqrf so never mind.

Best regards,
Giovanni
Nadezhda_M_Intel
Employee
210 Views
Ok, you are right. This is not the issue. Please provide details of your problems with LAPACKE_dormqr
Reply