@@ -589,6 +589,27 @@ function Gather{T}(object::T, root::Integer, comm::Comm)
589589 isroot ? recvbuf : nothing
590590end
591591
592+ function Igather {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
593+ root:: Integer , comm:: Comm )
594+ isroot = Comm_rank (comm) == root
595+ recvbuf = Array (T, isroot ? Comm_size (comm) * count : 0 )
596+ rval = Ref {Cint} ()
597+ ccall (MPI_IGATHER, Void,
598+ (Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
599+ sendbuf, & count, & mpitype (T), recvbuf, & count, & mpitype (T), & root, & comm. val, rval, & 0 )
600+ Request (rval[], sendbuf), isroot ? recvbuf : nothing
601+ end
602+
603+ function Igather {T} (sendbuf:: Array{T} , root:: Integer , comm:: Comm )
604+ Igather (sendbuf, length (sendbuf), root, comm)
605+ end
606+
607+ function Igather {T} (object:: T , root:: Integer , comm:: Comm )
608+ isroot = Comm_rank (comm) == root
609+ sendbuf = T[object]
610+ Igather (sendbuf, root, comm)
611+ end
612+
592613function Allgather {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
593614 comm:: Comm )
594615 recvbuf = Array (T, Comm_size (comm) * count)
@@ -608,6 +629,25 @@ function Allgather{T}(object::T, comm::Comm)
608629 recvbuf
609630end
610631
632+ function Iallgather {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
633+ comm:: Comm )
634+ rval = Ref {Cint} ()
635+ recvbuf = Array (T, Comm_size (comm) * count)
636+ ccall (MPI_IALLGATHER, Void,
637+ (Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
638+ sendbuf, & count, & mpitype (T), recvbuf, & count, & mpitype (T), & comm. val, rval, & 0 )
639+ Request (rval[], sendbuf), recvbuf
640+ end
641+
642+ function Iallgather {T} (sendbuf:: Array{T} , comm:: Comm )
643+ Iallgather (sendbuf, length (sendbuf), comm)
644+ end
645+
646+ function Iallgather {T} (object:: T , comm:: Comm )
647+ sendbuf = T[object]
648+ Iallgather (sendbuf, comm)
649+ end
650+
611651function Gatherv {T} (sendbuf:: MPIBuffertype{T} , counts:: Vector{Cint} ,
612652 root:: Integer , comm:: Comm )
613653 isroot = Comm_rank (comm) == root
@@ -620,6 +660,19 @@ function Gatherv{T}(sendbuf::MPIBuffertype{T}, counts::Vector{Cint},
620660 isroot ? recvbuf : nothing
621661end
622662
663+ function Igatherv {T} (sendbuf:: MPIBuffertype{T} , counts:: Vector{Cint} ,
664+ root:: Integer , comm:: Comm )
665+ isroot = Comm_rank (comm) == root
666+ rval = Ref {Cint} ()
667+ displs = cumsum (counts) - counts
668+ sendcnt = counts[Comm_rank (comm) + 1 ]
669+ recvbuf = Array (T, isroot ? sum (counts) : 0 )
670+ ccall (MPI_IGATHERV, Void,
671+ (Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
672+ sendbuf, & sendcnt, & mpitype (T), recvbuf, counts, displs, & mpitype (T), & root, & comm. val, rval, & 0 )
673+ Request (rval[], sendbuf), isroot ? recvbuf : nothing
674+ end
675+
623676function Allgatherv {T} (sendbuf:: MPIBuffertype{T} , counts:: Vector{Cint} ,
624677 comm:: Comm )
625678 displs = cumsum (counts) - counts
@@ -631,6 +684,18 @@ function Allgatherv{T}(sendbuf::MPIBuffertype{T}, counts::Vector{Cint},
631684 recvbuf
632685end
633686
687+ function Iallgatherv {T} (sendbuf:: MPIBuffertype{T} , counts:: Vector{Cint} ,
688+ comm:: Comm )
689+ rval = Ref {Cint} ()
690+ displs = cumsum (counts) - counts
691+ sendcnt = counts[Comm_rank (comm) + 1 ]
692+ recvbuf = Array (T, sum (counts))
693+ ccall (MPI_IALLGATHERV, Void,
694+ (Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
695+ sendbuf, & sendcnt, & mpitype (T), recvbuf, counts, displs, & mpitype (T), & comm. val, rval, & 0 )
696+ Request (rval[], sendbuf), recvbuf
697+ end
698+
634699function Alltoall {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
635700 comm:: Comm )
636701 recvbuf = Array (T, Comm_size (comm)* count)
0 commit comments