AcademySoftwareFoundation / openexr

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
http://www.openexr.com/
BSD 3-Clause "New" or "Revised" License
1.63k stars 619 forks source link

testBox failure on i386 #67

Closed quantizationbit closed 5 years ago

quantizationbit commented 11 years ago

System Slackware 14.0, 32 bit, gcc 4.7.1

Compiles but "make check" fails into the testing of ImathTest. I'm trying to put together a full clean build/install of OpenEXR, CTL (1.5 rc) to utilize ultimately ctlrender command for some testing. I've removed prior builds and removed openexr 1.7.0 package which comes with Slackware by default.

lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed. /bin/sh: line 5: 8024 Aborted ${dir}$tst

FAIL: ImathTest

1 of 1 test failed

make[2]: * [check-TESTS] Error 1 make[2]: Leaving directory `/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make[1]: * [check-am] Error 2 make[1]: Leaving directory`/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make: *\ [check-recursive] Error 1 qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/IlmBase$

Thanks, Bill Mandel

pstanczyk commented 11 years ago

Hmm - interesting ... let me hunt down 4.7.1 here and give it a spin.

Have you had luck with previous versions of OpenEXR and this compiler?

System Slackware 14.0, 32 bit, gcc 4.7.1

Compiles but "make check" fails into the testing of ImathTest. I'm trying to put together a full clean build/install of OpenEXR, CTL (1.5 rc) to utilize ultimately ctlrender command for some testing. I've removed prior builds and removed openexr 1.7.0 package which comes with Slackware by default.

lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed. /bin/sh: line 5: 8024 Aborted ${dir}$tst

FAIL: ImathTest 1 of 1 test failed

make[2]: * [check-TESTS] Error 1 make[2]: Leaving directory /home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make[1]: * [check-am] Error 2 make[1]: Leaving directory/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make: *\ [check-recursive] Error 1 qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/IlmBase$

Thanks, Bill Mandel

— Reply to this email directly or view it on GitHubhttps://github.com/openexr/openexr/issues/67.

pstanczyk commented 11 years ago

Come to think of it ... could you let me know the values for the box 'b' and the point 'p'

System Slackware 14.0, 32 bit, gcc 4.7.1

Compiles but "make check" fails into the testing of ImathTest. I'm trying to put together a full clean build/install of OpenEXR, CTL (1.5 rc) to utilize ultimately ctlrender command for some testing. I've removed prior builds and removed openexr 1.7.0 package which comes with Slackware by default.

lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed. /bin/sh: line 5: 8024 Aborted ${dir}$tst

FAIL: ImathTest 1 of 1 test failed

make[2]: * [check-TESTS] Error 1 make[2]: Leaving directory /home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make[1]: * [check-am] Error 2 make[1]: Leaving directory/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make: *\ [check-recursive] Error 1 qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/IlmBase$

Thanks, Bill Mandel

— Reply to this email directly or view it on GitHubhttps://github.com/openexr/openexr/issues/67.

pstanczyk commented 11 years ago

Come to think of it ... could you let me know the values for the box 'b' and the point 'p'

quantizationbit commented 11 years ago

Not sure how I do that?

Should I put a print statement in testBox.cpp?

Here is the final output: makeInfinite() for type V2s makeInfinite() for type V2i makeInfinite() for type V2f makeInfinite() for type V2d makeInfinite() for type V3s makeInfinite() for type V3i makeInfinite() for type V3f makeInfinite() for type V3d makeInfinite() for type V4s makeInfinite() for type V4i makeInfinite() for type V4f makeInfinite() for type V4d extendBy() point for type V2s extendBy() point for type V2i extendBy() point for type V2f extendBy() point for type V2d lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed. /bin/sh: line 5: 11442 Aborted ${dir}$tst

FAIL: ImathTest

1 of 1 test failed

make[2]: * [check-TESTS] Error 1 make[2]: Leaving directory `/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make[1]: * [check-am] Error 2 make[1]: Leaving directory`/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make: *\ [check-recursive] Error 1 qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/IlmBase$

peterhillman commented 11 years ago

Could you replace testBox.cpp with the attached and run that, or alternatively edit the code as follows?

diff --git a/IlmBase/ImathTest/testBox.cpp b/IlmBase/ImathTest/testBox.cpp index 0727a4b..5c5f67a 100644 --- a/IlmBase/ImathTest/testBox.cpp +++ b/IlmBase/ImathTest/testBox.cpp @@ -250,6 +250,10 @@ testExtendByPoint(const char *type)

IMATH_INTERNAL_NAMESPACE::Box b; b.extendBy(p);

On 2013-07-13 11:00, quantizationbit wrote:

Not sure how I do that?

Should I put a print statement in testBox.cpp?

Here is the final output: makeInfinite() for type V2s makeInfinite() for type V2i makeInfinite() for type V2f makeInfinite() for type V2d

makeInfinite() for type V3s makeInfinite() for type V3i

makeInfinite() for type V3f makeInfinite() for type V3d

makeInfinite() for type V4s makeInfinite() for type V4i

makeInfinite() for type V4f makeInfinite() for type V4d extendBy() point for type V2s extendBy() point for type V2i extendBy() point for type V2f extendBy() point for type V2d lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed.

/bin/sh: line 5: 11442 Aborted ${dir}$tst

FAIL: IMATHTEST

1 OF 1 TEST FAILED

make[2]: * [check-TESTS] Error 1 make[2]: Leaving directory /home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make[1]: * [check-am] Error 2 make[1]: Leaving directory/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest'

make: *\ [check-recursive] Error 1

qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/IlmBase$

Reply to this email directly or view it on GitHub [1].

Links:

[1] https://github.com/openexr/openexr/issues/67#issuecomment-20908987

quantizationbit commented 11 years ago

Thanks for that print code. Here's what I got. Then then next assert macro failed.

makeInfinite() for type V4d
extendBy() point for type V2s
extendBy() point for type V2i
extendBy() point for type V2f

failed to set empty box to value (2970.17 -6529.19): got (2970.17 -6529.19),(2970.17 -6529.19) failed to set empty box to value (-8281.27 -1598.75): got (-8281.27 -1598.75),(-8281.27 -1598.75) failed to set empty box to value (4538.74 -6180.36): got (4538.74 -6180.36),(4538.74 -6180.36) failed to set empty box to value (10376.7 -4432.52): got (10376.7 -4432.52),(10376.7 -4432.52) failed to set empty box to value (-9545.28 -1475.49): got (-9545.28 -1475.49),(-9545.28 -1475.49) failed to set empty box to value (-2391.3 -5042.59): got (-2391.3 -5042.59),(-2391.3 -5042.59) failed to set empty box to value (12126.5 -10796.4): got (12126.5 -10796.4),(12126.5 -10796.4) failed to set empty box to value (-3157.67 10233.1): got (-3157.67 10233.1),(-3157.67 10233.1) failed to set empty box to value (-1282.04 -12162.7): got (-1282.04 -12162.7),(-1282.04 -12162.7) failed to set empty box to value (8345.8 -12213.9): got (8345.8 -12213.9),(8345.8 -12213.9)

peterhillman commented 11 years ago

Next test: could you see whether compiling with -ffloat-store prevents the problem occurring? You should be able to do this by doing a make clean, then something likeexport CPPFLAGS=-ffloat-store or setenv CPPFLAGS -ffloat-store before running configure and make check again) If this does fix the problem, we should probably implement a workaround in the test packages. It's less likely to be an issue in the library itself

