@@ -63,6 +63,8 @@ number of entries received.
6363"""
6464Status
6565
66+ Base.:(== )(a:: Status , b:: Status ) = a. source == b. source && a. tag == b. tag && a. error == b. error
67+
6668Get_source (status:: Status ) = Int (status. source)
6769Get_tag (status:: Status ) = Int (status. tag)
6870Get_error (status:: Status ) = Int (status. error)
@@ -333,15 +335,15 @@ function irecv(src::Integer, tag::Integer, comm::Comm)
333335end
334336
335337"""
336- Sendrecv(sendbuf, [sendcount::Integer, [sendtype::Union{Datatype, MPI_Datatype}]],
338+ Sendrecv! (sendbuf, [sendcount::Integer, [sendtype::Union{Datatype, MPI_Datatype}]],
337339 dest::Integer, sendtag::Integer,
338- recvbuf, [recvcount::Integer, [recvtype::Union{Datatype, MPI_Datatype}]],
340+ recvbuf, [recvcount::Integer, [recvtype::Union{Datatype, MPI_Datatype}]],
339341 source::Integer, recvtag::Integer,
340342 comm::Comm)
341343
342- Complete a blocking send-receive operation over the MPI communicator `comm`. Send
343- `sendcount` elements of type `sendtype` from `sendbuf` to the MPI rank `dest` using message
344- tag `tag`, and receive `recvcount` elements of type `recvtype` from MPI rank `source` into
344+ Complete a blocking send-receive operation over the MPI communicator `comm`. Send
345+ `sendcount` elements of type `sendtype` from `sendbuf` to the MPI rank `dest` using message
346+ tag `tag`, and receive `recvcount` elements of type `recvtype` from MPI rank `source` into
345347the buffer `recvbuf` using message tag `tag`. Return a [`Status`](@ref) object.
346348
347349If not provided, `sendtype`/`recvtype` and `sendcount`/`recvcount` are derived from the
@@ -350,7 +352,7 @@ element type and length of `sendbuf`/`recvbuf`, respectively.
350352# External links
351353$(_doc_external (" MPI_Sendrecv" ))
352354"""
353- function Sendrecv (sendbuf, sendcount:: Integer , sendtype:: Union{Datatype, MPI_Datatype} , dest:: Integer , sendtag:: Integer ,
355+ function Sendrecv! (sendbuf, sendcount:: Integer , sendtype:: Union{Datatype, MPI_Datatype} , dest:: Integer , sendtag:: Integer ,
354356 recvbuf, recvcount:: Integer , recvtype:: Union{Datatype, MPI_Datatype} , source:: Integer , recvtag:: Integer ,
355357 comm:: Comm )
356358 # int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag,
@@ -366,16 +368,16 @@ function Sendrecv(sendbuf, sendcount::Integer, sendtype::Union{Datatype, MPI_Dat
366368 return stat_ref[]
367369end
368370
369- function Sendrecv (sendbuf, sendcount:: Integer , dest:: Integer , sendtag:: Integer ,
371+ function Sendrecv! (sendbuf, sendcount:: Integer , dest:: Integer , sendtag:: Integer ,
370372 recvbuf, recvcount:: Integer , source:: Integer , recvtag:: Integer ,
371373 comm:: Comm )
372- return Sendrecv (sendbuf, sendcount, mpitype (eltype (sendbuf)), dest, sendtag,
374+ return Sendrecv! (sendbuf, sendcount, mpitype (eltype (sendbuf)), dest, sendtag,
373375 recvbuf, recvcount, mpitype (eltype (recvbuf)), source, recvtag, comm)
374376end
375- function Sendrecv (sendbuf:: AbstractArray , dest:: Integer , sendtag:: Integer ,
377+ function Sendrecv! (sendbuf:: AbstractArray , dest:: Integer , sendtag:: Integer ,
376378 recvbuf:: AbstractArray , source:: Integer , recvtag:: Integer ,
377379 comm:: Comm )
378- return Sendrecv (sendbuf, length (sendbuf), dest, sendtag,
380+ return Sendrecv! (sendbuf, length (sendbuf), dest, sendtag,
379381 recvbuf, length (recvbuf), source, recvtag, comm)
380382end
381383
0 commit comments