Skip to content

Commit 1666288

Browse files
authored
Fix one-argument in-place Alltoall! (#465)
1 parent bd55b74 commit 1666288

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/collective.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ end
453453
Alltoall!(sendbuf::InPlace, recvbuf::UBuffer, comm::Comm) =
454454
Alltoall!(UBuffer(IN_PLACE), recvbuf, comm)
455455
Alltoall!(sendrecvbuf::UBuffer, comm::Comm) =
456-
Alltoall!(IN_PLACE, recvbuf, comm)
456+
Alltoall!(IN_PLACE, sendrecvbuf, comm)
457457

458458
"""
459459
Alltoall(sendbuf::UBuffer, comm::Comm)

test/test_alltoall.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ for T in Base.uniontypes(MPI.MPIDatatype)
3232
a = ArrayType{T}(fill(T(rank),size))
3333
MPI.Alltoall!(MPI.IN_PLACE, UBuffer(a,1), comm)
3434
@test a == ArrayType{T}(0:size-1)
35+
36+
# One-argument IN_PLACE version
37+
a = ArrayType{T}(fill(T(rank),size))
38+
MPI.Alltoall!(UBuffer(a,1), comm)
39+
@test a == ArrayType{T}(0:size-1)
3540
end
3641

3742
MPI.Finalize()

0 commit comments

Comments
 (0)