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
Expand support for completing non-blocking requests #989
Comments
Instead of an all in one method, how about adding Would it be possible to also support this for recv, if we use std::list as the primary interface for passing the data? |
Sorry for the late response. Yes, I think if you support wait_some and test_some AND std::list as the primary interface for passing data, it would be what we need. |
Great, I started working on this, a question: Your method checks and when the requests are fulfilled, and removes fulfilled ones those from the list. For the general case - do we want to know which ones completed? Do we want:
For rounds of communication. or something like:
If we want to take some action on the Nodes between |
It may be possible that I want to have the completed requests around for some reason, although I probably don't care about the out_indices. What do you think of moving the completed requests out of the input list and placed into another list to return? Something like
Would that work? Of course, you can also have both lists in the argument and return void. |
Yes, that's a great idea! Style wise I would like to pass a ref to the list for the output as well. |
@gunney1 Q: Did you look at conduit/src/libs/relay/conduit_relay_mpi.hpp Line 281 in 1255e71
I think it's different comm pattern than you are using -- but it provides a very nice general interface for isends and irecvs. |
@cyrush Very sorry for taking so long. After calling |
@cyrush Just getting back to this. I'm still interested in this feature. I'd like to be able to specify whether I'm willing to wait for at least one to finish or if I'm just checking whether any has actually finished. Basically, whether to use |
I'd like to have more flexible ways to complete
conduit::relay::mpi::Request
s from non-blocking communications. Specifically,Conduit "wait" functions requires a C array of Requests. Building such an array requires reallocating memory when we run out of space. However, reallocating memory would invalidate the pointers given to MPI. We use a
list<Request>
in Axom so we don't invalidate any pointers to add moreRequest
s. If the Conduit "wait" functions allowedRequest *requests[]
instead of justRequest requests[]
we could use them. We're currently writing our own "wait" code, but since we're usingconduit::relay::mpi::Request
, it would make sense to let Conduit complete the request.The second part is for conduit to support waitsome and testsome to check requests. The first always completes at least 1 outstanding request (if there are any) and the second is non-blocking. We currently do it this way:
Obviously, if conduit support lists of
Request
s, we wouldn't need to generate the intermediate container to pass to the wait functions. But there's probably no way to do this without templates.The text was updated successfully, but these errors were encountered: