octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59470] [octave forge] (level-set) Unit test i


From: Rafael Laboissiere
Subject: [Octave-bug-tracker] [bug #59470] [octave forge] (level-set) Unit test in ls_distance_fcn fails non-deterministically
Date: Tue, 17 Nov 2020 00:47:07 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?59470>

                 Summary: [octave forge] (level-set) Unit test in
ls_distance_fcn fails non-deterministically
                 Project: GNU Octave
            Submitted by: 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: 
        Originator Email: 
             Open/Closed: Open
                 Release: other
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59470>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]