AdaptiveKDTree::print seems to run forever for large tet mesh
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)
-
-
reporter Thanks for the quick response! I just gave it a try and it seems to work much better.
-
Thanks @Paul Romano
There is a PR now, https://bitbucket.org/fathomteam/moab/pull-requests/685, will run some more tests -
I assume this is no longer a problem? @Paul Romano If you confirm, we can close this issue.
-
reporter Yes, I tested out the branch from that PR and it did indeed solve the problem for me. Thanks to both of you!
-
- changed status to resolved
PR #685 fixes the issue
-
- changed status to closed
- Log in to comment
@Paul Romano thanks for reporting the issue
Can you try this branch?
https://bitbucket.org/fathomteam/moab/branch/iulian07/print_kdtree_vector
Should affect just the print method from the kd tree
It could be an issue with the container we are using, for large local meshes;
If this will give more reasonable output, I will create a PR