Skip to content

test Core_MulSpectrum fails only under release mode on 64bit ARM #6536

@tomoaki0705

Description

@tomoaki0705

Please state the information for your system

  • OpenCV version: master / 3.1
  • Host OS: Linux (Ubuntu 16.04 ARM 64bit ODROID-C2)
  • Compiler & CMake: GCC 5.3.1 & CMake 3.5.1

In which part of the OpenCV library you got the issue?

  • in test of core module, Core_MulSpectrums.accuracy fails with "Bard accuracy"
  • only on release mode, not in debug mode

Expected behaviour

  • The test passes on debug mode
  • Following is the output of the test on debug mode
odroid@odroid64:~/opencv-fork/testMulSpectrumDebug$ ./bin/opencv_test_core --gtest_filter=Core_MulSpec*
CTEST_FULL_OUTPUT
OpenCV version: 3.1.0-dev
OpenCV VCS version: 3.1.0-424-g9ebe29a-dirty
Build type: debug
Parallel framework: pthreads
CPU features: neon
OpenCL is disabled
Note: Google Test filter = Core_MulSpec*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Core_MulSpectrums
[ RUN      ] Core_MulSpectrums.accuracy
[       OK ] Core_MulSpectrums.accuracy (2168 ms)
[----------] 1 test from Core_MulSpectrums (2169 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2175 ms total)
[  PASSED  ] 1 test.

Actual behaviour

  • Fails on test
  • Following is the result from test on release mode
odroid@odroid64:~/opencv-fork/testMulSpectrumRelease$ ./bin/opencv_test_core --gtest_filter=Core_MulSpec*
CTEST_FULL_OUTPUT
OpenCV version: 3.1.0-dev
OpenCV VCS version: 3.1.0-424-g9ebe29a-dirty
Build type: release
Parallel framework: pthreads
CPU features: neon
OpenCL is disabled
Note: Google Test filter = Core_MulSpec*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Core_MulSpectrums
[ RUN      ] Core_MulSpectrums.accuracy
/home/odroid/opencv-fork/modules/ts/src/ts.cpp:518: Failure
Failed

        failure reason: Bad accuracy
        test case #65
        seed: a7e10895f4ac9826
-----------------------------------
        LOG:
output: Too big difference (=1.26238e-12) at (34, 112)
input array 0 type=64fC1, size=(186, 57)
input array 1 type=64fC1, size=(186, 57)
ref output array 0 type=64fC2, size=(186, 57)

-----------------------------------
        CONSOLE: ........
-----------------------------------

[  FAILED  ] Core_MulSpectrums.accuracy (43 ms)
[----------] 1 test from Core_MulSpectrums (43 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (45 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Core_MulSpectrums.accuracy

 1 FAILED TEST

Additional description

  • The test passes successfully on other platforms, x86_64 and 32bit ARM
  • I'm trying to trace the reason why, but the point that it only happens under release mode is making things difficult
  • Folliwings are some information from cmake output
  Platform:
    Host:                        Linux 3.14.29-56 aarch64
    CMake:                       3.5.1
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               debug

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                /usr/bin/c++  (ver 5.3.1)
    C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/cc
    C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):
    Linker flags (Debug):
    Precompiled headers:         YES
    Extra dependencies:          /usr/lib/aarch64-linux-gnu/libpng.so /usr/lib/aarch64-linux-gnu/libz.so gtk-x11-2.0 gdk-x11-2.0 pangocairo-1.0 atk-1.0 cairo gdk_pixbuf-2.0 gio-2.0 pangoft2-1.0 pango-1.0 gobject-2.0 fontconfig freetype gthread-2.0 glib-2.0 dl m pthread rt
    3rdparty dependencies:       libjpeg libwebp libtiff libjasper IlmImf

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions