bugGNU Octave - Bugs: bug #31881, mod fails test during make check

 
 

bug #31881: mod fails test during make check

Submitted by:  Doug Stewart <dastew>
Submitted on:  Wed 15 Dec 2010 01:04:07 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Doug StewartOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 20 Dec 2010 07:17:46 AM UTC, comment #7:

I checked in the changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/57868a21170e

Thanks.

John W. Eaton <jwe>
Project Administrator
Sat 18 Dec 2010 10:15:42 PM UTC, comment #6:

I see that Tatsuro MATSUOKA had this same problem.
The patch made by JWE fixes it but has not been applied yet.

Doug Stewart <dastew>
Wed 15 Dec 2010 02:45:01 PM UTC, comment #5:

Yes the patch fixes the tests.

The following is a summery of my setup and hardware.

Lex libraries:
LIBS: -lm

AMD CPPFLAGS:
AMD LDFLAGS:
AMD libraries: -lamd
ARPACK libraries: -larpack
BLAS libraries: -lcblas -lf77blas -latlas
CAMD CPPFLAGS:
CAMD LDFLAGS:
CAMD libraries: -lcamd
CARBON libraries:
CCOLAMD CPPFLAGS:
CCOLAMD LDFLAGS:
CCOLAMD libraries: -lccolamd
CHOLMOD CPPFLAGS:
CHOLMOD LDFLAGS:
CHOLMOD libraries: -lcholmod
COLAMD CPPFLAGS:
COLAMD LDFLAGS:
COLAMD libraries: -lcolamd
CURL CPPFLAGS:
CURL LDFLAGS:
CURL libraries: -lcurl
CXSPARSE CPPFLAGS:
CXSPARSE LDFLAGS:
CXSPARSE libraries: -lcxsparse
DL libraries: -ldl
FFTW3 CPPFLAGS:
FFTW3 LDFLAGS:
FFTW3 libraries: -lfftw3
FFTW3F CPPFLAGS:
FFTW3F LDFLAGS:
FFTW3F libraries: -lfftw3f
fontconfig CFLAGS:
fontconfig LIBS: -lfontconfig
FT2_CFLAGS: -I/usr/include/freetype2
FT2_LIBS: -lfreetype -lz
GLPK CPPFLAGS:
GLPK LDFLAGS:
GLPK libraries: -lglpk
graphics CFLAGS: -g -O2 -D_THREAD_SAFE -D_REENTRANT
graphics LIBS: -Wl,-Bsymbolic-functions -lfltk_gl -lfltk
Magick++ CPPFLAGS: -I/usr/include/GraphicsMagick
Magick++ LDFLAGS:
Magick++ libraries: -lGraphicsMagick++ -lGraphicsMagick
HDF5 CPPFLAGS:
HDF5 LDFLAGS:
HDF5 libraries:
LAPACK libraries: -llapack
OPENGL libraries: -lfontconfig -L/usr/X11R6/lib -lGL -lGLU
PTHREAD flags: -pthread
PTHREAD libraries:
QHULL CPPFLAGS:
QHULL LDFLAGS:
QHULL libraries: -lqhull
QRUPDATE libraries:
READLINE libraries: -lreadline
REGEX libraries: -L/usr/lib -lpcre
TERM libraries: -lncurses
UMFPACK libraries: -lumfpack
X11 include flags:
X11 libraries: -lX11
Z CPPFLAGS:
Z LDFLAGS:
Z libraries: -lz

Default pager: less
gnuplot: gnuplot

Do internal array bounds checking: false
Build static libraries: false
Build shared libraries: true
Dynamic Linking: true (dlopen)
Include support for GNU readline: true
64-bit array dims and indexing: false

configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow.
configure: WARNING: HDF5 library not found. Octave will not be able to save or load HDF5 data files.
configure:
configure: NOTE: libraries may be skipped if a library is not found OR
configure: NOTE: if the library on your system is missing required features.
doug@doug-desktop:~/octave_dev/compiling/octave$

My Hardawe and OS is:

Ubuntu 10.04 Kernel Linux 2.6.32-26-generic GNOME 2.30.2
CPU is: AMD Athlon 64x2 5200+ 2.0 GiB memory

The Tip I am using is:

doug@doug-desktop:~/octave_dev/compiling/octave$ hg tip
changeset: 11370:690181867e54
tag: tip
user: John W. Eaton <jwe@octave.org>
date: Wed Dec 15 03:18:44 2010 -0500
files: src/ChangeLog
description:
ChangeLog fix

Befor the patch is applied:

>>>>> processing /home/doug/octave_dev/compiling/octave/src/data.cc

***** assert (mod (2.1, 0.1), 0)
!!!!! test failed
assert (mod (2.1, 0.1),0) expected
0
but got
2.7756e-17
values do not match

after applying the patch and recompiling ( compile takes 42 min.) I got:

test_switch.m .......................................... PASS 7/7
test_system.m .......................................... PASS 95/95
test_transpose.m ....................................... PASS 4/4
test_try.m ............................................. PASS 10/10
test_unwind.m .......................................... PASS 2/2
test_while.m ........................................... PASS 5/5

Summary:

PASS 6630
FAIL 0

There was 1 expected failure (see fntests.log for details).

Doug Stewart <dastew>
Wed 15 Dec 2010 07:15:59 AM UTC, comment #4:

What kind of hardware are you using?

Does it have extended precision for floating point calculations?

Does the attached patch avoid the problem for you?

(file #22207)

John W. Eaton <jwe>
Project Administrator
Wed 15 Dec 2010 01:49:49 AM UTC, comment #3:

octave:1> format long
octave:2> 2.1 - 0.1*floor(2.1/0.1)
ans = 0
octave:3> ans==0
ans = 1

Doug Stewart <dastew>
Wed 15 Dec 2010 01:48:33 AM UTC, comment #2:

I tried it and got:

octave:1> format long
octave:2> 2.1 - 0.1*floor(2.1/0.1)
ans = 0

Doug Stewart <dastew>
Wed 15 Dec 2010 01:38:56 AM UTC, comment #1:

The failing test is a new one that was added within the last day to test a corner case of mod. Could you try the following code and report back the result?

Rik <rik5>
Project Administrator
Wed 15 Dec 2010 01:04:07 AM UTC, original submission:

doug@doug-desktop:~/octave_dev/compiling/octave$ hg tip
changeset: 11362:456752abad08
tag: tip
user: John W. Eaton <jwe@octave.org>
date: Tue Dec 14 02:01:59 2010 -0500

I compiled todays tip and got one error

>>>>> processing /home/doug/octave_dev/compiling/octave/src/data.cc

***** assert (mod (2.1, 0.1), 0)
!!!!! test failed
assert (mod (2.1, 0.1),0) expected
0
but got
2.7756e-17
values do not match

I have not looked any farther.

Doug Stewart <dastew>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #22207:  diffs.txt added by jwe (483B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by dastew (Submitted the item)
  • -unavailable- added by dastew
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Dec 2010 07:17:46 AM UTCjweStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Wed 15 Dec 2010 07:15:59 AM UTCjweAttached File-=>Added diffs.txt, #22207
    Wed 15 Dec 2010 01:38:56 AM UTCrik5StatusNone=>Need Info
      SummaryFailed test during make check=>mod fails test during make check
    Wed 15 Dec 2010 01:04:07 AM UTCdastewCarbon-Copy-=>Added dastew

    Back to the top


    Powered by Savane 3.1-cleanup1