Skip to content

Commit 1c58739

Browse files
committed
Added test for user op in MPI.Reduce
1 parent d90187c commit 1c58739

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test_reduce.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ val = rank == root ? size-1 : nothing
1818
val = rank == root ? 0 : nothing
1919
@test MPI.Reduce(rank, MPI.MIN, root, comm) == val
2020

21+
val = rank == root ? size : nothing
22+
@test MPI.Reduce(1, +, root, comm) == val
23+
2124
mesg = collect(1.0:5.0)
2225
sum_mesg = MPI.Reduce(mesg, MPI.SUM, root, comm)
2326
sum_mesg = rank == root ? sum_mesg : size*mesg

0 commit comments

Comments
 (0)