unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp)
@ 2015-12-08  5:38 Leo Famulari
  2015-12-08 17:06 ` Ludovic Courtès
  2015-12-08 20:36 ` Mark H Weaver
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2015-12-08  5:38 UTC (permalink / raw)
  To: openexr-devel; +Cc: guix-devel

Greetings from Guix! [0]

We're having trouble building ilmbase-2.2.0 for the i686 architecture on
Linux, with gcc-4.9.3.

The build process fails during testing. Specifically, it fails
testBoxAlgo, like this:

ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed.
/gnu/store/isxqjfaglyfsbcv75y8qbqbph8v28ykr-bash-4.3.39/bin/bash: line 5:  4565 Aborted                 ${dir}$tst

On our mailing list, this was suggested as the nature of the problem
[1]:
On Mon, Nov 30, 2015 at 10:14:49PM +0200, Ludovic Courtès wrote:
> Right.  This sounds very much like a rounding issue, whereby the
> epsilon in floating-point number comparisons is to strict for 32-bit
> machines.

Here is the build system's web page for this particular build...
http://hydra.gnu.org/build/729299
... and the full build log...
http://hydra.gnu.org/build/729299/nixlog/1
... and an exhaustive list of build dependencies (be patient, it
may take a few seconds to load)...
http://hydra.gnu.org/build/729299#tabs-build-deps

We have no problem building on x86_64, armv7, or mips64el.

Thanks for reading,
Leo

[0]
http://www.gnu.org/software/guix/

[1]
http://lists.gnu.org/archive/html/bug-guix/2015-11/msg00179.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp)
  2015-12-08  5:38 Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp) Leo Famulari
@ 2015-12-08 17:06 ` Ludovic Courtès
  2015-12-09  3:11   ` Leo Famulari
  2015-12-08 20:36 ` Mark H Weaver
  1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2015-12-08 17:06 UTC (permalink / raw)
  To: Leo Famulari; +Cc: Guix-devel

Hi Leo, and thanks for the perfect upstream bug report!

Leo Famulari <leo@famulari.name> skribis:

> [1]
> http://lists.gnu.org/archive/html/bug-guix/2015-11/msg00179.html

Small comment: bug-guix@gnu.org is linked to the bug tracker at
<http://bugs.gnu.org/guix>.  It is best to refer to the bug by canonical
URL, <http://bugs.gnu.org/22049> in this case, and to Cc:
22049@debbugs.gnu.org, so we keep track of the discussion.

I reckon this is probably not obvious to someone who hasn’t used
bugs.gnu.org before; maybe we should fix our documentation?

Thanks again,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp)
  2015-12-08  5:38 Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp) Leo Famulari
  2015-12-08 17:06 ` Ludovic Courtès
@ 2015-12-08 20:36 ` Mark H Weaver
  1 sibling, 0 replies; 4+ messages in thread
From: Mark H Weaver @ 2015-12-08 20:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel, openexr-devel, 22049

[added 22049@debbugs.gnu.org to the CC list]

Leo Famulari <leo@famulari.name> writes:

> Greetings from Guix! [0]
>
> We're having trouble building ilmbase-2.2.0 for the i686 architecture on
> Linux, with gcc-4.9.3.
>
> The build process fails during testing. Specifically, it fails
> testBoxAlgo, like this:
>
> ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed.
> /gnu/store/isxqjfaglyfsbcv75y8qbqbph8v28ykr-bash-4.3.39/bin/bash: line 5:  4565 Aborted                 ${dir}$tst
>
> On our mailing list, this was suggested as the nature of the problem
> [1]:
> On Mon, Nov 30, 2015 at 10:14:49PM +0200, Ludovic Courtès wrote:
>> Right.  This sounds very much like a rounding issue, whereby the
>> epsilon in floating-point number comparisons is to strict for 32-bit
>> machines.

Given that ilmbase builds successfully in Guix on x86_64, mips64el, and
armhf, and only fails on i686, I believe that Ludovic's suggestion is
right on the mark.

The issue is that the x87 instruction set (used on 32-bit Intel systems
without SSE) uses 80-bit double-extended precision internally.  When
these 80-bit results are later converted to 64-bit doubles, they are
rounded a second time.  This "double rounding" results in larger
round-off errors than would occur when rounding only once to 64-bit
doubles, as is done when using x86_64, SSE2, or other architectures.
For more on this, see:

  https://en.wikipedia.org/wiki/Rounding#Double_rounding

Quoting from that page:

  Some computer languages and the IEEE 754-2008 standard dictate that in
  straightforward calculations the result should not be rounded twice.
  This has been a particular problem with Java as it is designed to be
  run identically on different machines, special programming tricks have
  had to be used to achieve this with x87 floating point.[1][2]

  [1] Samuel A. Figueroa (July 1995). "When is double rounding
      innocuous?". ACM SIGNUM Newsletter (ACM) 30 (3):
      21–25. doi:10.1145/221332.221334.

  [2] Roger Golliver (October 1998). "Efficiently producing default
      orthogonal IEEE double results using extended IEEE
      hardware". Intel.
      <http://www.open-std.org/JTC1/SC22/JSG/docs/m3/docs/jsgn326.pdf>

Hope this helps,

      Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp)
  2015-12-08 17:06 ` Ludovic Courtès
@ 2015-12-09  3:11   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2015-12-09  3:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

On Tue, Dec 08, 2015 at 06:06:25PM +0100, Ludovic Courtès wrote:
> Hi Leo, and thanks for the perfect upstream bug report!
> 
> Leo Famulari <leo@famulari.name> skribis:
> 
> > [1]
> > http://lists.gnu.org/archive/html/bug-guix/2015-11/msg00179.html
> 
> Small comment: bug-guix@gnu.org is linked to the bug tracker at
> <http://bugs.gnu.org/guix>.  It is best to refer to the bug by canonical
> URL, <http://bugs.gnu.org/22049> in this case, and to Cc:
> 22049@debbugs.gnu.org, so we keep track of the discussion.

D'oh! I made a note of this practice in the past but it slipped my mind.

> 
> I reckon this is probably not obvious to someone who hasn’t used
> bugs.gnu.org before; maybe we should fix our documentation?

It's a good idea, especially for new packagers like me. I suppose under
packaging there could be a brief description of how to write a good bug
report in general as well as Guix-specific things like how to reference
the bug. As well as a reminder to practice rubber-duck debugging before
sending the bug report ;)

> 
> Thanks again,
> Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-09  3:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08  5:38 Test failure of ilmbase-2.2.0 on i686-linux (testBoxAlgo.cpp) Leo Famulari
2015-12-08 17:06 ` Ludovic Courtès
2015-12-09  3:11   ` Leo Famulari
2015-12-08 20:36 ` Mark H Weaver

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).