Replace hwloc_get_closest_objs() with an iterator. Starting from object foo, return sibling, then grand-sibling, then grand-grand-siblings, etc. And add the matching --closest 3 to hwloc-calc.