-
Notifications
You must be signed in to change notification settings - Fork 12
Refactor MPI communication #165
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves performance of repartitioned multi-GPU matrix values and vector value update operations by optimizing communication patterns and adding device communication initialization.
- Refactors all-to-all communication to use MPI operations (MPI_Igatherv, MPI_Iscatterv) for better performance
- Adds symmetric matrix optimization to skip redundant data transfers
- Introduces device communication initialization and repartitioned communicator support
Reviewed Changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/MatrixWrapper/Distributed.cpp | Adds device communication initialization calls to test setup |
| src/StoppingCriterion.cpp | Adds timing measurements for performance analysis |
| src/MatrixWrapper/Distributed.cpp | Implements optimized MPI communication and symmetric matrix handling |
| src/CommunicationPattern.cpp | Adds new function for computing repartitioned all-to-all patterns |
| include/OGL/lduLduBase.hpp | Adds device communication initialization and timing code |
| include/OGL/StoppingCriterion.hpp | Adds frequency mode configuration for stopping criterion optimization |
| include/OGL/DevicePersistent/Vector.hpp | Replaces communication function with direct MPI calls for copy-back operation |
| include/OGL/DevicePersistent/ExecutorHandler.hpp | Adds rank management utilities and device communication setup |
| include/OGL/CommunicationPattern.hpp | Declares new repartitioned communication pattern function |
Comments suppressed due to low confidence (1)
src/MatrixWrapper/Distributed.cpp:1
- Duplicate assignment to
recv_offsets.back(). The first assignment on line 203 setssend_offsets.back()but the code incorrectly assigns torecv_offsets.back()twice. Line 203 should assign tosend_offsets.back().
// SPDX-FileCopyrightText: 2024 OGL authors
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| std::string("\n\tRetrieve results bandwidth "); // + | ||
| std::to_string(bandwidth_copy_back) + std::string(" [GByte/s]"); |
Copilot
AI
Sep 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string concatenation is broken. Line 345 ends with a comment // + and line 346 is a separate statement that isn't assigned to anything. The + operator should be on line 345 to concatenate with line 346.
| std::string("\n\tRetrieve results bandwidth "); // + | |
| std::to_string(bandwidth_copy_back) + std::string(" [GByte/s]"); | |
| std::string("\n\tRetrieve results bandwidth ") + | |
| std::to_string(bandwidth_copy_back) + std::string(" [GByte/s]"); |
323dc85 to
11a7a16
Compare
82efe8e to
28ee971
Compare
This PR improves repartitioned multi gpu matrix values and vector value update performance.