[Numpy-discussion] Non-deterministic test failure in master

Nathaniel Smith njs@pobox....
Thu Jun 28 14:06:48 CDT 2012


On Thu, Jun 28, 2012 at 7:13 AM, Pierre Haessig
<pierre.haessig@crans.org> wrote:
> Hi Nathaniel,
> Le 27/06/2012 20:22, Nathaniel Smith a écrit :
>> According to the Travis-CI build logs, this code produces
>> non-deterministic behaviour in master:
> You mean non-deterministic across different builds, not across different
> executions on the same build, right ?
>
> I just ran a small loop :
>
> N = 10000
> N_good = 0
> for i in range(N):
>    a = np.arange(5)
>    a[:3] = a[2:]
>    if (a == [2,3,4,3,4]).all():
>        N_good += 1
> print 'good result : %d/%d' % (N_good, N)
>
> and got 100 % good replication.

Yes, the current hypothesis is that there is one particular Travis-CI
machine on which memcpy goes backwards, and so the test fails whenever
the build gets assigned to that machine. (Apparently this is actually
faster on some CPUs, and new versions of glibc are known to exploit
this.)

https://github.com/numpy/numpy/pull/324

-n


More information about the NumPy-Discussion mailing list