AdaptiveKDTree::print seems to run forever for large tet mesh

Issue #177 closed
Paul Romano created an issue

I was using the AdaptiveKDTree::print method to look at statistics for k-d trees based on various choices of parameters used to build the trees (MAX_DEPTH, PLANE_SET, etc.). When I tried this on a tree that was produced for a tet mesh with > 1M elements, the print method seems to run forever regardless of the choice of parameters (e.g., even if I limit the depth to a small value). Unfortunately I’m not able to share the mesh but can at least share a backtrace from gdb when I pause execution in the middle of running print:

0x0000155554248559 in moab::Range::insert(moab::Range::const_iterator, unsigned long, unsigned long) () from /opt/moab/5.5.1/lib/libMOAB.so.5
(gdb) bt
#0  0x0000155554248559 in moab::Range::insert(moab::Range::const_iterator, unsigned long, unsigned long) () from /opt/moab/5.5.1/lib/libMOAB.so.5
#1  0x00001555541d2908 in moab::MeshSetSequence::get_dimension(moab::SequenceManager const*, unsigned long, int, moab::Range&, bool) const ()
   from /opt/moab/5.5.1/lib/libMOAB.so.5
#2  0x00001555540ffa1f in moab::Core::get_entities_by_dimension(unsigned long, int, moab::Range&, bool) const () from /opt/moab/5.5.1/lib/libMOAB.so.5
#3  0x00001555540bc5f6 in moab::AdaptiveKDTree::print() () from /opt/moab/5.5.1/lib/libMOAB.so.5

Comments (7)

  1. Paul Romano reporter

    Yes, I tested out the branch from that PR and it did indeed solve the problem for me. Thanks to both of you!

  2. Log in to comment