Thu 14 Apr 2011 03:13:40 PM UTC, original submission:
hey all,
i have a 12 core machine with 64bit ACML libraries linked into a 64bit octave.
when running:
A=rand(1000,10000);
[u,s,v]=svds(A,2);
a single core is used for the first stage of the computation. i tracked it down using gdb and came to the following:
on line 410 of eigs.cc:
symmetric = asmm.is_symmetric();
is computed by brute force (i.e. checking every single value to its transpose value), and when the matrix is large, this takes a very long time.
In actuality, if we look at the SVDS code (which is a nice wrapper around the eigs code), the computation which is performed is:
[V, s, flag] = eigs ([sparse(m,m), b; b', sparse(n,n)], ....
but:
[sparse(m,m), b; b', sparse(n,n)]
is always a symmetric matrix, making the asmm.is_symmetric() check redundant (and extremely time consuming).
this should have been taken care of by a flag which can be passed from svd to eigs in the opts.issym (which is even mentioned in the documentation), but alas it was not. even if it was, eigs.cc always performed the check.
i rewrote it to take these things to account. find two attached patches, one for eigs.cc and one for svds.m
|