(This will help to test Richard's theory that it might be an overprecision issue caused by 80 bit floating point math)

On 13/07/13 13:51, quantizationbit wrote:

Thanks for that print code. Here's what I got. Then then next assert macro failed.

iRi-E commented 11 years ago

Hi,

I experienced the same error, and confirmed the test suite succeeds if -ffloat-store flag is added.

Tested ilmbase 2.0.1 on Ubuntu 13.04

quantizationbit commented 11 years ago

Ok yes using -ffloat-store works. I set the flag as described and rebuilt IlmBase from clean and make check succeeds. Now to figure out why slackware 14 comes with IlmBase 1.0.2 and OpenExr 1.7.0 as a few general image tools like ImageMagick depend on that.

quantizationbit commented 11 years ago

Ok using -ffloat-store gets IlmBase completed and installed. I've continued using that setting (although seems non-optimal to avoid register math) with OpenEXR and get to a "-nan" error in it's check.

Testing testOptimizedInterleavePatterns Testing SSE optimisation with different interleave patterns (large images) ... 0, 0: RGBHalf read as RGBHalf... OK 0, 1: RGBHalf read as RGBAHalf... OK 0, 2: RGBHalf read as ABGRHalf... OK 0, 3: RGBHalf read as RGBFloat...

error reading back channel B pixel 96,-62 got -nan expected -nan lt-IlmImfTest: testOptimizedInterleavePatterns.cpp:230: bool {anonymous}::compare(const Imf_2_0::FrameBuffer&, const Imf_2_0::FrameBuffer&, const Box2i&, bool): Assertion `writtenHalf.bits()==readHalf.bits()' failed. /bin/sh: line 5: 13205 Aborted ${dir}$tst

FAIL: IlmImfTest

1 of 1 test failed

make[2]: * [check-TESTS] Error 1 make[2]: Leaving directory `/home/qbit/Documents/OpenEXR/openexr-2.0.1/OpenEXR/IlmImfTest' make[1]: * [check-am] Error 2 make[1]: Leaving directory`/home/qbit/Documents/OpenEXR/openexr-2.0.1/OpenEXR/IlmImfTest' make: *\ [check-recursive] Error 1 qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/OpenEXR$

peterhillman commented 11 years ago
Thanks for that. I think I'll modify that test not to write
nans/infs to the test images.
For the time being you could comment out the TEST
testOptimizedInterleavePatterns in IlmImfTest/main.cpp: since the
optimisation branch is disabled, that test isn't particularly
useful. The fail is an issue with the test, not the library itself.
Also, I don't think it's necessary to compile your installed version
of the library with -ffloat-store: if you can get it to pass all the
tests with -ffloat-store, it's probably safe to rebuild without the
flag and install it.
We might need to come up with a 'overprecision safe' test for
float-based types for use in the test packages.On 18/07/13 05:01, quantizationbit
  wrote:

  Ok using -ffloat-store gets IlmBase completed and installed.
    I've continued using that setting (although seems non-optimal to
    avoid register math) with OpenEXR and get to a "-nan" error in
    it's check.
  Testing testOptimizedInterleavePatterns
    Testing SSE optimisation with different interleave patterns
    (large images) ... 
    0, 0: RGBHalf read as RGBHalf... OK 
    0, 1: RGBHalf read as RGBAHalf... OK 
    0, 2: RGBHalf read as ABGRHalf... OK 
    0, 3: RGBHalf read as RGBFloat... 
  error reading back channel B pixel 96,-62 got -nan expected
    -nan
    lt-IlmImfTest: testOptimizedInterleavePatterns.cpp:230: bool
    {anonymous}::compare(const Imf_2_0::FrameBuffer&, const
    Imf_2_0::FrameBuffer&, const Box2i&, bool): Assertion
    `writtenHalf.bits()==readHalf.bits()' failed.
    /bin/sh: line 5: 13205 Aborted ${dir}$tst
  FAIL: IlmImfTest
  1 of 1 test failed
  make[2]: *** [check-TESTS] Error 1
    make[2]: Leaving directory /home/qbit/Documents/OpenEXR/openexr-2.0.1/OpenEXR/IlmImfTest'
      make[1]: *** [check-am] Error 2
      make[1]: Leaving directory/home/qbit/Documents/OpenEXR/openexr-2.0.1/OpenEXR/IlmImfTest'
    make: *** [check-recursive] Error 1qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/OpenEXR$ 
  —
    Reply to this email directly or view
      it on GitHub.
ametzler commented 11 years ago

The ilmbase testsuite (not the openexr one) succeeds if only the two files testBoxAlgo.cpp and testBox.cpp are built with -fno-inline or -ffloat-store (either of theses gcc options does the trick).

cary-ilm commented 5 years ago

Looking into the OpenEXR issue backlog. Is this still an issue, or ok to close?

cary-ilm commented 5 years ago

Closing the issue for now, feel free to re-open or file a new issue if you need further help.