topic Help with rbdsqr (svd routine) in IntelĀ® oneAPI Math Kernel Library
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-rbdsqr-svd-routine/m-p/803516#M3255
It is hard to debug source code without seeing it! There can be millions of reasons why the results turned out to be incorrect, but having the source code visible will reduce that number to something manageable.<BR /><BR />Please post a short "reproducer", i.e, complete example source code that can be compiled and run to reproduce the problems that you described.Tue, 19 Oct 2010 23:19:44 GMTmecej42010-10-19T23:19:44ZHelp with rbdsqr (svd routine)
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-rbdsqr-svd-routine/m-p/803515#M3254
Hello there<BR /><BR />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:<BR /><BR />real, dimension(3,3) :: Te,u,vt<BR />real, dimension(3), allocatable :: d,e<BR /><BR /><I>Test matrix: </I><BR />Te(:,1) = ((/1.,2.,3./))<BR />Te(:,2) = ((/3.,1.,5./))<BR />Te(:,2) = ((/3.,3.,5./))<BR /><BR />d = 0; e = 0; <BR />call gebrd(Te,d,e)<BR /><I><BR />gives: d = [-3.741657 1.362770 0] and e =[ -6.414269 0 0], as is expected</I><BR /><BR />call rbdsqr(d,e,vt,u)<BR /><BR />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 <BR />d = [7.519318 0.6781226 0]<BR />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<BR /><BR />A = u*D*vt<BR /><BR />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.<BR /><BR />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.<BR /><BR />Any help would be greatly appreciated!<BR /><BR />/ MadsTue, 19 Oct 2010 21:24:54 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-rbdsqr-svd-routine/m-p/803515#M3254madstrolle2010-10-19T21:24:54ZHelp with rbdsqr (svd routine)
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-rbdsqr-svd-routine/m-p/803516#M3255
It is hard to debug source code without seeing it! There can be millions of reasons why the results turned out to be incorrect, but having the source code visible will reduce that number to something manageable.<BR /><BR />Please post a short "reproducer", i.e, complete example source code that can be compiled and run to reproduce the problems that you described.Tue, 19 Oct 2010 23:19:44 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-rbdsqr-svd-routine/m-p/803516#M3255mecej42010-10-19T23:19:44Z