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

Submitted by:  Rafael Laboissiere <rlaboiss>
Submitted on:  Tue 17 Nov 2020 05:47:05 AM UTC  
Category:  Octave Forge 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

Add a New Comment (Rich Markup)

You are not logged in

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


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.
%!  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:

Rafael Laboissiere <rlaboiss>


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

Attach Files:

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)

    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.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5