dash icon indicating copy to clipboard operation
dash copied to clipboard

MatrixTest.SubViewMatrix3Dim fails with invalid IndexSpace in VM

Open ddiefenthaler opened this issue 7 years ago • 2 comments

When running the testsuite in a local VM (32bit) the test MatrixTest.SubViewMatrix3Dim fails for me. I'll append the output and other useful stuff at the end of this description. It may also be a compiler bug, as it works when using clang.

It seems to be some kind of Heisenbug as the error does not exist in the debug build. Also when adding output to the Release-build the error disappears.

Using gdb I located the causing line in the test: Line 1516 of MatrixTest.cc When outputting the value that gets dereferenced in that line the error is gone.

Output of the run:

dash/build/bin | ./dash-test-mpi --gtest_filter="MatrixTest.SubViewMatrix3Dim"
[----------] 55 tests will be run.
[----------] run 1 out of 26 tests from MatrixTest
[  RUN     ] MatrixTest.SubViewMatrix3Dim
[= -1 LOG =]             MatrixTest.h :  13 | >>> Test suite: MatrixTest 
[= -1 LOG =]               TestBase.h : 251 | ===> Running test case MatrixTest.SubViewMatrix3Dim ... 
[=  0 LOG =]               TestBase.h : 254 | -==- DASH initialized with 1 units 
[    0 ERROR ] [ 23053 ] Cartesian.h              :500  | dash::exception::OutOfRange                  | [ Unit 0 ] Range assertion 0 > 0 failed: CartesianIndexSpace has size 0 /home/cpppc/dash/dash/dash/include/dash/Cartesian.h:500 
[  ERROR   ] [UNIT 0] in [=  0 LOG =]               TestBase.h : 264 | -==- Test case finished at unit 0 
[=  0 LOG =]               TestBase.h : 267 | -==- Finalize DASH at unit 0 
[= -1 LOG =]               TestBase.h : 272 | <=== Finished test case MatrixTest.SubViewMatrix3Dim with 1 units 
[= -1 LOG =]             MatrixTest.h :  17 | <<< Closing test suite: MatrixTest

The used compiler is gcc/g++:

dash/build/bin | g++ --version
g++ (Debian 6.2.0-6) 6.2.0 20161010
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

symbol name of failing function: _ZNK4dash19CartesianIndexSpaceILi3ELNS_10MemArrangeE1ElE6coordsILS1_1EEESt5arrayIlLj3EEl demangled: dash::CartesianIndexSpace<3, (dash::MemArrange)1, long>::coords<(dash::MemArrange)1>

Backtrace (of debug-build as in release mode most is optimised out):

#0  dash::CartesianIndexSpace<3, (dash::MemArrange)1, long>::coords<(dash::MemArrange)1> (this=0xbfffdeac, index=0)                                                         
    at /home/cpppc/dash/dash/dash/include/dash/Cartesian.h:500                                                                                                              
#1  0x08694f93 in dash::GlobViewIter<double, dash::BlockPattern<3, (dash::MemArrange)1, long>, dash::GlobStaticMem<double, dash::allocator::SymmetricAllocator<double> >, dash::GlobPtr<double, dash::GlobStaticMem<double, dash::allocator::SymmetricAllocator<double> > >, dash::GlobRef<double> >::coords (this=0xbfffdfcc, glob_index=0)            
    at /home/cpppc/dash/dash/dash/include/dash/iterator/GlobViewIter.h:1026                                                                                                 
#2  0x086897e3 in dash::GlobViewIter<double, dash::BlockPattern<3, (dash::MemArrange)1, long>, dash::GlobStaticMem<double, dash::allocator::SymmetricAllocator<double> >, dash::GlobPtr<double, dash::GlobStaticMem<double, dash::allocator::SymmetricAllocator<double> > >, dash::GlobRef<double> >::operator[] (this=0xbfffdfcc, g_index=0)           
    at /home/cpppc/dash/dash/dash/include/dash/iterator/GlobViewIter.h:524                                                                                                  
#3  0x08678d76 in dash::GlobViewIter<double, dash::BlockPattern<3, (dash::MemArrange)1, long>, dash::GlobStaticMem<double, dash::allocator::SymmetricAllocator<double> >, dash::GlobPtr<double, dash::GlobStaticMem<double, dash::allocator::SymmetricAllocator<double> > >, dash::GlobRef<double> >::operator* (this=0xbfffdfcc)                       
    at /home/cpppc/dash/dash/dash/include/dash/iterator/GlobViewIter.h:494                                                                                                  
#4  0x08667d0f in MatrixTest_SubViewMatrix3Dim_Test::TestBody (this=0x8abfe08) at /home/cpppc/dash/dash/dash/test/container/MatrixTest.cc:1516

ddiefenthaler avatar Jun 21 '17 11:06 ddiefenthaler

On it, thanks for reporting!

fuchsto avatar Jun 22 '17 09:06 fuchsto

This seems to be caused by a bug in a pattern, will fix it in a separate issue and retest this defect.

fuchsto avatar Sep 20 '17 03:09 fuchsto