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

Streamline communications #1656

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Streamline communications #1656

merged 1 commit into from
Jul 13, 2021

Conversation

ahoenselaar
Copy link
Contributor

@ahoenselaar ahoenselaar commented Jul 6, 2021

  • Calculate the sequence of sends and receives once after connect_the_chunks
  • Initiate asynchronous receives as early as possible
  • Initiate asynchronous sends immediately after copying data into the communication buffers
  • Prioritize chunks based on the data transfer size
  • Introduce an RAII-based communications manager class that waits for requests to finish upon destruction
  • Store nonzero communication sizes in a hash map instead of an array of size #chunks x #chunks

Performance increase by about 15% in smaller sims with light communications (small transfer sizes), e.g. a 2D sim with 12 processes on a single physical node.
Not as noticeable for larger 3D sims (e.g. 24 processes across 2 physical nodes), likely because the increased communication efficiency is overshadowed by the effects of uneven chunk balancing.

Future improvements:

  • Start processing received messages immediately by using MPI_Testsome instead of MPI_Waitall. This should overlap network communications more with the copying of data into the field array.
  • Combine the sequential boundary updates of {PH, H}, {PE, E} into a single [Set up Rx, copy data, trigger Tx, process Rx data] cycle
  • Prioritize send operations by target process instead of source chunk. This requires more careful management of the subranges in the comms buffer array.

@ahoenselaar ahoenselaar marked this pull request as ready for review July 7, 2021 05:40
@ahoenselaar
Copy link
Contributor Author

Are there any review comments?

src/meep.hpp Show resolved Hide resolved
src/meep.hpp Show resolved Hide resolved
src/step.cpp Outdated Show resolved Hide resolved
src/step.cpp Show resolved Hide resolved
@stevengj stevengj merged commit 9d979ed into NanoComp:master Jul 13, 2021
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
mawc2019 pushed a commit to mawc2019/meep that referenced this pull request Nov 3, 2021
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