Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparse matrices bring NaN computation and infinite-loop #2

Open
ujhazib opened this issue Jan 12, 2014 · 0 comments
Open

Sparse matrices bring NaN computation and infinite-loop #2

ujhazib opened this issue Jan 12, 2014 · 0 comments

Comments

@ujhazib
Copy link

ujhazib commented Jan 12, 2014

The latest, as well as v1.34 calculates NaN values at a time when the input matrices have lesser than 1% density of non-zero values. I generated lots of matrices with size of bigger than 1000x1000 (for a start) and 0.05% density and nearly all of them brought this error. The problem first shows up in the svd_pythag method, where the computation goes into an infinite loop because of the NaN values.

Smaller matrices brought weird values instead of the infinite loop.

The algorithm to generate the test matrices is simple: using a random generator to ensure the given density value and generating a matrix with random [1-9] values where the random lets us.

I also state here that I used the dense matrix format, but even if I format it to sparse, things did not change (maybe because the algorithm already converts it to sparse when it starts?)

Tests were done one a Ubuntu machine with gcc and Intel Pentium Dual Core CPU, as well as on a Windows 7 machine with Visual Studio 2010 and a 6 core AMD Phenom CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant