Numerical problem?

21 views
Skip to first unread message

absalom_hicks

unread,
Jul 4, 2016, 12:53:56 PM7/4/16
to Scala Breeze
After running

/** check if A'A yields a symmetric matrix */
def testSymmetry(m:Int): Unit ={

 val A
= DenseMatrix.rand[Double](m,m)
 val S
= A.t*A
 val diff
= max(abs(S-S.t))
 
print("||C-C.t||_oo = "+diff)
}

with m=100 I got ||C-C.t||_oo = 2.4868995751603507E-14.
Do you also think this is a bit much for a 100x100 matrix A?
It is enough to fail the symmetry test in a symmetric eigenvalue decomposition.
I am using openblas.

Is this

(a) no problem,
(b) a breeze problem or
(c) a Java problem?

I have not seen the likes of this with C++.
Now C++ on Intel processors does all intermediate computations as long doubles and will only cut back
to a smaller type when the value is assigned to a variable (if I recall this correctly) while Java does
not do this. Can this be the reason?




Alec Zorab

unread,
Jul 4, 2016, 1:17:36 PM7/4/16
to Scala Breeze
Windows 7, using -Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK:

||C-C.t||_oo = 0.0

Do you see the same? If so, that implies something is up with your openblas build.

--
You received this message because you are subscribed to the Google Groups "Scala Breeze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-breeze...@googlegroups.com.
To post to this group, send email to scala-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-breeze/ccdc5b3d-c6bb-4f73-9688-e42a50d01958%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

absalom_hicks

unread,
Jul 4, 2016, 2:11:09 PM7/4/16
to Scala Breeze
Please accept my humblest apologies for insulting Java, since openblas is not written in Java, Java has nothing to do with it.

I am running Linux Mint 17.2 Rafaela and used the openblas from the distribution.
My processor (core i5, 5675C) is know to have problems (random crashes on Linux, fine on Windows)
ut it is not known to have floating point problems.

absalom_hicks

unread,
Jul 4, 2016, 4:28:27 PM7/4/16
to Scala Breeze
It is a problem with openblas. When I link against the standard libblas I get ||C-C.t||=0.0 also.
Reply all
Reply to author
Forward
0 new messages