-
Notifications
You must be signed in to change notification settings - Fork 50
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 Communication #43
Conversation
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
========================================
- Coverage 99.2% 97.8% -1.4%
========================================
Files 12 15 +3
Lines 379 731 +352
========================================
+ Hits 376 715 +339
- Misses 3 16 +13
Continue to review full report at Codecov.
|
6473572
to
2dc5f6b
Compare
45d638f
to
9974ab1
Compare
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.
TLDR
I only looked at CommunicationPlan
so far.
Why are CommunicationPlan:: createFromExportsAndTopology()
, :: createFromExportsOnly()
, and :: createExportSteering()
public member functions? The first two feel like they should be constructors, and the last one should be marked as protected if you are only going to call it from derived classes.
Similarly why did you chose Distributor:: createFromExportsAndNeighbors()
and :: createFromExports()
over two constructor overloads?
elements going to neighbor with local id 1, etc.). Only indices of ghost | ||
elements are in the list of exports. | ||
*/ | ||
Kokkos::View<std::size_t*,kokkos_memory_space> exportSteering() const |
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.
Const-correctness: Either return Kokkos::View<std::size_t const*,kokkos_memory_space>
or drop the const
qualifier on the function member.
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.
Also this is really confusing to give an accessor (getter with no side effect) such a name.
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.
I have changed the name as we discussed
@dalg24 I refactored the inheritance structure here. The base class now has functions that are essentially protected but they must be made public to use class data with CUDA. I changed the create functions in the derived classes as well. This makes it clear that an entirely new communication plan is being created. |
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.
Some more feedback. I looked at Distributor
and Halo
.
It would have been nice to generalize/reuse loops that start the nonblocking receives and that perform the blocking sends.
@junghans What do you think is the best way here to enable |
abc868f
to
0ccccc0
Compare
258fb70
to
e0d14d4
Compare
Cabana_Types.hpp | ||
Cabana_VerletList.hpp | ||
Cabana_Version.hpp | ||
) |
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.
Say I create a new header and forget to list it here. Will it be caught when building and running the tests?
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.
It may although that is tough to tell because it is header only so it may just pull it in. It will likely show up more when external libraries link in and the missing header is not installed.
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.
No, it won’t, hence globbing and subfolders might be preferred!
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.
Lets push this as is with regards to the build system them and move this conversation to #55 - once we come to a conclusion there we can implement in a new PR
Things to finish:
|
Co-authored-by: dalg24 <[email protected]>
Co-authored-by: dalg24 <[email protected]>
Co-authored-by: dalg24 <[email protected]>
4a351b9
to
4579770
Compare
case change Heffte
Adds support for MPI and basic communication plans and operations:
CommunicationPlan
- base class for all communication plans. Contains the base implementation which determines the number of imports and exports as well as neighbor ranks based on export data.Distributor
- provides a communication plan formigrate
to move data from one uniquely-owned distribution to another uniquely-owned distribution. This derives fromCommunicationPlan
.Halo
- provides a communication plan forgather
andscatter
to manipulate ghosted data. This also derives fromCommunicationPlan
Each has a decent set of unit tests that caught some bugs. I have also tested this with a GPU-aware OpenMPI implementation although we are currently only using CUDA UVM (we will be adding regular CUDA memory soon).