Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- Intel MKL ERROR: Parameter 12 was incorrect on entry to SGELSD

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

pankaj_p_

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-18-2017
11:39 PM

28 Views

Intel MKL ERROR: Parameter 12 was incorrect on entry to SGELSD

Hello all,

I encountered this error while I was trying to solve linear least square problem, ||Ax-b||. Trying to solve (^{(-1)}b) to get x vector. MATLAB solves it like (A\b) and gives the correct answer.

I have properly followed the procedure given in

But when I am trying to use this subroutine (SGELSD) with my matrix A and B, which are of size (135x135) and (135x6) respectively, it throws the above mentioned error. My A matrix is singular, as its determinant is zero.

Matlab solves these ||Ax-b||, and gives the correct answer, so A and B matrix are good. I am reading these two matrices (A and b) in my fortran code.

Sorry for such a long post!!!!!!!!!

Thanks

1 Reply

Highlighted
##

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-19-2017
03:08 AM

28 Views

Please edit your post and remove the lines with the matrix contents, since they are useless at this point and some readers may find it annoying to scroll through thousands of lines that contain no interesting content.

If you simply used the example code without increasing the value of LWMAX above 1000, the GELSD call would likely fail for a 135 X 135 matrix. You should read the documentation of GELSD and issue a correct call instead of simply reusing example code.

In fact, a call to the Lapack95 interface routine would avoid this issue completely, since the calculation and allocation of workspace arrays would then be done automatically.

MODERATOR: Please consider moving this thread to the MKL forum.

For more complete information about compiler optimizations, see our Optimization Notice.