bugGNU Octave - Bugs: bug #53636, failing test under Windows:...

 
 

bug #53636: failing test under Windows: bsxfun.cc-tst

Submitted by:  Hartmut <hardy>
Submitted on:  Fri 13 Apr 2018 11:53:27 AM UTC  
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.3.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.

 

( Jump to the original submission)

Sat 14 Apr 2018 12:17:57 PM UTC, comment #12: 

I pushed the temporary fix here http://hg.savannah.gnu.org/hgweb/octave/rev/9b93b85459da.  Marking this bug as a duplicate and closing report.

Rik <rik5>
Project Administrator
Sat 14 Apr 2018 11:31:06 AM UTC, comment #11: 

I have tested on a Win7 machine (as I have currently no access to the Win10 machine from comment #0):

  • running the loop code from comment #7 on the original bsxfun.cc-tst (included 4.3.90) does also throw an error once in a while.
  • running the modified bsxfun.cc-tst file from file #43920 works totally fine. (loop result=200)

So I would say that this modified test file is appropriate for a temporary workaround as proposed in comment #5).

Hartmut <hardy>
Fri 13 Apr 2018 10:01:36 PM UTC, comment #10: 

@Dmitri: Was your testing on Windows or a Linux machine?

Rik <rik5>
Project Administrator
Fri 13 Apr 2018 09:51:05 PM UTC, comment #9: 

Works for me too.

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Fri 13 Apr 2018 08:52:55 PM UTC, comment #8: 

I got 200 (on Debian).

Would be good to get a verification from Hartmut or from someone else on Windows with 4.3.90.

Mike Miller <mtmiller>
Project Administrator
Fri 13 Apr 2018 08:00:42 PM UTC, comment #7: 

I have made a preliminary changeset to fix the rand and randn random number generator to a known state before the BIST tests are done.  However,m s I never see a probleo I need someone else to help do the testing.

I am uploading a file bsxfun.cc-tst.  To test, download this file and place it in the current directory where you start Octave (so it is picked before the default version).  Then run

bm = zeros (200,1);
for i = 1:200
  bm(i) = test ("bsxfun.cc-tst");
endfor
sum (bm)

If it passes (after about 15 minutes) then we are good.  Otherwise, adjust the random number generator state to a different value (currently 42) and re-run.

(file #43920)

Rik <rik5>
Project Administrator
Fri 13 Apr 2018 07:28:12 PM UTC, comment #6: 

Good plan.

Mike Miller <mtmiller>
Project Administrator
Fri 13 Apr 2018 05:00:28 PM UTC, comment #5: 

I propose that we

1) Fix the random seed ahead of these tests to a known good value (temporary workaround)
2) Close this bug report as a duplicate of bug #51779
3) Take up the questions in bug #51779 on the development branch

Thoughts?

Rik <rik5>
Project Administrator
Fri 13 Apr 2018 04:10:23 PM UTC, comment #4: 

This is similar and may be the same as bug #51779.

That bug fails for me (and on buildbots) occasionally because bsxfun with @pow is doing a different operation between float operands than the test was written for.

This intersects with the larger overall bug that Matlab does mixed-type operations in double and casts the result, while Octave does mixed-type operations in single.

Mike Miller <mtmiller>
Project Administrator
Fri 13 Apr 2018 04:08:20 PM UTC, comment #3: 

I got 1 failure out of 100.

I am pretty sure it is the same as #51779

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 13 Apr 2018 03:29:49 PM UTC, comment #2: 

I tried running the test 100 times and it works for me

for i = 1:100
  bm(i) = test ('bsxfun.cc-tst');
endfor
sum (bm)

Rik <rik5>
Project Administrator
Fri 13 Apr 2018 03:07:11 PM UTC, comment #1: 

The test file is mentioned in fntests.log

>>>>> processing C:\Octave\OCTAVE~1.90\share\octave\4.3.90\etc\tests\libinterp\corefcn\bsxfun.cc-tst

Copy that file to your current working directory so that it is on the search path for Octave.  Then do

test bsxfun.cc-tst

Also, is this related to bug #51779?

Rik <rik5>
Project Administrator
Fri 13 Apr 2018 11:53:27 AM UTC, original submission:  

I installed the official 4.3.90 w64 installer under Win 10.

One (and only one) test is failing: bsxfun.cc-tst . This test was not yet failing with Octave 4.2.2 on the same PC.

This is what I found in fntest.log :

>>>>> processing C:\Octave\OCTAVE~1.90\share\octave\4.3.90\etc\tests\libinterp\corefcn\bsxfun.cc-tst
***** test
funs = {@plus, @minus, @times, @rdivide, @ldivide, @power, @max, @min, ...
         @rem, @mod, @atan2, @hypot, @eq, @ne, @lt, @le, @gt, @ge, ...
         @and, @or, @xor };

float_types = {@single, @double};
int_types = {@int8, @int16, @int32, @int64, ...
              @uint8, @uint16, @uint32, @uint64};

x = rand (3) * 10-5;
y = rand (3,1) * 10-5;

