-
Notifications
You must be signed in to change notification settings - Fork 11
Persistent API #156
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: develop
Are you sure you want to change the base?
Persistent API #156
Conversation
…object but does run.
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.
Just a first pass with a few comments and some newbie questions so I can get a better grasp on persistent communications. 🙂
Note: since these channels rely on MPI-only mechanisms, I think the channel.hpp
header should be moved to the KokkosComm/mpi
directory.
I think this PR needs to be rebased on top of |
Here is a test script, for anyone wanting to try it. |
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 am very interested in this, but I have questions about how it will work with Kokkos' asynchronous programming model.
using value_type = typename SendView::value_type; | ||
// Add a new request to the send_reqs_ vector | ||
send_reqs_.emplace_back(); | ||
MPI_Send_init(KokkosComm::data_handle(view), KokkosComm::span(view), KokkosComm::Impl::mpi_type_v<value_type>, |
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.
Is a fence()
needed there?
Kokkos::Tools::pushRegion("KokkosComm::Channel::recvinit"); | ||
using value_type = typename RecvView::value_type; | ||
recv_reqs_.emplace_back(); | ||
MPI_Recv_init(KokkosComm::data_handle(view), KokkosComm::span(view), KokkosComm::Impl::mpi_type_v<value_type>, |
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.
Is a fence() needed there?
channel.sendinit(v); | ||
channel.recvinit(v); | ||
channel.start(); | ||
channel.wait(); |
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.
You should check if the contents are ok, therefore it is probably safer to use two different views.
for (auto& req : recv_reqs_) { | ||
mpi_reqs.push_back(req.mpi_request()); | ||
} | ||
MPI_Startall(mpi_reqs.size(), mpi_reqs.data()); |
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.
Or are fences needed there?
Co-authored-by: Cédric Chevalier <[email protected]>
…ists attempt to resolve check: Linux-Install / Kokkos-master-OpenMPI (pull_request) fix: address CMake issues
This PR introduces a minimal implementation of persistence functionality to obtain feedback, suggestions, and requests from developers and users. A version utilizing MPI windows is in progress, as are some additional unit tests and a performance test.
10/11 Test #10: test-channel ..................... Passed 2.91 sec