Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- SVD with via "divide and conquer" method (LAPACKE_sgesdd)

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

VICTOR_K_Intel

Employee

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

03-25-2014
03:04 AM

76 Views

SVD with via "divide and conquer" method (LAPACKE_sgesdd)

Hi,

I am searching for the most efficient SVD calculation approach in MKL and about to conclude this is "LAPACKE_sgesdd". Could you please help me with two questions:

1. Is "LAPACKE_sgesdd" really the fastest routine in MKL in sense of SVD decomposition or I missed something?

2. Why when I make a call

LAPACKE_sgesdd(CblasRowMajor, 'A', dim, dim, X, dim, e, U, dim, V, dim);

everything works fine (U, V, and e arrays are filled as imposed by MKL manual), but when I make a call with jobz = 'O'

LAPACKE_sgesdd(CblasRowMajor, 'O', dim, dim, X, dim, e, U, dim, V, dim);

error is output "MKL ERROR: Parameter 10 was incorrect on entry to SGESDD."?

Thanks,

Victor.

Link Copied

5 Replies

mecej4

Black Belt

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

03-25-2014
07:31 AM

76 Views

I ran your example on Windows 8.1 X64 with the 32-bit and 64-bit 14.0.2 compilers, and the code ran with no error messages output, whether I used 'O' or 'A' as the second argument to LAPACKE_sgesdd.

It is not useful to use matrices with random values for elements when computing the SVD, particularly when a runtime error is involved and the occurrence of the error may depend on the values of the matrix elements. This could be one reason for my failure to reproduce the error that you reported.

Secondly, if by "most efficient" you mean "fastest", you need to come up with a test matrix that is much larger than a pitiful 5 X 5 matrix in order to get meaningful timing results.

Gennady_F_Intel

Moderator

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

03-25-2014
08:09 AM

76 Views

VICTOR_K_Intel

Employee

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

03-26-2014
12:42 AM

76 Views

Thanks for quick response, guys.

Originally I compiled my example with MKL 11.1.1 and there was error. But compiling with 11.1.2 work fine for me to. The problem has gone. Great!

mecej4, thank you for advice, this does make sense. As for this error, it is reproducible quiet stable on MKL 11.1.1 so uncertainty didn't play a big role there. As for 5x5 size matrices, they were used to have as simple example as possible to reproduce the bug, not for performance.

But still, could you recommend any more fast routine to compute SVD for big matrices (e.g. 5000x5000), or LAPACKE_sgesdd is the fastes one?

mecej4

Black Belt

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

03-26-2014
06:36 AM

76 Views

>But still, could you recommend any more fast routine to compute SVD for big matrices (e.g. 5000x5000), or LAPACKE_sgesdd is the fastes one?I am afraid that there is no simple answer (note this quotation of H.L. Mencken:

What attributes can you identify for your input matrices? Are they banded? Sparse? Do you need only the singular values, or do you need singular vectors?

How many singular values do you require? Or will a mere count of non-zero singular values suffice? What do you intend to do with the singular values?

Suppose a single "best" routine existed. Why would a library for professional (rather than pedagogical) use, such as MKL, provide any other routines designed for treating the same problem, assuming that there were no trade secrets or copyright issues at play?

VICTOR_K_Intel

Employee

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

03-26-2014
06:55 AM

76 Views

:-)

I see what you mean, mecej4, and agree about "correctness" of my original question.

Unfortunately I don't have any specific attributes for input matrices (except symmetry in some cases) and all singular values/vectors are required.

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

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