bugGNU Octave - Bugs: bug #59470, [octave forge] (level-set) Unit...

 
 

bug #59470: [octave forge] (level-set) Unit test in ls_distance_fcn fails non-deterministically

Submitter:  Rafael Laboissière <rlaboiss>
Submitted:  Tue 17 Nov 2020 05:47:05 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * other Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Nov 2020 05:47:05 AM UTC, original submission:  

One of the unit tests in inst/ls_distance_fcn may fail randomly, according to the load of the system on which it is executed:


% Compare timing to ls_signed_distance.
%!test
%!  n = 500;
%!  x = linspace (-10, 10, n);
%!  h = x(2) - x(1);
%!
%!  [XX, YY] = meshgrid (x, x);
%!  phi = ls_genbasic (XX, YY, "sphere", [0, 0], 8);
%!
%!  id = tic ();
%!  d = ls_distance_fcn (phi, h);
%!  time1 = toc (id);
%!
%!  id = tic ();
%!  sd = ls_signed_distance (phi, h);
%!  time2 = toc (id);
%!
%!  assert (d, max (sd, 0), sqrt (eps));
%!  printf ("ls_distance_fcn faster than ls_signed_distance by %.1f%%\n", ...
%!          100 * ((time2 - time1) / time2));
%!  assert (time1 < time2);


Since the timing is measured by tic/toc, there is no guarantee that other jobs will not disturb the test.

This is problematic for distributions like Debian that relies on rebuilding the package on different architectures.  Here is the build log for the octave-level-set on a Debian i386 system:
https://buildd.debian.org/status/fetch.php?pkg=octave-level-set&arch=i386&ver=0.3.0-10&stamp=1605086516&raw=0

Rafael Laboissière <rlaboiss>

 

(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

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rlaboiss (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code