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

Improvements to the communications flow #1670

Open
ahoenselaar opened this issue Jul 13, 2021 · 1 comment
Open

Improvements to the communications flow #1670

ahoenselaar opened this issue Jul 13, 2021 · 1 comment

Comments

@ahoenselaar
Copy link
Contributor

There are areas where the current communications code could be improved:

  • The sequence of send and receive operations is inferred multiple times per timestep, even though it only changes in connect_the_chunks.
  • Asynchronous receives are initiated too late (after all data has been sent)
  • Send operations are sequenced without consideration for a particular prioritization criterion, e.g. data transfer size
  • The use of MPI_WaitAll delays the processing of incoming data excessively
  • The data structures used for communication buffers are complex (3D arrays), error-prone to use, and are sized under the assumption of O(n^2) communication links. In practice, each chunk exchanges data with a small number of other chunks.
  • Sequential boundary updates of {PH, H}, {PE, E} are treated as separate operations with full synchronization barriers.
  • The flattening of data into comms buffers and its reverse operation are implemented using lists of pointers (one pointer per transferred float). As the regions that need to be transferred can be expected to be cuboids, the flattening could be implemented using strided loops.

The first three issues are addressed in #1656.

@ahoenselaar
Copy link
Contributor Author

The logic in connect_the_chunks is so convoluted and lacking coverage by unit tests, that it is very unlikely for the proposed refactoring to succeed without causing a subtle form of breakage.

ahoenselaar pushed a commit to ahoenselaar/meep that referenced this issue Aug 6, 2021
* Replace `connections` with separate maps for incoming and outgoing connections.
* Maintain separate connections for each chunk pair.

These changes unblock some of the improvements disucssed on NanoComp#1710 and NanoComp#1670.
stevengj pushed a commit that referenced this issue Aug 11, 2021
* Replace `connections` with separate maps for incoming and outgoing connections.
* Maintain separate connections for each chunk pair.

These changes unblock some of the improvements disucssed on #1710 and #1670.

Co-authored-by: Andreas Hoenselaar <ahoenselaar@gmail.com>
bencbartlett pushed a commit to bencbartlett/meep that referenced this issue Sep 9, 2021
* Replace `connections` with separate maps for incoming and outgoing connections.
* Maintain separate connections for each chunk pair.

These changes unblock some of the improvements disucssed on NanoComp#1710 and NanoComp#1670.

Co-authored-by: Andreas Hoenselaar <ahoenselaar@gmail.com>
mawc2019 pushed a commit to mawc2019/meep that referenced this issue Nov 3, 2021
* Replace `connections` with separate maps for incoming and outgoing connections.
* Maintain separate connections for each chunk pair.

These changes unblock some of the improvements disucssed on NanoComp#1710 and NanoComp#1670.

Co-authored-by: Andreas Hoenselaar <ahoenselaar@gmail.com>
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

No branches or pull requests

1 participant