-
Notifications
You must be signed in to change notification settings - Fork 15
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
mpi: manually heap-allocate payloads for local messages #378
Conversation
8375d31
to
9ece9e1
Compare
TODO:
|
9ece9e1
to
715e186
Compare
@@ -242,21 +242,6 @@ TEST_CASE_METHOD(MpiTestFixture, "Test send and recv on same host", "[mpi]") | |||
world.send( | |||
rankA1, rankA2, BYTES(messageData.data()), MPI_INT, messageData.size()); | |||
|
|||
SECTION("Test queueing") |
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.
This does not apply as the message buffer is not in the queue any more.
7ec2294
to
65cd6af
Compare
65cd6af
to
c95f559
Compare
6fd483a
to
c63f81c
Compare
c63f81c
to
a8f9a68
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
==========================================
- Coverage 81.94% 80.86% -1.08%
==========================================
Files 106 107 +1
Lines 8013 7222 -791
==========================================
- Hits 6566 5840 -726
+ Misses 1447 1382 -65 ☔ View full report in Codecov by Sentry. |
* mpi: make local fast path faster * util/memory: use mimalloc * nits: run clang-format * nits: some self-review * mpi: fix detection of local messages in receiver * mpi: only memcpy the required bytes * tests: make lsan happy with the malloc/free optimization * nits: run clang format
This PR makes sure that, when sending a local MPI message, we make the minimum number of copies (of the message payload).
The minimum number of copies is two: (i) from the sender-owned buffer, to a runtime-owned buffer, and (ii) from the runtime-owned buffer to the receiver-owned buffer.
In the future, we could consider using something different than
std::malloc
.