UnitTestError.cxx stack trace error when compiling with optimizations
@NAThompson ran into unit test issues for UnitTestError.cxx related to stack-depth when compiling with optimizations using gcc-10.1 on Andes. With optimizations and debug enabled the test would fail. The test assumes debug
guarantees stack trace correctness, but it appears as though compiling with optimizations does not hold that guarantee. This test should either be re-worked to account for optimization builds or redesigned.
Test Output:
117: Test command: /ccs/home/nthompson/vtk-m/build/bin/UnitTests_vtkm_cont_testing "UnitTestError" "-v" "INFO" "--data-dir=/ccs/home/nthompson/vtk-m/data/data" "--baseline-dir=/ccs/home/nthompson/vtk-m/data/baseline" "--write-dir=/ccs/home/nthompson/vtk-m/build"
117: Test timeout computed to be: 180
117: date time ( uptime ) [ thread name/id ] file:line v|
117: 2021-04-16 13:44:54.222 ( 0.000s) [main thread ] loguru.cpp:591 Info| arguments: UnitTestError -v INFO --data-dir=/ccs/home/nthompson/vtk-m/data/data --baseline-dir=/ccs/home/nthompson/vtk-m/data/baseline --write-dir=/ccs/home/nthompson/vtk-m/build
117: 2021-04-16 13:44:54.222 ( 0.000s) [main thread ] loguru.cpp:594 Info| Current dir: /autofs/nccs-svm1_home1/nthompson/vtk-m/build/vtkm/cont/testing
117: 2021-04-16 13:44:54.222 ( 0.000s) [main thread ] loguru.cpp:596 Info| stderr verbosity: 0
117: 2021-04-16 13:44:54.222 ( 0.000s) [main thread ] loguru.cpp:597 Info| -----------------------------------
117: 2021-04-16 13:44:54.222 ( 0.000s) [main thread ] UnitTestError.cxx:67 Info| Check base error messages
117: Error at /ccs/home/nthompson/vtk-m/vtkm/cont/testing/UnitTestError.cxx:57:ValidateError
117: Expected more entries in the stack frame
117: 3 0x51aade /ccs/home/nthompson/vtk-m/build/bin/UnitTests_vtkm_cont_testing() [0x51aade]
117: 2 0x7f0d785db873 __libc_start_main + 243
117: 1 0x516581 /ccs/home/nthompson/vtk-m/build/bin/UnitTests_vtkm_cont_testing() [0x516581]
117: 0 0x486e51 /ccs/home/nthompson/vtk-m/build/bin/UnitTests_vtkm_cont_testing() [0x486e51] (count > 4)
117: 2021-04-16 13:44:54.222 ( 0.000s) [main thread ] loguru.cpp:471 Info| atexit
3/3 Test #117: UnitTestError .......................***Failed 0.00 sec
Build args:
$ cmake -DCMAKE_CXX_COMPILER=g++ -DVTKm_ENABLE_EXAMPLES=OFF -DVTKm_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -g -march=native -fno-omit-frame-pointer" ../
$ make
Edited by Nickolas Davis