Skip to content
Snippets Groups Projects

Test istlmatrixbackend with a matrix with FM<2,1> blocks

Closed Oliver Sander requested to merge test-istlmatrixbackend-for-one-line-blocks into master
1 unresolved thread

This makes the test run into an assertion failure:

istlbackendtest: /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:106: decltype(auto) Dune::Fufem::Impl::visitMatrixEntryRecursive(Matrix&, const RowIndex&, const ColIndex&, F&&) [with Matrix = Dune::FieldMatrix<double, 2, 1>; RowIndex = Dune::Functions::Imp::ShiftedDynamicMultiIndex<Dune::Functions::StaticMultiIndex<long unsigned int, 1>, 1>; ColIndex = Dune::Functions::Imp::ShiftedDynamicMultiIndex<Dune::Functions::StaticMultiIndex<long unsigned int, 1>, 1>; F = Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&>&]: Assertion `iii.size()>0' failed.
Edited by Oliver Sander

Merge request reports

Pipeline #64073 failed

Pipeline failed for 0631bdc1 on test-istlmatrixbackend-for-one-line-blocks

Approval is optional

Closed by Oliver SanderOliver Sander 1 year ago (Sep 4, 2023 6:35am UTC)

Merge details

  • The changes were not merged into .
  • Auto-merge enabled

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Oliver Sander changed the description

    changed the description

  • Backtrace:

    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
        at ./nptl/pthread_kill.c:44
    #1  0x00007ffff79cad9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
    #2  0x00007ffff797bf32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007ffff7966472 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007ffff7966395 in __assert_fail_base (fmt=0x7ffff7adaa90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
        assertion=assertion@entry=0x555555891be6 "iii.size()>0", 
        file=file@entry=0x555555891ba0 "/home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh", 
        line=line@entry=106, 
        function=function@entry=0x555555893708 "decltype(auto) Dune::Fufem::Impl::visitMatrixEntryRecursive(Matrix&, const RowIndex&, const ColIndex&, F&&) [with Matrix = Dune::FieldMatrix<double, 2, 1>; RowIndex = Dune::Functions::Imp::ShiftedDyna"...) at ./assert/assert.c:92
    #5  0x00007ffff7974e32 in __GI___assert_fail (assertion=0x555555891be6 "iii.size()>0", 
        file=0x555555891ba0 "/home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh", line=106, 
        function=0x555555893708 "decltype(auto) Dune::Fufem::Impl::visitMatrixEntryRecursive(Matrix&, const RowIndex&, const ColIndex&, F&&) [with Matrix = Dune::FieldMatrix<double, 2, 1>; RowIndex = Dune::Functions::Imp::ShiftedDyna"...)
        at ./assert/assert.c:101
    #6  0x00005555557bea91 in Dune::Fufem::Impl::visitMatrixEntryRecursive<Dune::FieldMatrix<double, 2, 1>, Dune::Functions::Imp::ShiftedDynamicMultiIndex<Dune::Functions::StaticMultiIndex<unsigned long, 1>, 1>, Dune::Functions::Imp::ShiftedDynamicMultiIndex<Dune::Functions::StaticMultiIndex<unsigned long, 1>, 1>, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&>&> (
        matrix=..., iii=..., jjj=..., f=...) at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:106
    #7  0x00005555557bebb0 in operator()<Dune::FieldMatrix<double, 2, 1>&> (__closure=0x7fffffffcc20, matrix_ij=...)
        at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:113
    #8  0x00005555557c0a6a in Dune::Functions::hybridIndexAccess<Dune::Imp::CompressedBlockVectorWindow<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, long unsigned int, Dune::Fufem::Impl::visitMatrixEntryRecursive<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune:--Type <RET> for more, q to quit, c to continue without paging--
    :FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&>&&)::<lambda(auto:164&&)>&>(Dune::Imp::CompressedBlockVectorWindow<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > > &, const unsigned long &, struct {...} &) (c=..., i=@0x7fffffffcbf8: 0, f=...)
        at /home/sander/dune/dune-functions/dune/functions/common/indexaccess.hh:66
    #9  0x00005555557bebe0 in operator()<Dune::Imp::CompressedBlockVectorWindow<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&> (__closure=0x7fffffffcbb0, matrix_i=...)
        at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:61
    #10 0x00005555557c0aa8 in Dune::Fufem::Impl::hybridRowIndexAccess<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, long unsigned int, Dune::Fufem::Impl::visitMatrixEntry<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, long unsigned int, long unsigned int, visitMatrixEntryRecursive<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&>&&)::<lambda(auto:164&&)> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, long unsigned int const&, long unsigned int const&, visitMatrixEntryRecursive<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&>&&)::<lambda(auto:164&&)>&&)::<lambda(auto:160&&)> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > > &, const unsigned long &, struct {...} &&) (c=..., i=@0x7fffffffcc08: 0, f=...)
        at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:36
    #11 0x00005555557bec21 in Dune::Fufem::Impl::visitMatrixEntry<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, long unsigned int, long unsigned int, Dune::Fufem::Impl::visitMatrixEntryRecursive<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Functions::StaticMultiIndex<long unsigned int, 1>, Dune::Fufem::IST--Type <RET> for more, q to quit, c to continue without paging--
    LMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, const Dune::Functions::StaticMultiIndex<long unsigned int, 1>&, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&>&&)::<lambda(auto:164&&)> >(Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > > &, const unsigned long &, const unsigned long &, struct {...} &&) (matrix=..., i=@0x7fffffffcc08: 0, j=@0x7fffffffcbf8: 0, f=...)
        at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:60
    #12 0x00005555557becee in Dune::Fufem::Impl::visitMatrixEntryRecursive<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::StaticMultiIndex<unsigned long, 1>, Dune::Functions::StaticMultiIndex<unsigned long, 1>, Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::ToScalar<double&> > (matrix=..., iii=..., jjj=..., f=...)
        at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:112
    #13 0x00005555557e0c66 in Dune::Fufem::ISTLMatrixBackend<Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, double>::operator()<Dune::Functions::StaticMultiIndex<unsigned long, 1ul>, Dune::Functions::StaticMultiIndex<unsigned long, 1ul> > (this=0x7fffffffce98, row=..., col=...)
        at /home/sander/dune/dune-fufem/dune/fufem/backends/istlmatrixbackend.hh:186
    #14 0x00005555557d47d6 in testISTLMatrixBackendForBasis<double, Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::DefaultGlobalBasis<Dune::Functions::LagrangePreBasis<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::YaspGrid<3, Dune::EquidistantCoordinates<double, 3> > const> >, 1, double> > > (matrix=..., basis=...) at /home/sander/dune/dune-fufem/dune/fufem/test/istlbackendtest.cc:79
    #15 0x00005555557cbc70 in testISTLMatrixBackendForBasis<double, Dune::BCRSMatrix<Dune::FieldMatrix<double, 2, 1>, std::allocator<Dune::FieldMatrix<double, 2, 1> > >, Dune::Functions::DefaultGlobalBasis<Dune::Functions::LagrangePreBasis<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::YaspGrid<3, Dune::EquidistantCoordinates<double, 3> > const> >, 1, double> > > (basis=...) at /home/sander/dune/dune-fufem/dune/fufem/test/istlbackendtest.cc:94
    #16 0x00005555557bbc4e in main (argc=1, argv=0x7fffffffdbc8)
        at /home/sander/dune/dune-fufem/dune/fufem/test/istlbackendtest.cc:191
    • This is not a bug. The failure is expected, because the matrix does not match the basis indices. The multi-index traversal in the backend terminates for scalar entries. Hence it must fail for the given matrix type, because the column-index is exhausted before a scalar is reached.

      Edited by Carsten Gräser
    • Copy'n'paste bug -- of course this is not the right basis [sigh].

      Off to hunting the actual bug in dune-fracturephasefields.

    • Please register or sign in to reply
  • It is the reason for the test failure in https://gitlab.mn.tu-dresden.de/paraphase/dune-fracture-phasefields/-/merge_requests/49, but I haven't investigated any further yet.

  • closed

Please register or sign in to reply
Loading