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

MKL_SPARSE_?_QR invalid input error (Fortran)

Bakee
Beginner
679 Views

Hello,

I am experimenting the Sparse QR library to solve a linear system of equations. When I run the attached file, I get the following output:

0

0

0

3

The last output "3" indicates "SPARSE_STATUS_INVALID_VALUE The input parameters contain an invalid value." 

Can anyone help?

0 Kudos
1 Solution
Gennady_F_Intel
Moderator
679 Views

you put the input parameters into wriong order, fixing that, you will see the correct answer:

!stat = MKL_SPARSE_S_QR (SPARSE_OPERATION_NON_TRANSPOSE, csrA, descrA, SPARSE_LAYOUT_ROW_MAJOR, x, cols, ldx, b, ldb)
stat = MKL_SPARSE_S_QR (SPARSE_OPERATION_NON_TRANSPOSE, csrA, descrA, SPARSE_LAYOUT_ROW_MAJOR, cols, x,  ldx, b, ldb)
_mkl_forum\u815245>test.exe
           0
           0
           0
           0

 
           

View solution in original post

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
680 Views

you put the input parameters into wriong order, fixing that, you will see the correct answer:

!stat = MKL_SPARSE_S_QR (SPARSE_OPERATION_NON_TRANSPOSE, csrA, descrA, SPARSE_LAYOUT_ROW_MAJOR, x, cols, ldx, b, ldb)
stat = MKL_SPARSE_S_QR (SPARSE_OPERATION_NON_TRANSPOSE, csrA, descrA, SPARSE_LAYOUT_ROW_MAJOR, cols, x,  ldx, b, ldb)
_mkl_forum\u815245>test.exe
           0
           0
           0
           0

 
           

0 Kudos
Bakee
Beginner
679 Views

Thank you so much for the prompt reply. It solved the problem.

Here is a feedback: the page 324 of the documentation "Intel Math Kernel Library Developer Reference" is incorrect:

Capture.PNG

0 Kudos
Gennady_F_Intel
Moderator
679 Views

The problem has been fixed in MKL version 2019 update 5. Please let us know if the problem still exists on your side. 

0 Kudos
Gennady_F_Intel
Moderator
679 Views

MKL v.2020 has been released and contains the fix of this problem either.

0 Kudos
Reply