bugGNU Octave - Bugs: bug #58807, Tolerance in BISTs is exceeded in...

 
 

bug #58807: Tolerance in BISTs is exceeded in 32bit Windows builds

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Wed 22 Jul 2020 10:56:28 AM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  6.0.90 Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Sat 01 Aug 2020 09:43:26 AM UTC, comment #5: 

The BISTs mentionend in comment #0 no longer fail for me.

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Thu 30 Jul 2020 10:29:51 AM UTC, comment #4: 

I pushed the following change to get gcc to use the SSE/SSE2 instructions by default also for the 32bit Windows target:
https://hg.octave.org/mxe-octave/rev/512e69a36d09

MXE users that build for Windows 32bit should probably start with a clean build. Depending on their ccache configuration, it might also be necessary to purge the cache (should not be necessary with the default settings of ccache).

The Windows 64bit target or other platforms are not affected by this change. So no need to purge anything for those.

Marking as ready for test

Markus Mützel <mmuetzel>
Project Member
Thu 23 Jul 2020 07:16:06 AM UTC, comment #3: 

I asked about raising the minimum hardware requirements for Octave on 32bit Windows on discourse:
https://octave.discourse.group/t/should-we-require-a-cpu-with-sse2-for-windows-32bit/101

Markus Mützel <mmuetzel>
Project Member
Wed 22 Jul 2020 07:56:02 PM UTC, comment #2: 

I created a new build from scratch with the patch for the win32 target. I can confirm that the precision problems are fine now and that the ODE functions still fail.

Hg200 <hg200>
Wed 22 Jul 2020 01:48:58 PM UTC, comment #1: 

The attached patch for MXE Octave changes the specs for gcc to use SSE and SSE2 instructions for i686-w64 by default. This way it should not be necessary to change the build rule of every single package.

Just to be on the safe side, I wiped the ccache cache before re-compiling Octave for Windows 32bit.

With that build, the tests mentioned in comment #0 no longer fail.

(file #49530)

Markus Mützel <mmuetzel>
Project Member
Wed 22 Jul 2020 10:56:28 AM UTC, original submission:  

MXE Octave (hg id a65cacd05892) was configured to cross-compile Windows 32bit
executables with:

./configure --with-pkg-dir=../mxe-octave-pkg --with-ccache
--enable-octave=default --enable-binary-packages --enable-qt5
--enable-devel-tools --disable-windows-64 --disable-64 --disable-fortran-int64
--disable-system-opengl

On Windows 10 2004 64bit (and according to bug #58790 also on Windows 7), the tolerance for some of the tests is exceeded.
E.g.:

>>>>> processing D:\SVN\Octave\test\OC20A7~1\OCTAVE~1\mingw32\share\octave\7.0.0\etc\tests\libinterp\corefcn\graphics.cc-tst
***** test
hf = figure ("visible", "off");
unwind_protect
   hax = axes ("parent", hf);
   plot (0, pi);
   assert (get (hax, "xlim"), [-1, 1]);
   assert (get (hax, "xlimmode"), "auto");
   assert (get (hax, "ylim"), [2.8, 3.5], 2*eps);
   assert (get (hax, "ylimmode"), "auto");
   set (hax, "xlim", [1, 1], "ylim", [0, 0]);
   assert (get (hax, "xlim"), [0.9, 1.1]);
   assert (get (hax, "xlimmode"), "manual");
   assert (get (hax, "ylim"), [0, 1]);
   assert (get (hax, "ylimmode"), "manual");
   set (hax, "xlim", [-Inf, Inf], "ylim", [-Inf, Inf]);
   ## Matlab does not update the properties
   assert (get (hax, "xlim"), [0, 1]);
   assert (get (hax, "ylim"), [0.9, 1.1]*pi, 2*eps);
unwind_protect_cleanup
   delete (hf);
end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (get (hax, "ylim"),[2.8, 3.5],2 * eps)

  Location  |  Observed  |  Expected  |  Reason
    (1)          2.7          2.8        Abs err 0.1 exceeds tol 4.4409e-16 by 0.1

>>>>> processing D:\SVN\Octave\test\OC20A7~1\OCTAVE~1\mingw32\share\octave\7.0.0\m\plot\appearance\xlim.m
***** test
hf = figure ("visible", "off");
unwind_protect
   h = plot3 ([0,1.1], [0,1], [0, 1]);
   assert (get (gca, "xlim"), [0, 1.4], eps);
   assert (xlim ("mode"), "auto");
unwind_protect_cleanup
   close (hf);
end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (get (gca, "xlim"),[0, 1.4],eps)

  Location  |  Observed  |  Expected  |  Reason
    (2)          1.2          1.4        Abs err 0.2 exceeds tol 2.2204e-16 by 0.2


>>>>> processing D:\SVN\Octave\test\OC20A7~1\OCTAVE~1\mingw32\share\octave\7.0.0\m\plot\appearance\ylim.m
***** test
hf = figure ("visible", "off");
unwind_protect
   plot3 ([0,1], [0,1.1], [0, 1]);
   assert (get (gca, "ylim"), [0, 1.4], eps);
   assert (ylim ("mode"), "auto");
unwind_protect_cleanup
   close (hf);
end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (get (gca, "ylim"),[0, 1.4],eps)

  Location  |  Observed  |  Expected  |  Reason
    (2)          1.2          1.4        Abs err 0.2 exceeds tol 2.2204e-16 by 0.2


>>>>> processing D:\SVN\Octave\test\OC20A7~1\OCTAVE~1\mingw32\share\octave\7.0.0\m\plot\appearance\zlim.m
***** test
hf = figure ("visible", "off");
unwind_protect
   plot3 ([0,1], [0,1], [0, 1.1]);
   assert (get (gca, "zlim"), [0, 1.4], eps);
   assert (zlim ("mode"), "auto");
unwind_protect_cleanup
   close (hf);
end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (get (gca, "zlim"),[0, 1.4],eps)

  Location  |  Observed  |  Expected  |  Reason
    (2)          1.2          1.4        Abs err 0.2 exceeds tol 2.2204e-16 by 0.2


>>>>> processing D:\SVN\Octave\test\OC20A7~1\OCTAVE~1\mingw32\share\octave\7.0.0\m\polynomial\polyfit.m
***** assert (polyfit (x, x.^2 + 2*x + 3, 3), [0, 1, 2, 3], 10*eps)
!!!!! test failed
ASSERT errors for:  assert (polyfit (x, x .^ 2 + 2 * x + 3, 3),[0, 1, 2, 3],10 * eps)

  Location  |  Observed  |  Expected  |  Reason
    (3)           2            2         Abs err 2.6645e-15 exceeds tol 2.2204e-15 by 4e-16
shared variables   scalar structure containing the fields:

    x =

      -2  -1   0   1   2


>>>>> processing D:\SVN\Octave\test\OC20A7~1\OCTAVE~1\mingw32\share\octave\7.0.0\m\specfun\cosint.m
***** assert (cosint (pi), 0.0736679120464254860, -2e-15)
!!!!! test failed
ASSERT errors for:  assert (cosint (pi),0.0736679120464254860,-2e-15)

  Location  |  Observed  |  Expected  |  Reason
     ()        0.073668     0.073668     Rel err 2.2606e-15 exceeds tol 2e-15 by 3e-16

In bug #58795, Dmitri proposed to use the SSE2 instruction set (instead of the 387 coprocessor instructions) also for 32bit builds.

I'll repeat some of the information in bug #58795 here:
Basically, Windows 7 with all updates no longer supports CPUs without SSE2 instruction set.
Also Octave no longer starts on Windows XP anyway. Windows Vista is no longer supported by MS since more than 3 years.
So raising the minimum hardware requirements might be ok. (I'll ask about this on the mailing list or discourse.)

I'm currently cross-compiling Octave 32bit for Windows with the "-mfpmath=sse -msse -msse2" flags that Dmitri mentioned in bug #58795. I'll report back with the results.

Markus Mützel <mmuetzel>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49530:  gcc_sse2.patch added by mmuetzel (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hg200 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-08-01 mmuetzel StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2020-07-30 mmuetzel StatusNone => Ready For Test
    2020-07-22 mmuetzel Attached File- => Added gcc_sse2.patch, #49530

    Back to the top


    Powered by Savane 3.7