In the spirit of malloc(), the user must call a function to allocate an outgoing message. At the time of allocation, the user must declare not only the size of the message but its destination and tag. The user may then store data in this memory area, and notify the library when it is ready to be sent. After sending the message, the user is not longer permitted to access the message buffer (Figure 1).
In Fortran, there is no way to access a message buffer allocated by the library, so it is not possible to have separate calls for message allocation and sending. Fortran is provided with a single routine AP_BSEND() to perform the allocation, copy the data from a Fortran variable to the message buffer, and send the message (Figure 2).