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

make test-linalg fails #5472

Closed
rickhg12hs opened this issue Jan 22, 2014 · 14 comments · Fixed by #5534
Closed

make test-linalg fails #5472

rickhg12hs opened this issue Jan 22, 2014 · 14 comments · Fixed by #5534

Comments

@rickhg12hs
Copy link
Contributor

$ uname -a
Linux steelers.net 3.12.8-200.fc19.i686.PAE JuliaLang/julia#1 SMP Thu Jan 16 04:29:09 UTC 2014 i686 i686 i386 GNU/Linux
$ make test-linalg
    JULIA test/linalg
     * linalg
exception on 1: ERROR: assertion failed: |:(\(W,v)) - iFv| <= 7.105427357601002e-10
  :(\(W,v)) = -105.1618383308551
30.132386546280248
103.10478249210304
85.5026629379321
42.8100069344292

  iFv = -105.16183834007155
30.132386548803957
103.10478250114792
85.50266294548928
42.81000693815962

  difference = 9.21644982554426e-9 > 7.105427357601002e-10
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:459
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:613
 in run_work_thunk at multi.jl:575
 in remotecall_fetch at multi.jl:647
 in remotecall_fetch at multi.jl:662
 in anonymous at multi.jl:1382
while loading linalg.jl, in expression starting on line 384
ERROR: assertion failed: |:(\(W,v)) - iFv| <= 7.105427357601002e-10
  :(\(W,v)) = -105.1618383308551
30.132386546280248
103.10478249210304
85.5026629379321
42.8100069344292

  iFv = -105.16183834007155
30.132386548803957
103.10478250114792
85.50266294548928
42.81000693815962

  difference = 9.21644982554426e-9 > 7.105427357601002e-10
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:459
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:613
 in run_work_thunk at multi.jl:575
 in remotecall_fetch at multi.jl:647
 in remotecall_fetch at multi.jl:662
 in anonymous at multi.jl:1382
while loading linalg.jl, in expression starting on line 384
while loading /usr/local/src/julia/julia/test/runtests.jl, in expression starting on line 22

make[1]: *** [linalg] Error 1
make: *** [test-linalg] Error 2
$ ./julia 
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+1118 (2014-01-22 05:37 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit d5b5a1f* (0 days old master)
|__/                   |  i686-redhat-linux

julia> versioninfo()
Julia Version 0.3.0-prerelease+1118
Commit d5b5a1f* (2014-01-22 05:37 UTC)
Platform Info:
  System: Linux (i686-redhat-linux)
  CPU: Genuine Intel(R) CPU           T2250  @ 1.73GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm

julia> 
@jiahao
Copy link
Member

jiahao commented Jan 22, 2014

The Woodbury identity code hasn't been changed in a long while; I'm a little surprised that one of its tests is complaining now.

@andreasnoack
Copy link
Member

The tolerance criterion was changed here, but I am not sure why it should affect the results on a 32 bit machine. I think the matrices should be identical on 32 and 64 bit.

@rickhg12hs
Copy link
Contributor Author

make test-linalg still fails identically. Issue intended to be closed?

@mschauer
Copy link
Contributor

It fails when the matrices are of type Int32. One problem is that srand(123);rand(1:100) produces different numbers with 32 or 64 bit, so the matrices are differ from the beginning.

@staticfloat
Copy link
Member

@mschauer Could you upload the matrix that is being used to a gist or something? Then we could run the same matrix through a 64-bit version of julia and see if the issue appears there as well. This could just be a case of random numbers lining up such that they escape our bounds (Which really means that we need to loosen our bounds some)

@mschauer
Copy link
Contributor

This is easiest.

         n = 10 
         srand(61516384) 
         d = rand(int32(1:100), n) 
         dl = -rand(int32(0:10), n-1) 
         du = -rand(int32(0:10), n-1) 
         v = rand(int32(1:100), n) 
         B = rand(int32(1:100), n, 2) 

         # Woodbury 
         U = rand(int32(1:100), n, 2) 
         V = rand(int32(1:100), 2, n) 
         C = rand(int32(1:100), 2, 2) 

Check:

julia> C
2x2 Array{Int32,2}:
 15  30
 15   4

@rickhg12hs
Copy link
Contributor Author

New 32-bit failures noted when setting n = 7 in test/linalg.jl.

@jiahao
Copy link
Member

jiahao commented Jan 27, 2014

New 32-bit failures noted when setting n = 7 in test/linalg.jl.

I'm not the least bit surprised, since a) you are generating a new subset of matrices to test our routines against, which is not dissimilar from changing the random seed, and b) most of our tests use tolerance bounds that are exceedingly heuristic. It is too easy to take the easy way out by continually loosening the test criteria ad infinitum, ad nauseam, ad mortem, but a proper fix to this issue will have to involve overhauling most of the linear algebra tests. Suffice to say, this will not be an easy task.

@rickhg12hs
Copy link
Contributor Author

Actually, the new failure was an overflow in calculating the determinant of a Int32 Tridiagonal matrix on a 32-bit machine.

What is the proposed strategy for users to detect and/or guard against and/or be notified of integer overflow? Silently returning inaccurate (mod typemax + 1) determinants is problematic.

@rickhg12hs
Copy link
Contributor Author

Error update: (Xref JuliaLang/LinearAlgebra.jl#67 )

$ ./julia -e 'versioninfo()'
Julia Version 0.3.0-prerelease+1555
Commit 94fbe7f* (2014-02-13 00:33 UTC)
Platform Info:
  System: Linux (i686-redhat-linux)
  CPU: Genuine Intel(R) CPU           T2250  @ 1.73GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
$ make test-linalg
    JULIA test/linalg
    From worker 3:       * linalg2
    From worker 2:       * linalg1
exception on 3: ERROR: assertion failed: |:(\(W,v)) - iFv| <= 7.105427357601002e-10
  :(\(W,v)) = -105.1618383308551
30.132386546280248
103.10478249210304
85.5026629379321
42.8100069344292

  iFv = -105.16183834007155
30.132386548803957
103.10478250114792
85.50266294548928
42.81000693815962

  difference = 9.21644982554426e-9 > 7.105427357601002e-10
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:98
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:793
 in run_work_thunk at multi.jl:563
 in anonymous at task.jl:793
while loading linalg2.jl, in expression starting on line 23
exception on 2: ERROR: assertion failed: |:(det(capd)) - :(det(apd))| <= 0.002384185791015625
  :(det(capd)) = 1.626428240984628e9
  :(det(apd)) = 1.6264282409980435e9
  difference = 0.01341557502746582 > 0.002384185791015625
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:54
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:793
 in run_work_thunk at multi.jl:563
 in anonymous at task.jl:793
while loading linalg1.jl, in expression starting on line 23
ERROR: assertion failed: |:(det(capd)) - :(det(apd))| <= 0.002384185791015625
  :(det(capd)) = 1.626428240984628e9
  :(det(apd)) = 1.6264282409980435e9
  difference = 0.01341557502746582 > 0.002384185791015625
 in anonymous at task.jl:1293
while loading linalg1.jl, in expression starting on line 23
while loading /usr/local/src/julia/julia/test/runtests.jl, in expression starting on line 34

make[1]: *** [linalg] Error 1
make: *** [test-linalg] Error 2
$ 

@rickhg12hs
Copy link
Contributor Author

Error update: (Xref JuliaLang/LinearAlgebra.jl#67 , JuliaLang/LinearAlgebra.jl#79 , #5902 )

$ ./julia -e 'versioninfo()'
Julia Version 0.3.0-prerelease+1692
Commit 736251d* (2014-02-23 06:21 UTC)
Platform Info:
  System: Linux (i686-redhat-linux)
  CPU: Genuine Intel(R) CPU           T2250  @ 1.73GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
$ make test-linalg
    JULIA test/linalg
    From worker 2:       * linalg1
    From worker 3:       * linalg2
exception on 3: ERROR: assertion failed: |W \ v - iFv| <= 7.105427357601002e-10
  W \ v = -105.1618383308551
30.132386546280248
103.10478249210304
85.5026629379321
42.8100069344292

  iFv = -105.16183834007155
30.132386548803957
103.10478250114792
85.50266294548928
42.81000693815962

  difference = 9.21644982554426e-9 > 7.105427357601002e-10
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:98
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:822
 in run_work_thunk at multi.jl:590
 in anonymous at task.jl:822
while loading linalg2.jl, in expression starting on line 23
exception on 2: ERROR: assertion failed: |det(capd) - det(apd)| <= 0.002384185791015625
  det(capd) = 1.626428240984628e9
  det(apd) = 1.6264282409980435e9
  difference = 0.01341557502746582 > 0.002384185791015625
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:54
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:822
 in run_work_thunk at multi.jl:590
 in anonymous at task.jl:822
while loading linalg1.jl, in expression starting on line 23
ERROR: assertion failed: |det(capd) - det(apd)| <= 0.002384185791015625
  det(capd) = 1.626428240984628e9
  det(apd) = 1.6264282409980435e9
  difference = 0.01341557502746582 > 0.002384185791015625
 in anonymous at task.jl:1322
while loading linalg1.jl, in expression starting on line 23
while loading /usr/local/src/julia/julia/test/runtests.jl, in expression starting on line 34

make[1]: *** [linalg] Error 1
make: *** [test-linalg] Error 2
$ 

@rickhg12hs
Copy link
Contributor Author

It's been a long time since make test-linalg, make test-linalg1, or make test-linalg2 has passed.

Latest error update:

$ ./julia -e 'versioninfo()'
Julia Version 0.3.0-prerelease+1846
Commit c776e53* (2014-03-05 13:12 UTC)
Platform Info:
  System: Linux (i686-redhat-linux)
  CPU: Genuine Intel(R) CPU           T2250  @ 1.73GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
$ make test-linalg
    JULIA test/linalg
    From worker 2:       * linalg1
    From worker 3:       * linalg2
exception on 3: ERROR: assertion failed: |W \ v - iFv| <= 7.105427357601002e-10
  W \ v = -105.1618383308551
30.132386546280248
103.10478249210304
85.5026629379321
42.8100069344292

  iFv = -105.16183834007155
30.132386548803957
103.10478250114792
85.50266294548928
42.81000693815962

  difference = 9.21644982554426e-9 > 7.105427357601002e-10
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:98
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:822
 in run_work_thunk at multi.jl:590
 in anonymous at task.jl:822
while loading linalg2.jl, in expression starting on line 23
exception on 2: ERROR: assertion failed: |det(capd) - det(apd)| <= 0.002384185791015625
  det(capd) = 1.626428240984628e9
  det(apd) = 1.6264282409980435e9
  difference = 0.01341557502746582 > 0.002384185791015625
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:54
 in runtests at /usr/local/src/julia/julia/test/testdefs.jl:5
 in anonymous at multi.jl:822
 in run_work_thunk at multi.jl:590
 in anonymous at task.jl:822
while loading linalg1.jl, in expression starting on line 23
ERROR: assertion failed: |det(capd) - det(apd)| <= 0.002384185791015625
  det(capd) = 1.626428240984628e9
  det(apd) = 1.6264282409980435e9
  difference = 0.01341557502746582 > 0.002384185791015625
 in anonymous at task.jl:1311
while loading linalg1.jl, in expression starting on line 23
while loading /usr/local/src/julia/julia/test/runtests.jl, in expression starting on line 34

make[1]: *** [linalg] Error 1
make: *** [test-linalg] Error 2
$

@rickhg12hs
Copy link
Contributor Author

Fixed by PR #5902 ?

@rickhg12hs
Copy link
Contributor Author

The test has been passing for a while now. I don't know of a reason to keep this open.

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