bugGNU Octave - Bugs: bug #61711, Test errors for sorting NaN values...

 
 

bug #61711: Test errors for sorting NaN values on Windows with visibility flags

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Tue 21 Dec 2021 08:04:01 AM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev 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.

 

Fri 24 Dec 2021 09:24:57 AM UTC, comment #1: 

This no longer blocks Octave 7. Updating release tag.

Markus Mützel <mmuetzel>
Project Member
Tue 21 Dec 2021 08:04:01 AM UTC, original submission:  

When compiling with visibility flags some tests are failing on Windows. They all seem to be related to functions that involve sorting NaN values.
See e.g.: https://github.com/gnu-octave/octave-buildbot/runs/4585314430?check_suite_focus=true

>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\etc\tests\libinterp\corefcn\data.cc-tst
[...]
***** assert (sort ([NaN, 1, -1, 2, Inf]), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf]),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
***** assert (sort ([NaN, 1, -1, 2, Inf], 2), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf], 2),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
***** assert (sort ([NaN, 1, -1, 2, Inf], "ascend"), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf], "ascend"),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
***** assert (sort ([NaN, 1, -1, 2, Inf], 2, "ascend"), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf], 2, "ascend"),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
[...]
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\set\unique.m
***** assert (unique ([1,NaN,Inf,NaN,Inf]), [1,Inf,NaN,NaN])
!!!!! test failed
ASSERT errors for:  assert (unique ([1, NaN, Inf, NaN, Inf]),[1, Inf, NaN, NaN])

  Location  |  Observed  |  Expected  |  Reason
     .          O(1x5)       E(1x4)      Dimensions don't match
[...]
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\statistics\iqr.m
***** assert (iqr ([1 NaN 2 3], 2), 1.5)
!!!!! test failed
ASSERT errors for:  assert (iqr ([1, NaN, 2, 3], 2),1.5)

  Location  |  Observed  |  Expected  |  Reason
     ()          NaN          1.5        'NaN' mismatch
***** assert (iqr ([[1 2 5], [2 NaN 6]], "all"), 3.5)
!!!!! test failed
ASSERT errors for:  assert (iqr ([[1, 2, 5], [2, NaN, 6]], "all"),3.5)

  Location  |  Observed  |  Expected  |  Reason
     ()          NaN          3.5        'NaN' mismatch
[...]
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\statistics\prctile.m
***** test
 pct = 50;
 tol = 0.0001;
 x = [0.1126, 0.1148, 0.0521, 0.2364, 0.1393
      0.1718, 0.7273, 0.2041, 0.4531, 0.1585
      0.2795, 0.7978, 0.3296, 0.5567, 0.7307
      0.4288, 0.8753, 0.6477, 0.6287, 0.8165
      0.9331, 0.9312, 0.9635, 0.7796, 0.8461];
 x(5,5) = NaN;
 q = prctile (x, pct, 2);
 qa = [0.1148; 0.2041; 0.5567; 0.6477; 0.9322];
 assert (q, qa, tol);
 x(1,1) = NaN;
 q = prctile (x, pct, 2);
 qa = [0.1270; 0.2041; 0.5567; 0.6477; 0.9322];
 assert (q, qa, tol);
 x(3,3) = NaN;
 q = prctile (x, pct, 2);
 qa = [0.1270; 0.2041; 0.6437; 0.6477; 0.9322];
 assert (q, qa, tol);
!!!!! test failed
ASSERT errors for:  assert (q,qa,tol)

  Location  |  Observed  |  Expected  |  Reason
    (1)        0.08345       0.127       Abs err 0.04355 exceeds tol 0.0001 by 0.04
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\statistics\quantile.m
***** test
 p = 0.5;
 x = [0.112600, 0.114800, 0.052100, 0.236400, 0.139300
      0.171800, 0.727300, 0.204100, 0.453100, 0.158500
      0.279500, 0.797800, 0.329600, 0.556700, 0.730700
      0.428800, 0.875300, 0.647700, 0.628700, 0.816500
      0.933100, 0.931200, 0.963500, 0.779600, 0.846100];
 tol = 0.00001;
 x(5,5) = NaN;
 assert (quantile (x, p, 1),
         [0.27950, 0.79780, 0.32960, 0.55670, 0.44460], tol);
 x(1,1) = NaN;
 assert (quantile (x, p, 1),
         [0.35415, 0.79780, 0.32960, 0.55670, 0.44460], tol);
 x(3,3) = NaN;
 assert (quantile (x, p, 1),
         [0.35415, 0.79780, 0.42590, 0.55670, 0.44460], tol);
!!!!! test failed
ASSERT errors for:  assert (quantile (x, p, 1),[0.35415, 0.79780, 0.32960, 0.55670, 0.44460],tol)

  Location  |  Observed  |  Expected  |  Reason
    (1)        0.22565      0.35415      Abs err 0.1285 exceeds tol 1e-05 by 0.1

This might (or might not) be related to bug #61704.

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:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-03 mmuetzel Dependencies- => bugs #61752 is dependent
    2021-12-24 mmuetzel Release7.0.90 => dev

    Back to the top


    Powered by Savane 3.7