You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -740,7 +741,7 @@ mpiexec -n XX ./svd [ rest of the command line aguments ]
740
741
741
742
\verbatim
742
743
--training Input file directory.
743
-
--nv Number of inner steps of each iterations. Typically the number should be greater than the number of singular values you look for. When nv is higher, accuracy will be higher, but running time slower.
744
+
--nv Buffer size of vectors. Typically the buffer size should be greater than the number of singular values you look for. When nv is higher, accuracy will be higher, but running time slower.
744
745
--nsv Number of singular values requested. Should be typically less than --nv
745
746
--ortho_repeats Number of repeats on the orthogonalization step. Default is 1 (no repeats). Increase this number for higher accuracy but slower execution. Maximal allowed values is 3.
746
747
--max_iter Number of allowed restarts. The minimum is 2= no restart. When max_iter is higher, the result will be more accurate, but the running slower.
@@ -755,15 +756,9 @@ Note: for improving accuracy tol should be reduced. max_iter and nv should be in
755
756
On default, the singular values will be written to an output file. When using --save_vectors=1 the singular vectors of the matrices U and V will be written into file as well.
756
757
Here is an example of the output files created by the A2 example:
757
758
\verbatim
758
-
-rw-r--r-- 1 bickson staff 224 Oct 8 13:12 singular_values
759
-
-rw-r--r-- 1 bickson staff 102 Oct 8 13:12 V.3_1_of_1
760
-
-rw-r--r-- 1 bickson staff 90 Oct 8 13:12 V.2_1_of_1
761
-
-rw-r--r-- 1 bickson staff 89 Oct 8 13:12 V.1_1_of_1
762
-
-rw-r--r-- 1 bickson staff 92 Oct 8 13:12 V.0_1_of_1
763
-
-rw-r--r-- 1 bickson staff 56 Oct 8 13:12 U.3_1_of_1
764
-
-rw-r--r-- 1 bickson staff 66 Oct 8 13:12 U.2_1_of_1
765
-
-rw-r--r-- 1 bickson staff 68 Oct 8 13:12 U.1_1_of_1
766
-
-rw-r--r-- 1 bickson staff 69 Oct 8 13:12 U.0_1_of_1
759
+
-rw-r--r-- 1 bickson staff 136 Nov 17 14:19 outsingular_values
760
+
-rw-r--r-- 1 bickson staff 353 Nov 17 14:19 out.V_1_of_1
761
+
-rw-r--r-- 1 bickson staff 244 Nov 17 14:19 out.U_1_of_1
767
762
\endverbatim
768
763
<br>
769
764
The singular_values file has a straightforward format:
@@ -775,20 +770,58 @@ The singular_values file has a straightforward format:
775
770
1.69699593375e-64
776
771
\endverbatim
777
772
778
-
The singular vector file has the following format:
773
+
Now let's compate GraphLba's output to Matlab execution:
779
774
\verbatim
780
-
> cat V.0_1_of_1
781
-
0 -0.50467448230910661
782
-
1 -0.46633647481132878
783
-
2 -0.44142369037529217
784
-
3 -0.57704339935747928
775
+
>> A2
776
+
ans =
777
+
778
+
0.8147 0.9134 0.2785 0.9649
779
+
0.9058 0.6324 0.5469 0.1576
780
+
0.1270 0.0975 0.9575 0.9706
781
+
782
+
>>[u,d,v] = svd(A2)
783
+
784
+
u =
785
+
786
+
-0.7019 0.2772 0.6561
787
+
-0.5018 0.4613 -0.7317
788
+
-0.5055 -0.8428 -0.1847
789
+
790
+
791
+
d =
792
+
793
+
2.1610 0 0
794
+
0 0.9790 0
795
+
0 0 0.5542
796
+
797
+
798
+
v =
799
+
800
+
-0.5047 0.5481 -0.2737
801
+
-0.4663 0.4726 0.2139
802
+
-0.4414 -0.4878 -0.7115
803
+
-0.5770 -0.4882 0.6108
785
804
\endverbatim
786
805
787
-
The first colum is the vector index, and the second column is the vector value.
788
-
Note, that using multicore / distributed the vector columns may appear in a random order.
789
-
In that case, you should sort them out, for example using the sort command:
0 commit comments