@@ -63,6 +63,8 @@ number of entries received.
63
63
"""
64
64
Status
65
65
66
+ Base.:(== )(a:: Status , b:: Status ) = a. source == b. source && a. tag == b. tag && a. error == b. error
67
+
66
68
Get_source (status:: Status ) = Int (status. source)
67
69
Get_tag (status:: Status ) = Int (status. tag)
68
70
Get_error (status:: Status ) = Int (status. error)
@@ -333,15 +335,15 @@ function irecv(src::Integer, tag::Integer, comm::Comm)
333
335
end
334
336
335
337
"""
336
- Sendrecv(sendbuf, [sendcount::Integer, [sendtype::Union{Datatype, MPI_Datatype}]],
338
+ Sendrecv! (sendbuf, [sendcount::Integer, [sendtype::Union{Datatype, MPI_Datatype}]],
337
339
dest::Integer, sendtag::Integer,
338
- recvbuf, [recvcount::Integer, [recvtype::Union{Datatype, MPI_Datatype}]],
340
+ recvbuf, [recvcount::Integer, [recvtype::Union{Datatype, MPI_Datatype}]],
339
341
source::Integer, recvtag::Integer,
340
342
comm::Comm)
341
343
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
345
347
the buffer `recvbuf` using message tag `tag`. Return a [`Status`](@ref) object.
346
348
347
349
If not provided, `sendtype`/`recvtype` and `sendcount`/`recvcount` are derived from the
@@ -350,7 +352,7 @@ element type and length of `sendbuf`/`recvbuf`, respectively.
350
352
# External links
351
353
$(_doc_external (" MPI_Sendrecv" ))
352
354
"""
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 ,
354
356
recvbuf, recvcount:: Integer , recvtype:: Union{Datatype, MPI_Datatype} , source:: Integer , recvtag:: Integer ,
355
357
comm:: Comm )
356
358
# 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
366
368
return stat_ref[]
367
369
end
368
370
369
- function Sendrecv (sendbuf, sendcount:: Integer , dest:: Integer , sendtag:: Integer ,
371
+ function Sendrecv! (sendbuf, sendcount:: Integer , dest:: Integer , sendtag:: Integer ,
370
372
recvbuf, recvcount:: Integer , source:: Integer , recvtag:: Integer ,
371
373
comm:: Comm )
372
- return Sendrecv (sendbuf, sendcount, mpitype (eltype (sendbuf)), dest, sendtag,
374
+ return Sendrecv! (sendbuf, sendcount, mpitype (eltype (sendbuf)), dest, sendtag,
373
375
recvbuf, recvcount, mpitype (eltype (recvbuf)), source, recvtag, comm)
374
376
end
375
- function Sendrecv (sendbuf:: AbstractArray , dest:: Integer , sendtag:: Integer ,
377
+ function Sendrecv! (sendbuf:: AbstractArray , dest:: Integer , sendtag:: Integer ,
376
378
recvbuf:: AbstractArray , source:: Integer , recvtag:: Integer ,
377
379
comm:: Comm )
378
- return Sendrecv (sendbuf, length (sendbuf), dest, sendtag,
380
+ return Sendrecv! (sendbuf, length (sendbuf), dest, sendtag,
379
381
recvbuf, length (recvbuf), source, recvtag, comm)
380
382
end
381
383
0 commit comments