next up previous

8 Message Passing Library (MPL)     continued...

The basic blocking send and receive operations are:
If you are using FORTRAN:

     mp_bsend(msg_buffer, msglength, destination, tag)
     mp_brecv(msg_buffer, max_length, source, tag, rec_length)
OR, if you are using C:
     mpc_bsend(&msg_buffer, msglength, destination, tag)
     mpc_brecv(&msg_buffer, max_length, source, tag, rec_length)
where
msg_buffer - memory buffer containing the data to be sent or received. (in FORTRAN, this is simply the name of the buffer; in C, it is the buffer's corresponding address.)

msglength - message length (in bytes)

max_length - expected length of receive buffer

rec_length - number of bytes actually received

destination - process id number of the process, or task, to which the message is being sent

source - process, or task, id number of the source from which you want to receive a message

tag - user-defined non-negative integer used to identify the messages transfered (perhaps you want one process to receive only messages tagged with 12 at some point in the program execution).