Skip to content

Refactor P2P and MPI handling#287

Merged
Snapex2409 merged 11 commits into
developfrom
refactor-mpi
Jun 6, 2026
Merged

Refactor P2P and MPI handling#287
Snapex2409 merged 11 commits into
developfrom
refactor-mpi

Conversation

@Snapex2409

@Snapex2409 Snapex2409 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

This PR provides an MPIHandler that manages an MPI communicator and provides utility functions for it. All P2P logic was moved to this new class and abstracted. Specifically, the p2p_comm function was generalised and is now named exchange. This method is used across Load Balancing, Adaptivity, and Interpolation as the p2p comm backbone, rather than using their individual implementations.

Checklist:

  • I made sure that the CI passed before I ask for a review.
  • I added a summary of the changes (compared to the last release) in the CHANGELOG.md.
  • If necessary, I made changes to the documentation and/or added new content.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@Snapex2409 Snapex2409 marked this pull request as ready for review June 1, 2026 13:35
@IshaanDesai IshaanDesai requested review from IshaanDesai and Copilot and removed request for Copilot June 3, 2026 08:56
contains all p2p logic (abstracted)

# Conflicts:
#	tests/unit/test_adaptivity_parallel.py
# Conflicts:
#	CHANGELOG.md

@IshaanDesai IshaanDesai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The refactoring makes a lot of sense. Thanks for doing this! I have only minor comments. The core MPI functionality itself remains the same.

Comment thread micro_manager/adaptivity/global_adaptivity.py Outdated
Comment thread micro_manager/adaptivity/global_adaptivity.py Outdated
Comment thread micro_manager/tools/mpi_handler.py Outdated
Comment thread micro_manager/tools/mpi_handler.py
Comment thread micro_manager/tools/mpi_handler.py
Comment thread micro_manager/tools/mpi_handler.py
Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
@Snapex2409 Snapex2409 requested a review from IshaanDesai June 5, 2026 09:47
@IshaanDesai IshaanDesai added the enhancement Enchance existing functionality label Jun 5, 2026

@IshaanDesai IshaanDesai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ready to squash and merge.

@Snapex2409 Snapex2409 merged commit 6a49abd into develop Jun 6, 2026
11 checks passed
@Snapex2409 Snapex2409 deleted the refactor-mpi branch June 6, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enchance existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants