Skip to content

Commit d828683

Browse files
committed
Add tests for serialized isend/irecv
1 parent 5d24cc9 commit d828683

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test_sendrecv.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,18 @@ rreq = nothing
106106
sreq = nothing
107107
gc()
108108

109+
root = 0
110+
g = x -> x^2 + 2x - 1
111+
if MPI.Comm_rank(comm) == root + 1
112+
done, f, stat = MPI.irecv( root, root+32, comm )
113+
if done
114+
@test f(3) == g(3)
115+
@test f(5) == g(5)
116+
@test f(7) == g(7)
117+
end
118+
elseif MPI.Comm_rank(comm) == root
119+
f = g
120+
sreq = MPI.isend(f, dst, rank+32, comm)
121+
end
122+
109123
MPI.Finalize()

0 commit comments

Comments
 (0)