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

Use Index map in PGM #1639

Open
wants to merge 5 commits into
base: global-to-local
Choose a base branch
from
Open

Use Index map in PGM #1639

wants to merge 5 commits into from

Conversation

MarcelKoch
Copy link
Member

@MarcelKoch MarcelKoch commented Jul 2, 2024

This PR enables using an index map to create the coarse level using PGM for distributed matrices. IMO this simplifies the PGM implementation, since there is no 'manual' implementation needed anymore.
This also has some consequences for the distributed::Matrix class. Namely, when creating a matrix with from local and non-local parts, an index map has to be supplied, instead of the list of vectors. Again, I think this should simplify the interface. Note that currently there is no accessor to the index map, since it's not necessary. But it might be useful for consistency.

I guess this is also an interface breaking change.

Todo:

@MarcelKoch MarcelKoch self-assigned this Jul 2, 2024
@MarcelKoch MarcelKoch requested a review from yhmtsai July 2, 2024 14:50
@ginkgo-bot ginkgo-bot added reg:testing This is related to testing. mod:core This is related to the core module. mod:cuda This is related to the CUDA module. mod:reference This is related to the reference module. mod:hip This is related to the HIP module. type:multigrid This is related to multigrid labels Jul 2, 2024
@MarcelKoch MarcelKoch requested a review from a team July 2, 2024 14:51
@MarcelKoch MarcelKoch marked this pull request as draft July 2, 2024 14:53
@MarcelKoch MarcelKoch force-pushed the index-map-pgm branch 2 times, most recently from 56d235d to b0e5f6d Compare July 5, 2024 11:07
@MarcelKoch MarcelKoch marked this pull request as ready for review July 5, 2024 11:07
@MarcelKoch MarcelKoch force-pushed the index-map-pgm branch 2 times, most recently from f594348 to 87d62d3 Compare July 10, 2024 09:23
Comment on lines +284 to +285
auto seng_global_agg = imap.map_to_global(
send_agg, experimental::distributed::index_space::local);
Copy link
Member

Choose a reason for hiding this comment

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

If I guess it correctly, you map the local index back to the global index to avoid the collision.
this is what I want to avoid because it needs twice of memory transferring between nodes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would guess that the actual volume of the data transfer is negligible compared to the latency cost. Also, this is significantly simpler to what was there before.

@MarcelKoch MarcelKoch force-pushed the index-map-pgm branch 3 times, most recently from 9e52a2c to ded4dd3 Compare July 16, 2024 07:43
@MarcelKoch MarcelKoch force-pushed the index-map-pgm branch 2 times, most recently from 9e52a2c to ded4dd3 Compare July 18, 2024 16:40
@MarcelKoch MarcelKoch added the 1:ST:ready-for-review This PR is ready for review label Aug 15, 2024
@MarcelKoch MarcelKoch added this to the Ginkgo 1.9.0 milestone Aug 26, 2024
@MarcelKoch MarcelKoch requested review from yhmtsai and a team and removed request for a team August 27, 2024 12:02
@MarcelKoch MarcelKoch requested review from yhmtsai and removed request for yhmtsai September 16, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-for-review This PR is ready for review mod:core This is related to the core module. mod:cuda This is related to the CUDA module. mod:hip This is related to the HIP module. mod:reference This is related to the reference module. reg:testing This is related to testing. type:multigrid This is related to multigrid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants