Skip to content

Commit 9c3e2cd

Browse files
committed
Added test to previous fix
1 parent 3317dcb commit 9c3e2cd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
module MPIArrayTests
22

33
using PartitionedArrays
4+
using Test
45

56
with_mpi() do distribute
67
rank = distribute(LinearIndices((4,)))
78
display(rank)
89
rank = distribute(LinearIndices((2,2)))
910
display(rank)
11+
12+
n = 4
13+
row_partition = uniform_partition(rank,n)
14+
my_own_to_global = map(own_to_global,row_partition)
15+
ids = gather(my_own_to_global)
16+
map_main(ids) do myids
17+
@test myids == [[1],[2],[3],[4]]
18+
end
19+
ids = gather(my_own_to_global,destination=:all)
20+
map(ids) do myids
21+
@test myids == [[1],[2],[3],[4]]
22+
end
23+
1024
end
1125

1226
end # module

0 commit comments

Comments
 (0)