for i=1:length (funs)
   for j = 1:length (float_types)
     for k = 1:length (int_types)

       fun = funs{i};
       f_type = float_types{j};
       i_type = int_types{k};

         assert (bsxfun (fun, f_type (x), i_type (y)), ...
                 fun (f_type(x), i_type (y)));
         assert (bsxfun (fun, f_type (y), i_type (x)), ...
                 fun (f_type(y), i_type (x)));

         assert (bsxfun (fun, i_type (x), i_type (y)), ...
                 fun (i_type (x), i_type (y)));
         assert (bsxfun (fun, i_type (y), i_type (x)), ...
                 fun (i_type (y), i_type (x)));

         assert (bsxfun (fun, f_type (x), f_type (y)), ...
                 fun (f_type (x), f_type (y)));
         assert (bsxfun (fun, f_type(y), f_type(x)), ...
                 fun (f_type (y), f_type (x)));
     endfor
   endfor
endfor
!!!!! test failed
ASSERT errors for:  assert (bsxfun (fun, f_type (x), i_type (y)),fun (f_type (x), i_type (y)))

  Location  |  Observed  |  Expected  |  Reason
   (2,2)       5442282      5442283      Abs err 1 exceeds tol 0 by 1
shared variables   scalar structure containing the fields:

    a =

    ans(:,:,1) =

       1.78672
       0.27992
      -0.61915

    ans(:,:,2) =

      -0.25891
       1.30055
      -0.49092

    ans(:,:,3) =

      -0.098843
      -0.482358
      -0.724215

    b =

    ans(:,:,1,1) =

       0.052885   0.068687   0.665253

    ans(:,:,2,1) =

       1.74760  -0.87201  -0.85146

    ans(:,:,3,1) =

      -0.701998   0.198724   0.093790

    ans(:,:,1,2) =

       1.88442  -1.05123  -0.43862

    ans(:,:,2,2) =

       0.33925  -0.66327   1.39562

    ans(:,:,3,2) =

      -0.31050  -0.51481   1.57162

    ans(:,:,1,3) =

      -0.106352   0.929991  -0.081016

    ans(:,:,2,3) =

      -1.40578  -1.72386   0.12906

    ans(:,:,3,3) =

       0.33246  -0.13230   1.02211

    aa =

    ans(:,:,1,1) =

       1.78672   1.78672   1.78672
       0.27992   0.27992   0.27992
      -0.61915  -0.61915  -0.61915

    ans(:,:,2,1) =

      -0.25891  -0.25891  -0.25891
       1.30055   1.30055   1.30055
      -0.49092  -0.49092  -0.49092

    ans(:,:,3,1) =

      -0.098843  -0.098843  -0.098843
      -0.482358  -0.482358  -0.482358
      -0.724215  -0.724215  -0.724215

    ans(:,:,1,2) =

       1.78672   1.78672   1.78672
       0.27992   0.27992   0.27992
      -0.61915  -0.61915  -0.61915

    ans(:,:,2,2) =

      -0.25891  -0.25891  -0.25891
       1.30055   1.30055   1.30055
      -0.49092  -0.49092  -0.49092

    ans(:,:,3,2) =

      -0.098843  -0.098843  -0.098843
      -0.482358  -0.482358  -0.482358
      -0.724215  -0.724215  -0.724215

    ans(:,:,1,3) =

       1.78672   1.78672   1.78672
       0.27992   0.27992   0.27992
      -0.61915  -0.61915  -0.61915

    ans(:,:,2,3) =

      -0.25891  -0.25891  -0.25891
       1.30055   1.30055   1.30055
      -0.49092  -0.49092  -0.49092

    ans(:,:,3,3) =

      -0.098843  -0.098843  -0.098843
      -0.482358  -0.482358  -0.482358
      -0.724215  -0.724215  -0.724215

    bb =

    ans(:,:,1,1) =

       0.052885   0.068687   0.665253
       0.052885   0.068687   0.665253
       0.052885   0.068687   0.665253

    ans(:,:,2,1) =

       1.74760  -0.87201  -0.85146
       1.74760  -0.87201  -0.85146
       1.74760  -0.87201  -0.85146

    ans(:,:,3,1) =

      -0.701998   0.198724   0.093790
      -0.701998   0.198724   0.093790
      -0.701998   0.198724   0.093790

    ans(:,:,1,2) =

       1.88442  -1.05123  -0.43862
       1.88442  -1.05123  -0.43862
       1.88442  -1.05123  -0.43862

    ans(:,:,2,2) =

       0.33925  -0.66327   1.39562
       0.33925  -0.66327   1.39562
       0.33925  -0.66327   1.39562

    ans(:,:,3,2) =

      -0.31050  -0.51481   1.57162
      -0.31050  -0.51481   1.57162
      -0.31050  -0.51481   1.57162

    ans(:,:,1,3) =

      -0.106352   0.929991  -0.081016
      -0.106352   0.929991  -0.081016
      -0.106352   0.929991  -0.081016

    ans(:,:,2,3) =

      -1.40578  -1.72386   0.12906
      -1.40578  -1.72386   0.12906
      -1.40578  -1.72386   0.12906

    ans(:,:,3,3) =

       0.33246  -0.13230   1.02211
       0.33246  -0.13230   1.02211
       0.33246  -0.13230   1.02211

How do I repeat a cc-tst test? Just "test bsxfun.cc-tst" did not work.

Hartmut <hardy>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #43920:  bsxfun.cc-tst added by rik5 (6KiB - application/octet-stream)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hardy (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-14 rik5 StatusNeed Info => Duplicate
        Open/ClosedOpen => Closed
    2018-04-13 rik5 Attached File- => Added bsxfun.cc-tst, #43920
    2018-04-13 mtmiller Dependencies- => Depends on bugs #51779
    2018-04-13 rik5 StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5