diff --git a/NEWS b/NEWS index 8b4ab1eabe..95a0215461 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,8 @@ version 1.0. 1.0.2 ----- +- Add missing MPI::Request::Get_status() methods. Thanks to Bill + Saphir for pointing this out to us. - Improved error messages on memory registration errors (e.g., when using high-speed networks). - Open IB support now checks firmware for how many outstanding RDMA diff --git a/ompi/mpi/cxx/request.h b/ompi/mpi/cxx/request.h index 9b6fabb689..6ddd31581b 100644 --- a/ompi/mpi/cxx/request.h +++ b/ompi/mpi/cxx/request.h @@ -124,6 +124,9 @@ public: virtual void Cancel(void) const; + virtual bool Get_status(Status& status) const; + + virtual bool Get_status() const; protected: #if ! 0 /* OMPI_ENABLE_MPI_PROFILING */ diff --git a/ompi/mpi/cxx/request_inln.h b/ompi/mpi/cxx/request_inln.h index cc0ebe28ee..9dc9529188 100644 --- a/ompi/mpi/cxx/request_inln.h +++ b/ompi/mpi/cxx/request_inln.h @@ -310,3 +310,24 @@ MPI::Prequest::Startall(int count, MPI:: Prequest array_of_requests[]) delete [] mpi_requests; } +inline bool MPI::Request::Get_status(MPI::Status& status) const +{ + int flag; + MPI_Status c_status; + + (void)MPI_Request_get_status(mpi_request, &flag, &c_status); + if (flag) { + status = c_status; + } + return (bool) flag; +} + +inline bool MPI::Request::Get_status() const +{ + int flag; + + (void)MPI_Request_get_status(mpi_request, &flag, MPI_STATUS_IGNORE); + return (bool) flag; +} + +