Skip to content

Use MPI_Dist_graph_create to determine comm pattern#1358

Open
aprokop wants to merge 1 commit into
arborx:masterfrom
aprokop:gone_with_mpi_alltoall
Open

Use MPI_Dist_graph_create to determine comm pattern#1358
aprokop wants to merge 1 commit into
arborx:masterfrom
aprokop:gone_with_mpi_alltoall

Conversation

@aprokop
Copy link
Copy Markdown
Contributor

@aprokop aprokop commented May 17, 2026

MPI_Alltoall has issues with scaling. This patch replaces it by using MPI_Dist_graph_create and other helper functions to rely on MPI. This seems to scale better on Frontier:
Screenshot 2026-05-17 at 12 49 22 PM

This bumps our MPI requirement to 2.2.

@aprokop aprokop added the performance Something is slower than it should be label May 17, 2026
@aprokop
Copy link
Copy Markdown
Contributor Author

aprokop commented May 17, 2026

Tested it on Frontier. Need to test it more thoroughly:

  • on Aurora to see if it helps with scaling
  • using GPU-aware MPI

@aprokop aprokop changed the title Use MPI_Dist_graph* to determine comm pattern Use MPI_Dist_graph_create to determine comm pattern May 18, 2026
dest_weights[i] = _dest_offsets[i + 1] - _dest_offsets[i];

MPI_Comm graph_comm;
MPI_Dist_graph_create(_comm, (outdegree ? 1 : 0), &comm_rank, &outdegree,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we save the graph or do we need to rebuild it every time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right now, we don't use it past Distributor construction. I do want to try to use it for neighborhood communications inside doPostsAndWaits in the future. I'll store it then if it works out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Something is slower than it should be

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants