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

tests fail in Ubuntu 10.04 32bit #4850

Closed
waldyrious opened this issue Nov 18, 2013 · 25 comments
Closed

tests fail in Ubuntu 10.04 32bit #4850

waldyrious opened this issue Nov 18, 2013 · 25 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@waldyrious
Copy link
Contributor

I had already mentioned this in the mailing list regarding v0.2 RC4. Apparently the issue still stands with the final release. Pinging @staticfloat as requested.

The failing test:

$ make test
JULIA test/all
    (...)
    From worker 3:       * math
exception on 2: ERROR: assertion failed: |:(sinpi(x)) - :(sin(*(pi,x)))| <= 1.7763568394002505e-15
  :(sinpi(x)) = -0.8090169943749471
  :(sin(*(pi,x))) = -0.9999999882345147
  difference = 0.19098299385956763 > 1.7763568394002505e-15
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:14
 in runtests at /home/waldir/julia/test/testdefs.jl:5
 in anonymous at multi.jl:834
 in run_work_thunk at multi.jl:575
 in anonymous at task.jl:834
at math.jl:16
ERROR: assertion failed: |:(sinpi(x)) - :(sin(*(pi,x)))| <= 1.7763568394002505e-15
  :(sinpi(x)) = -0.8090169943749471
  :(sin(*(pi,x))) = -0.9999999882345147
  difference = 0.19098299385956763 > 1.7763568394002505e-15
 in anonymous at multi.jl:1384
at math.jl:16
at /home/waldir/julia/test/runtests.jl:21

make[1]: *** [all] Error 1
make: *** [test] Error 2

Info about the environment (btw it's a physical computer, not a VM)

julia> versioninfo(true)
Julia Version 0.2.0
Commit 05c6461 (2013-11-16 23:44 UTC)
Platform Info:
  System: Linux (i486-linux-gnu)
  WORD_SIZE: 32
           Ubuntu 10.04.4 LTS
  uname: Linux 2.6.32-53-generic-pae #115-Ubuntu SMP Wed Oct 23 17:44:16 UTC 2013 i686 unknown
Memory: 0.9781646728515625 GB (394.0859375 MB free)
Uptime: 734.149031142 sec
Load Avg:  0.747559  1.31787  0.814453
Intel(R) Pentium(R) 4 CPU 3.00GHz: 
       speed         user         nice          sys         idle          irq
#1  2998 MHz      37210 s        442 s       1872 s      30579 s        115 s
#2  2998 MHz      36764 s        468 s       1779 s      34154 s          8 s  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
Environment:
  TERM = xterm
  DEFAULTS_PATH = /usr/share/gconf/gnome.default.path
  PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  MANDATORY_PATH = /usr/share/gconf/gnome.mandatory.path
  HOME = /home/waldir

Package Directory: /home/waldir/.julia
No packages installed.
@staticfloat
Copy link
Sponsor Member

What compilers did you use to build Julia and OpenBLAS?

@waldyrious
Copy link
Contributor Author

$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3

also, from the build output:

OpenBLAS build complete.

  OS               ... Linux            
  Architecture     ... x86              
  BINARY           ... 32bit                
  C compiler       ... GCC  (command line : gcc)
  Fortran compiler ... GFORTRAN  (command line : gfortran)
  Library Name     ... libopenblasp-r0.2.8.a (Multi threaded; Max num-threads is 8)

@staticfloat
Copy link
Sponsor Member

Hmmm. Perhaps this could be some kind of bug in how openlibm is built. Can you go into deps/openlibm/test, run ./test-double and ./test-float and post the output? You might have to run make in that directory to generate the test- executables.

@waldyrious
Copy link
Contributor Author

Sure. Here's test-double:

~/julia/deps/openlibm/test$ ./test-double 
testing double (without inline functions)
FP-Stack wrong after test exp (-0) == 1 (2, should be 0)

Test suite completed:
  1148 test cases plus 962 tests for exception flags executed.
  1 errors occurred.

And test-float:

~/julia/deps/openlibm/test$ ./test-float 
testing float (without inline functions)
Failure: Test: erfc (1.2) == 0.089686021770364619762
Result:
 is:          8.96860063076019287109e-02   0x1.6f5a9800000000000000p-4
 should be:   8.96860212087631225586e-02   0x1.6f5a9c00000000000000p-4
 difference:  1.49011611938476562500e-08   0x1.00000000000000000000p-26
 ulp       :  2.0000
 max.ulp   :  1.0000
Failure: Test: yn (3, 0.7) == -15.819479052819633505
Result:
 is:         -1.58194799423217773438e+01  -0x1.fa392e00000000000000p+3
 should be:  -1.58194789886474609375e+01  -0x1.fa392c00000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000

Test suite completed:
  1131 test cases plus 953 tests for exception flags executed.
  2 errors occurred.

@ViralBShah
Copy link
Member

@staticfloat I thought this is about openblas and not openlibm.

@staticfloat
Copy link
Sponsor Member

@ViralBShah I'm not so sure. Taking a look at the tests that are failing, it seems likely to me that there's something funky going on with the new sinpi() work, possibly because of the fact that he's running on 32-bit, but also possibly because of his compiler.

@Waldir your openlibm tests look fine. Just to be completely explicit so we can maybe figure out what's going on, what does the following output for you:

julia> sinpi(-2.7)
-0.8090169943749471

julia> sin(-2.7*pi)
-0.8090169943749476

@waldyrious
Copy link
Contributor Author

julia> sinpi(-2.7)
-0.8090169943749471

julia> sinpi(-2.7*pi)
-0.9984544028981568

@ivarne
Copy link
Sponsor Member

ivarne commented Nov 20, 2013

@Waldir The second function should be sin not sinpi

@waldyrious
Copy link
Contributor Author

woops, sorry.

julia> sin(-2.7*pi)
-0.9999999882345147

@ViralBShah
Copy link
Member

@staticfloat My bad. That second test is clearly a sign that something is wrong with openlibm on 32-bit.

@ViralBShah
Copy link
Member

Is it possible that the system libm is getting used?

@staticfloat
Copy link
Sponsor Member

Judging from his versioninfo() I would guess not. I think perhaps it would be best to ask @simonbyrne if he has any ideas why this would happen/ideas for moving forward

@simonbyrne
Copy link
Contributor

Strange, this doesn't seem to be a problem with sinpi: @Waldir what do you get for -2.7*pi?

@staticfloat
Copy link
Sponsor Member

Wow, I completely missed the fact that sinpi is actually the one giving the CORRECT answer here, not sin! That's somewhat incredible, actually.

@waldyrious
Copy link
Contributor Author

@simonbyrne

julia> -2.7*pi
-8.482300164692441

@staticfloat
Copy link
Sponsor Member

@Waldir just wanted to bring this up again: are you still having this issue?

@waldyrious
Copy link
Contributor Author

With the release, yes, nothing's changed (I use that machine pretty rarely). If you think it's pertinent, later today I can checkout master rather than 0.2, and try again.

@staticfloat
Copy link
Sponsor Member

I'm not sure that would help. In any case, I'm pretty sure we would want to fix this on 0.2 as well.

@simonbyrne any further ideas?

@nolta
Copy link
Member

nolta commented Dec 7, 2013

Might be interesting to recompile w/ USE_SYSTEM_LIBM=1.

@waldyrious
Copy link
Contributor Author

@nolta indeed, with USE_SYSTEM_LIBM=1 all tests pass. Note: I do get several warnings of "possible conflict in library symbol" (for floor, round, sin, etc) but I assume that is expected.

@simonbyrne
Copy link
Contributor

Okay, so this seems to be an openlibm issue, so I guess this should be moved there?

@vtjnash
Copy link
Sponsor Member

vtjnash commented Apr 25, 2014

did this get fixed? i just ran make test-math on my 32-bit ubuntu 13.10 virtual machine, and it worked fine

@ViralBShah
Copy link
Member

I suggest reopening this if still failing.

@waldyrious
Copy link
Contributor Author

I just managed to re-test on the 10.04 machine. This time I used the 0.2.1 release, just in case, but the results were the same as before:

make test-math
    JULIA test/math
     * math
exception on 1: ERROR: assertion failed: |:(sinpi(x)) - :(sin(*(pi,x)))| <= 1.7763568394002505e-15
  :(sinpi(x)) = -0.8090169943749471
  :(sin(*(pi,x))) = -0.9999999882345147
  difference = 0.19098299385956763 > 1.7763568394002505e-15
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:14
 in runtests at /home/waldir/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
at math.jl:16
ERROR: assertion failed: |:(sinpi(x)) - :(sin(*(pi,x)))| <= 1.7763568394002505e-15
  :(sinpi(x)) = -0.8090169943749471
  :(sin(*(pi,x))) = -0.9999999882345147
  difference = 0.19098299385956763 > 1.7763568394002505e-15
 in error at error.jl:22
 in test_approx_eq at test.jl:68
 in anonymous at no file:14
 in runtests at /home/waldir/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
at math.jl:16
at /home/waldir/julia/test/runtests.jl:21

make[1]: *** [math] Error 1
make: *** [test-math] Error 2
make test-math USE_SYSTEM_LIBM=1
    JULIA test/math
     * math
    SUCCESS

(again, with one "Warning: Possible conflict in library symbol round" in the openlibm compilation, and several of those (floor, round, frexp, ...) with the system libm)

I am not reopening this because, as @simonbyrne mentioned above, this seems to be an openlibm issue. I don't know how to phrase it, though. Should I just open a bug there saying that compiling 0.2.1 w/ openlibm in ubuntu 10.04 32bit fails the tests, while using the system libm works? Or something more specific?

@staticfloat
Copy link
Sponsor Member

I would do that, and explicitly mention the fact that sin() is not giving
you the answer it should be.

On Mon, May 12, 2014 at 1:01 PM, Waldir Pimenta notifications@github.comwrote:

I just managed to re-test on the 10.04 machine. This time I used the 0.2.1
release, just in case, but the results were the same as before:

make test-math
JULIA test/math
* math
exception on 1: ERROR: assertion failed: |:(sinpi(x)) - :(sin((pi,x)))| <= 1.7763568394002505e-15
:(sinpi(x)) = -0.8090169943749471
:(sin(
(pi,x))) = -0.9999999882345147
difference = 0.19098299385956763 > 1.7763568394002505e-15
in error at error.jl:22
in test_approx_eq at test.jl:68
in anonymous at no file:14
in runtests at /home/waldir/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
at math.jl:16
ERROR: assertion failed: |:(sinpi(x)) - :(sin((pi,x)))| <= 1.7763568394002505e-15
:(sinpi(x)) = -0.8090169943749471
:(sin(
(pi,x))) = -0.9999999882345147
difference = 0.19098299385956763 > 1.7763568394002505e-15
in error at error.jl:22
in test_approx_eq at test.jl:68
in anonymous at no file:14
in runtests at /home/waldir/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
at math.jl:16
at /home/waldir/julia/test/runtests.jl:21

make[1]: *** [math] Error 1
make: *** [test-math] Error 2

make test-math USE_SYSTEM_LIBM=1
JULIA test/math
* math
SUCCESS

(again, with one "Warning: Possible conflict in library symbol round" in
the openlibm compilation, and several of those (floor, round, frexp, ...)
with the system libm)

I am not reopening this because, as @simonbyrnehttps://github.com/simonbyrnementioned above, this seems to be an openlibm issue. I don't know how to
phrase it, though. Should I just open a bug there saying that compiling
0.2.1 w/ openlibm in ubuntu 10.04 fails the tests, while using the system
libm works? Or something more specific?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4850#issuecomment-42880499
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

8 participants