Skip to content

Commit

Permalink
Revert MPI ISend test to non-blocking.
Browse files Browse the repository at this point in the history
Final blocking test added to destructor.
  • Loading branch information
SLongshaw committed Aug 2, 2021
1 parent 5e680c1 commit 0300c05
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions comm_mpi_smart.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class comm_mpi_smart : public comm_mpi {
std::list<std::pair<MPI_Request,std::shared_ptr<std::vector<char> > > > send_buf;
public:
comm_mpi_smart( const char URI[], MPI_Comm world = MPI_COMM_WORLD ) : comm_mpi(URI, world) {}
virtual ~comm_mpi_smart() {}
virtual ~comm_mpi_smart() {
// Ensure any incomplete sends are complete before destruction
test_completion_blocking();
}

private:
void send_impl_( message msg, const std::vector<bool> &is_sending ) {
Expand All @@ -82,8 +85,8 @@ class comm_mpi_smart : public comm_mpi {
domain_remote_, &(send_buf.back().first));
}
}
// Block until MPI_Isend calls completed successfully, maximum 60 seconds with printed warnings
test_completion_blocking();
// Catch any unsent MPI_Isend calls before fetch starts, non-blocking
test_completion();
}

message recv_impl_() {
Expand Down

0 comments on commit 0300c05

Please sign in to comment.