Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct Solver: Recursive Skeletonization #164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexfikl
Copy link
Collaborator

@alexfikl alexfikl commented Jun 30, 2022

Attempting to break up the direct solver MR into smaller, more reviewable pieces. As a rundown

The code for this is mostly in the deprecated https://gitlab.tiker.net/inducer/pytential/-/merge_requests/137.

@alexfikl alexfikl changed the title Direct Solver: Direct Solver: Recursive Skeletonization Jun 30, 2022
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 5 times, most recently from 39e8347 to 80bb8e1 Compare July 1, 2022 15:00
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 3 times, most recently from 8e3731d to 78699ec Compare July 14, 2022 12:30
@alexfikl alexfikl marked this pull request as ready for review July 14, 2022 12:31
@alexfikl
Copy link
Collaborator Author

@inducer This should be ready for a look. It doesn't do much:

  • adds a data structure to hold the hierarchical cluster info from boxtree.Tree and merge cluster indices.
  • adds some helper functions to do the recursive skeletonization + simple tests.

@alexfikl alexfikl requested a review from inducer July 14, 2022 15:12
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 3 times, most recently from 7ed33f4 to ea42c82 Compare August 2, 2022 06:24
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 5 times, most recently from 80fe1fb to b44f4a8 Compare August 4, 2022 18:09
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from cc4be24 to 0176d32 Compare August 12, 2022 12:57
@alexfikl alexfikl force-pushed the direct-solver-recursion branch from 0176d32 to f71a21b Compare August 22, 2022 06:19
Copy link
Owner

@inducer inducer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed a pending review. Figured it'd be better to submit it. :) Don't quite know how old this is.


Current level that is represented.

.. attribute:: nlevels
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this avoidable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked this a while back, so not quite sure if your comment still applies?

pytential/linalg/cluster.py Show resolved Hide resolved
# {{{ cluster tree

@dataclass(frozen=True)
class ClusterTreeLevel:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this two things rather than one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, separated into a ClusterTree and ClusterLevel with a ClusterTree.levels() iterator to go through them for the recursive skeletonization.

Naming could still be better probably?

@@ -355,7 +360,25 @@ def test_skeletonize_by_proxy(actx_factory, case, visualize=False):
case = replace(case, approx_cluster_count=6, id_eps=1.0e-8)
logger.info("\n%s", case)

run_skeletonize_by_proxy(actx, case, case.resolutions[0], visualize=visualize)
dd = sym.DOFDescriptor(case.name, discr_stage=case.skel_discr_stage)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the test docstring to describe precisely what's being tested here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from 9a8db7f to ce00d4e Compare August 23, 2022 16:09
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 3 times, most recently from c1e986c to 814b8ac Compare September 14, 2022 07:10
@alexfikl alexfikl force-pushed the direct-solver-recursion branch from 63fcc25 to 17890c4 Compare May 18, 2023 13:20
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from 845f75d to b17e975 Compare June 20, 2023 06:41
@alexfikl
Copy link
Collaborator Author

alexfikl commented Jun 20, 2023

Hm, weird that this failed and #174 seems to be doing just fine. They did get different machines:

EDIT: Latest runs (after #212) seem to pass repeatedly again, e.g.

@alexfikl alexfikl force-pushed the direct-solver-recursion branch from b17e975 to 53a0212 Compare June 27, 2023 06:14
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 3 times, most recently from 9630b4f to 32ecc58 Compare August 4, 2023 06:54
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from f79175f to 19f4098 Compare September 8, 2023 07:19
@alexfikl alexfikl force-pushed the direct-solver-recursion branch from 19f4098 to e9643cc Compare October 17, 2023 06:44


def make_cluster_parent_map(parent_ids: np.ndarray) -> np.ndarray:
"""Construct a parent map for :attr:`ClusterLevel.parent_map`."""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrase/rework? "All children in a bucket"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexfikl alexfikl force-pushed the direct-solver-recursion branch from e9643cc to 20fbc31 Compare October 29, 2023 09:01
@alexfikl
Copy link
Collaborator Author

@inducer I think inducer/ci-support@1475971 broke pylint (it's not finding the cython stuff anymore?). Any suggestion for a fix?

@inducer
Copy link
Owner

inducer commented Nov 1, 2023

#225

@alexfikl alexfikl force-pushed the direct-solver-recursion branch from 20fbc31 to 6983a42 Compare November 1, 2023 15:52
@alexfikl alexfikl force-pushed the direct-solver-recursion branch from 6983a42 to ab228e6 Compare May 29, 2024 07:01
@alexfikl alexfikl force-pushed the direct-solver-recursion branch from ab228e6 to c92b7f0 Compare July 6, 2024 06:30
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from f6e7c6e to 78eebbf Compare August 2, 2024 11:48
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from c479984 to 8aa200f Compare September 1, 2024 08:19
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 3 times, most recently from 9c5bb68 to a7c5d19 Compare September 20, 2024 11:51
@alexfikl alexfikl force-pushed the direct-solver-recursion branch 2 times, most recently from 8bef46c to ae443aa Compare November 16, 2024 09:00
@alexfikl alexfikl force-pushed the direct-solver-recursion branch from ae443aa to 85033db Compare December 17, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants