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

I am trying make singular value decomposition on a general matrix A. I follow the guidelines in the mkl manual, i.e. first reduce A to the bidiagonal matrix B, and then use the routine rbdsqr to make the svd. I do the following using the intel Fortran compiler in Ubuntu 8.10:

real, dimension(3,3) :: Te,u,vt

real, dimension(3), allocatable :: d,e

*Test matrix:*

Te(:,1) = ((/1.,2.,3./))

Te(:,2) = ((/3.,1.,5./))

Te(:,2) = ((/3.,3.,5./))

d = 0; e = 0;

call gebrd(Te,d,e)

gives: d = [-3.741657 1.362770 0] and e =[ -6.414269 0 0], as is expected

gives: d = [-3.741657 1.362770 0] and e =[ -6.414269 0 0], as is expected

call rbdsqr(d,e,vt,u)

now d and vt becomes matrices which are not the same for each run of the program. In addition, when i dump them on the screen, I get ******** for some of the matrix entries... I do get the correct singular values

d = [7.519318 0.6781226 0]

I expect this to be some sort of trouble with the variable declarations, but i dont understand what the problem is... On exit the relation

A = u*D*vt

D being a diagonal matrix of the components of d, should be true. Additionally i tried using the "info" option for both routines, which returned 0 in both cases.

I tried to search google for examples where these routines were used, but i couldn't find any; so if anyone knows of an example it would be extremely helpfull if you could direct me to it.

Any help would be greatly appreciated!

/ Mads

Link Copied

1 Reply

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

Please post a short "reproducer", i.e, complete example source code that can be compiled and run to reproduce the problems that you described.

Topic Options

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