Skip to content

Commit 44a9dc7

Browse files
committed
fix openmpi status struct
1 parent 7a18cd8 commit 44a9dc7

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/consts/openmpi.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ struct MPI_Status
2626
MPI_TAG::Cint
2727
MPI_ERROR::Cint
2828
_private0::Cint
29-
_private1::Cint
30-
_private2::Cint
29+
_private1::Csize_t
3130
end
3231

3332
# Opaque handles:

src/nonblocking.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ number of entries received.
1414
"""
1515
const Status = MPI_Status
1616

17-
@eval const STATUS_ZERO = Status($([Cint(0) for i in 1:sizeof(Status) ÷ sizeof(Cint)]...))
17+
const STATUS_ZERO = Status(map(zero,fieldtypes(Status))...)
1818

1919
function Base.getproperty(status::Status, name::Symbol)
2020
name :error && return status.MPI_ERROR

test/test_sendrecv.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ rreq = MPI.Irecv!(recv_mesg, comm; source=src, tag=src+32)
3030
sreq = MPI.Isend(send_mesg, comm; dest=dst, tag=rank+32)
3131

3232
stats = MPI.Waitall([sreq, rreq], MPI.Status)
33-
@show stats[2]
3433
@test rreq isa MPI.Request
3534
@test sreq isa MPI.Request
3635
@test MPI.Get_source(stats[2]) == src

0 commit comments

Comments
 (0)