[MPI3 Fortran] MPI_STATUS_IGNORE (and friends)
Jeff Squyres
jsquyres at cisco.com
Wed May 26 11:21:20 CDT 2010
Craig and I have been working on a prototype implementation of the proposed MPI F08 bindings. It has been tremendously helpful to keep the proposal ideas on track with what is possible, what is useful, etc.
One of the things that we would like to change from the current proposal is to remove the sentinel value constants MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE (and a few others that are similar in spirit). MPI status structs are usually allocated and passed by the application down to an MPI function; the MPI implementation then fills up that struct. However, the app can pass MPI_STATUS_IGNORE (or MPI_STATUSES_IGNORE in an array context) to indicate that they don't care about the status and don't want the MPI implementation to fill it (them).
Just like the C++ bindings, instead of having these constants in the F08 bindings, we propose to have overloaded functions that simply do not have a status parameter. For example:
-----
interface MPI_Test
! Note the "status" parameter here
subroutine MPI_Test_wrapper(request, completed, status, err)
type(MPI_Request), intent(inout) :: request
logical, intent(out) :: completed
type(MPI_Status), intent(out) :: status
integer, optional, intent(out) :: err
end subroutine
! Note the LACK of "status" parameter here
subroutine MPI_Test_ignore_wrapper(request, completed, err)
type(MPI_Request), intent(inout) :: request
logical, intent(out) :: completed
integer, optional, intent(out) :: err
end subroutine
end interface
-----
Just like C++, this seems like the "natural" way to do it in the language. It also keeps a 1:1 mapping to the MPI language neutral bindings and is therefore not a radical departure from the MPI specification. Indeed, the C++ bindings established a precedent for this exact case (there are 2 C++ bindings for MPI::Test, for example -- one with a status argument and one without).
Thoughts?
--
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/
More information about the mpiwg-fortran
mailing list