Open sarahcohen520 opened 5 years ago
Hi Sarah, can you share the files & the exact command invocation that you are using?
Sure, the file I use is : cat THE_MATRIX_sparse1 3 3 3 1 0 1.0 1 1 1.0 1 2 1.0
and the cmd line :
./svd -o result -v 200 ./THE_MATRIX_sparse1
and the results output: Verbosity = 200 Loading the matrix... Computing the SVD... SOLVING THE [A^TA] EIGENPROBLEM NO. OF ROWS = 3 NO. OF COLUMNS = 3 NO. OF NON-ZERO VALUES = 3 MATRIX DENSITY = 33.33% MAX. NO. OF LANCZOS STEPS = 3 MAX. NO. OF EIGENPAIRS = 3 LEFT END OF THE INTERVAL = -1.00E-30 RIGHT END OF THE INTERVAL = 1.00E-30 KAPPA = 1.00E-06
NUMBER OF LANCZOS STEPS = 3 RITZ VALUES STABILIZED = 3
COMPUTED RITZ VALUES (ERROR BNDS) 1 9.99999985841008E-01 ( 0.00E+00) 2 1.00000000000000E+00 ( 0.00E+00) 3 1.00000000000000E+00 ( 0.00E+00)
SINGULAR VALUES: 3 1 1 1
LEFT SINGULAR VECTORS (transpose of U): 3 3 0.000271442 0.868467 -0.495747 -0.000308055 -0.868467 0.495747 3.43207e-05 0.495747 0.868467
RIGHT SINGULAR VECTORS (transpose of V): 3 3 0.000271442 0.868467 -0.495747 -0.000308055 -0.868467 0.495747 3.43207e-05 0.495747 0.868467 SINGULAR VALUES FOUND = 3; nsig=3
ELAPSED CPU TIME = 0 sec. MULTIPLICATIONS BY A = 11
Hi Sarah,
thanks. I could indeed reproduce the bug (both with sparse and dense text input). The result of U^T dot V
gives something close to
1 -1 0
-1 1 0
0 0 1
I don't know where the problem is coming from. Let me know if you make any progress on this issue.
Hi Lucas, First, thanks for your responses. Second, I am compiling with gcc 6.3 in 64 bit. while I am compiling with gcc 4.2 in 32 bit, I have different results, but still, not the good ones:
./bin/svd -r st -v 4 THE_MATRIX_sparse1 Verbosity = 4 Loading the matrix... Computing the SVD... SOLVING THE [A^TA] EIGENPROBLEM NO. OF ROWS = 3 NO. OF COLUMNS = 3 NO. OF NON-ZERO VALUES = 3 MATRIX DENSITY = 33.33% MAX. NO. OF LANCZOS STEPS = 3 MAX. NO. OF EIGENPAIRS = 3 LEFT END OF THE INTERVAL = -1.00E-30 RIGHT END OF THE INTERVAL = 1.00E-30 KAPPA = 1.00E-06
NUMBER OF LANCZOS STEPS = 1 RITZ VALUES STABILIZED = -1208451084
COMPUTED RITZ VALUES (ERROR BNDS) 1 0.00000000000000E+00 ( 1.38E+306)
SINGULAR VALUES: 0
LEFT SINGULAR VECTORS (transpose of U): 3 3 0 0 0 0 0 0 0 0 0
RIGHT SINGULAR VECTORS (transpose of V): 3 3 1 0 0 0 0 0 0 0 0 SINGULAR VALUES FOUND = 0; nsig=0
ELAPSED CPU TIME = 0 sec. MULTIPLICATIONS BY A = 2 MULTIPLICATIONS BY A^T = 2
Can you please send me which gcc are you using and on which platform (32/64 bit)? Thanks, Sarah
Hi Sarah,
I am on a 64 bit platform. My GCC is in fact symlinked to clang
(Apple LLVM version 10.0.1 (clang-1001.0.46.3)
).
I get the exact same results you posted 3 days ago, on April 8.
If I use a matrix whose singular values are not all the same, e.g. the following dense text matrix:
3 3
1.0 0.0 0.0
0.0 2.0 0.0
0.0 0.0 3.0
then the results seem to be correct. Therefore, I wonder if SVDLIBC is not struggling with singular values of multiplicity > 1?
this one is working for you: 3 3 1 0 0 0 1 0 0 0 1
it is the dense matrix of the sparse that I sent you 3 days ago.
this one is working for me also: 3 3 1.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 3.0,
The dense identity matrix does not work for me - it produces the same result as the one you sent 3 days ago (whether the format is dense or sparse).
ok, also all the matrices that have values very closed to the identity matrix are not working.
Do you have an idea why?
No, unfortunately I don't have an idea where this might be coming from...
hi !
we ran the code over 3x3 identity matrix. the results do not multiply back to identity..
do you maybe know why ?
tnx, sarah