Noncontiguous and Heterogeneous


Up: Contents Next: Message queue management Previous: Implementation sketch

The simplest implementation for the noncontiguous and the heterogeneous cases is to simply to copy the message into and out of a temporary buffer. A refinment of this delays the allocation of the buffer until it is needed. For example, in a rendezvous send, the allocation of the buffer need not happen until the ``ok to send'' message is received. This is easily handled by modifying the routines in the send request that are called when the ``ok to send'' is received. The same can be done on the receive side.

To simplify the handling of heterogeneous systems, the implementation includes a msgrep field, which is a (very small) integer that may be sent between heterogeneous processors. Completely homogeneous systems can ignore this (through the use of macros, they could even eliminate the argument).

The finish function may be used to handle any local operations once the message is sent/received. For example, in a simple implementation of heterogeneous/non-contiguous nonblocking receive, a contiguous buffer is allocated and passed to MPID_IrecvContig to start the receive; once the receive completes, the finish function can be called to unpack the data and to free the temporary buffer.



Up: Contents Next: Message queue management Previous: Implementation sketch