Next: The Buffer
Up: Sending and Receiving messages
Previous: Sending and Receiving messages
Message = data + envelope
- MPI Data; Arguments
- startbuf (starting location of data)
- count (number of elements)
- receive count
send count
- datatype (basic or derived)
- receiver datatype = send datatype (unless MPI_PACKED)
- elementary (all C and FORTRAN types)
- derived datatype
- mixed datatypes
- contiguous arrays of datatypes
- strided blocks of datatypes
- indexed array of blocks of datatypes
- general structure
- Specifications of elementary datatypes allows heterogeneous communication.
- MPI basic datatypes for C:
Figure 3:
MPI basic datatypes for C.
|
- MPI Envelope; Arguments
- destination or source
- rank in a communicator
- receive = sender or MPI_ANY_SOURCE
- tag
- integer chosen by programmer
- receive = sender or MPI_ANY_TAG (wild cards allowed)
- communicator
- defines communication "space"
- group + context
- receive = send
- Collective operations typically operated on all processes.
- MPI provides groups of processes
- initial "all" group.
- group management routines (build, delete groups).
- All communication (not just collective operations) takes place in groups.
- A context partitions the communication space
- A message sent in one context cannot be received in another context.
- Contexts are managed by the system.
- A group and a context are combined in a communicator.
- Source/destination in send/receive operations refer to rank in group associated with a given communicator.
All of these specifications are a good match to hardware, easy to understand, but too inflexible.
Next: The Buffer
Up: Sending and Receiving messages
Previous: Sending and Receiving messages
Cem Ozdogan
2006-10-13