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 Single Precision Problem

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

Nathan_Champagne

New Contributor I

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

08-23-2020
08:15 AM

358 Views

SVD Single Precision Problem

There may be a bug in the SVD routines starting with version 2020 update 1 (v19.1.1) and later.

The problem (demonstrated in the attached code) is the reconstructed results are not correct for

single precision (real and complex) when using LWORK computed by the SVD routine.

The attached archive contains results generated using Intel Fortran v19.0.5, v19.1.0, v19.1.1, v19.1.2 on a MacBook Pro (3.1 GHz Intel Core i7). The results from using v19.0.5 and v19.1.0 are valid, but v19.1.1 and v19.1.2 generated similar inaccurate results.

The included code is based another message in this forum.

Thanks,

Nathan

Link Copied

4 Replies

Gennady_F_Intel

Moderator

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

08-23-2020
11:04 PM

347 Views

Thanks for the report. It seems the problem has not been completely resolved. We will check the problem and keep the thread updated.

Thanks,

Gennady

Gennady_F_Intel

Moderator

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

10-08-2020
08:42 PM

279 Views

Hello,

the SVD decomposition is not unique (more precisely singular values are unique but singular vectors might vary). Since that it is not correct to use a bit-to-bit comparison between two sets of singular vectors for different code branches. Thus the difference between two sets of the singular vector should be expected. According to the LAPACK User's Guide, the following conditions must be used to check the correctness of the SVD decomposition.

(1) | A - U S VT | / ( |A| max(M,N) ) =< const*ulp

(2) | I - U' U | / ( M ) =<const*ulp

(3) | I - VT' VT | / ( N ) =<const*ulp

(4) s(1)>= s(2) >= … s(min(M,N)) >=0

where ulp is the machine precision (it is about 1.e-8 for single precision), and const is a constant (300 is used in the Netlib Lapack unit tests).

So We've incorporated the computation of | A - U S VT | / ( |A| max(M,N) ) in the original code (see attached file named svd_fail_sr_mod.f90) and if we compile and run it) we'll see that the both code branches produce correct results.:

./a.out

..

tolerance 3.5762787E-05

The infinity norm of initial matrix 0.8196368

Infinity norm of the residual matrix in the 1st case 4.8623844E-13

Test passed

..

Infinity norm of the residual matrix in the 2nd case 1.6821372E-05

Test passed

>> So the accuracy is in admissible range for both cases.

Nathan_Champagne

New Contributor I

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

10-12-2020
01:16 PM

260 Views

Thanks for checking into and following up on this issue.

Gennady_F_Intel

Moderator

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

10-12-2020
08:25 PM

253 Views

- 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.