Home

sendcount

Sendcount is a term used in the Message Passing Interface (MPI) to denote the number of elements of a given datatype that are sent in a single communication operation. In the standard blocking send routine MPI_Send(buffer, count, datatype, dest, tag, comm), count specifies the sendcount. The datatype indicates the kind of elements in the buffer, and the actual data volume is count times the size of datatype. The concept applies to both basic and derived datatypes.

For a derived datatype, the sendcount still counts elements of that datatype, not raw bytes. Therefore, sending

On the receiving side, MPI_Recv defines a receive buffer with a capacity specified by recvcount. The operation

Practical considerations include ensuring matching datatype usage and consistent counts between sender and receiver, avoiding deadlock

an
array
of
100
elements
of
MPI_DOUBLE
uses
a
sendcount
of
100
with
datatype
MPI_DOUBLE;
the
total
bytes
equals
100
times
the
size
of
a
double.
The
same
concept
applies
to
non-contiguous
and
derived
datatypes,
where
the
effective
number
of
bytes
transmitted
depends
on
the
datatype
description.
copies
up
to
recvcount
elements
of
the
same
datatype.
The
actual
number
received
can
be
obtained
from
the
status
object
(e.g.,
via
MPI_Get_count).
If
the
incoming
message
is
larger
than
the
receive
buffer,
the
operation
may
trigger
an
error
such
as
MPI_ERR_TRUNCATE.
in
blocking
patterns,
and
choosing
appropriate
sendcount
values
for
performance.
Non-blocking
variants
and
buffered
sends
have
similar
count
semantics,
and
programmers
must
not
reuse
buffers
until
communications
complete.