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

error in LAPACKE_dgesvd Example row major

Petrus_Ishak
Beginner
336 Views

Hello,
I wanted to share an error i found in the example for LAPACKE_dgesvd example for row major. https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_lapack_examples/lapacke_dgesvd_row.c.htm
in the function:

print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );

it will print the left singular matrix as mxn while its a mxm. The matrix contain correct data but the print_matrix function gets it column from column of the original matrix. so it should be

print_matrix( "Left singular vectors (stored columnwise)", m, m, u, ldu );

also note the comment where it says "Example Program Results." should also be changed for the left singular vectors:
 Left singular vectors (stored columnwise)
  -0.59   0.26   0.36   0.31   0.23   0.55
  -0.40   0.24  -0.22  -0.75  -0.36   0.18
  -0.03  -0.60  -0.45   0.23  -0.31   0.54
  -0.43   0.24  -0.69   0.33   0.16  -0.39
  -0.47  -0.35   0.39   0.16  -0.52  -0.46
   0.29   0.58  -0.02   0.38  -0.65   0.11

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
336 Views

Thanks Ishak for this report. We will check and fix if the case will be reproduced on our side. 

0 Kudos
Reply