Home

Allgatherv

Allgatherv, commonly written MPI_Allgatherv, is a collective communication operation in the Message Passing Interface (MPI). It gathers data from all processes in a communicator and distributes the concatenated result to all processes, allowing each process to contribute and receive a different amount of data.

The operation takes the following parameters: sendbuf, sendcount, and sendtype specify the local data to send

Each process contributes sendcount elements of type sendtype from sendbuf (or may use MPI_IN_PLACE to indicate

Allgatherv is a collective operation; all processes in the communicator must participate. It is commonly used

from
each
process;
recvbuf,
recvcounts,
displs,
and
recvtype
describe
how
much
data
each
process
will
receive
and
where
it
will
be
placed
in
the
receive
buffer
on
every
process;
comm
is
the
communicator
containing
the
participating
processes.
recvcounts
is
an
array
of
length
equal
to
the
number
of
processes,
where
recvcounts[i]
is
the
number
of
elements
to
receive
from
process
i;
displs
is
an
array
of
the
same
length
specifying
the
starting
offset
in
recvbuf
for
the
data
from
process
i.
The
total
size
of
the
receive
buffer
must
be
the
sum
of
all
recvcounts.
that
the
input
data
is
already
present
in
the
receive
buffer).
After
the
call,
every
process
owns
the
complete
concatenation
of
data
from
all
processes,
with
blocks
placed
at
positions
defined
by
displs
and
sized
by
recvcounts.
The
operation
differs
from
MPI_Allgather
in
that
Allgatherv
allows
varying
receive
counts
from
different
processes.
in
parallel
algorithms
where
process
data
sizes
differ
and
a
uniform
Allgather
would
be
inefficient
or
impossible.