Skip to content

Waitall: Handle null (default constructed) requests - #117

Merged
aminiussi merged 1 commit into
boostorg:developfrom
hirschsn:wait_all_handle_nullrequest
Jun 19, 2020
Merged

Waitall: Handle null (default constructed) requests#117
aminiussi merged 1 commit into
boostorg:developfrom
hirschsn:wait_all_handle_nullrequest

Conversation

@hirschsn

@hirschsn hirschsn commented May 8, 2020

Copy link
Copy Markdown
Contributor

Analogously to MPI_REQUEST_NULL being the neutral element to MPI_Wait(), a null request should gracefully be handled also by wait_all.

Currently (boost 1.73) this deadlocks:

#include <boost/mpi.hpp>
#include <boost/mpi/nonblocking.hpp>
#include <vector>


int main()
{
	boost::mpi::environment env;
	std::vector<boost::mpi::request> req(1);
	boost::mpi::wait_all(req.begin(), req.end());
}

(You may add this or derivatives of it as a test case under the boost license.)

This PR fixes this issue by treating inactive requests as completed.

@hirschsn
hirschsn force-pushed the wait_all_handle_nullrequest branch from 1bc2d83 to 4b48637 Compare May 8, 2020 15:17
@hirschsn

hirschsn commented May 8, 2020

Copy link
Copy Markdown
Contributor Author

Sorry, force-pushed because I somehow forgot some semicolons... :)

@hirschsn

hirschsn commented Jun 4, 2020

Copy link
Copy Markdown
Contributor Author

I just took a look at the issues. This might be related to or actually fix #109.

@aminiussi

Copy link
Copy Markdown
Member

I added that specific test.

I'm testing Intel and the merge shall go through.

@aminiussi
aminiussi merged commit 439b441 into boostorg:develop Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants