Skip to content

Feature/shrinked edge partitioning #33

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

Closed

Conversation

yniederm
Copy link
Contributor

@yniederm yniederm commented Nov 24, 2021

  • Add edge_interior_ratio as an initialization argument for TilePartitioner.
  • This can later be used in TilePartitioner.subtile_slice() to do custom subdomain partitioning.
    This is based on the idea that ranks operating on boundary subdomains should have a smaller domain assigned.
  • tests/test_partitioner.py updated to reflect some more advanced assignments.

@ofuhrer
Copy link
Contributor

ofuhrer commented Nov 24, 2021

Can one of the admins verify this patch?

@@ -723,24 +727,49 @@ def tile_extent_from_rank_metadata(


def rank_extent_from_tile_metadata(
dims: Sequence[str], tile_extent: Sequence[int], layout: Tuple[int, int]
) -> Tuple[int, ...]:
dims: Sequence[str], tile_extent: Sequence[int], subtile_index: Tuple[int, int],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seeing this function reminds me - this PR breaks tile_extent_from_rank_metadata (which was expected). We'll need to remove that routine and modify the scatter/gather routines to determine the target shape exactly, by communicating array shapes over MPI. You can do this as part of your project since it's needed for us to merge it, or someone else can do it since it's not necessarily part of your project.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If all the current tests pass without this change, then it means scatter/gather only breaks when edge_tile_ratio on the TilePartitioner is not 1. That would mean we can consider merging this code first, then adding a test combining these two features (which would fail) and fixing the code in another PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you changed the call signature to this routine, could you add new test cases that make use of the new arguments and refactor the existing tests to pass (i.e. provide these new required arguments)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Scatter/Gather seem to work with an unchanged edge_interior_ratio as all the current tests are passing.

…ng, added one test case with just one interface dimension
@twicki
Copy link
Contributor

twicki commented Nov 30, 2021

ok to test

@mcgibbon
Copy link
Collaborator

launch jenkins

@yniederm
Copy link
Contributor Author

yniederm commented Dec 3, 2021

This PR is replaced by #44, more information can be found in #44.

@yniederm yniederm closed this Dec 3, 2021
mcgibbon pushed a commit that referenced this pull request Feb 3, 2022
Changes:
- `tests/test_partitioner.py` updated to reflect some more advanced assignments.
- `subtile_extent` method of Partitioner classes now takes in a required `rank` argument
- TilePartitioner has a new `edge_interior_ratio` argument which defaults to 1.0, and lets the user specify the relative 1-dimensional extent of edge and corner compute domains compared to interior compute domains. In all cases, the closest valid value will be used, which enables some previously invalid configurations (e.g. C128 on a 3 by 3 layout will use the closest valid edge_interior_ratio to 1.0)
- This can later be used in `TilePartitioner.subtile_slice()` to do custom subdomain partitioning.

This PR is replacing #33 with its feature branch moved from my fork to the `pace` repo.
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.

4 participants