Point-to-Point Communication
[End-User Documentation]

Collaboration diagram for Point-to-Point Communication:

Detailed Description

Sending and receiving of messages by processes is the basic MPI communication mechanism.

The basic point-to-point communication operations are send and receive.

MOC_Send uses either buffered or synchronous send depending on the message-size (Short messages are transmitted using buffered send and long messages are transmitted using synchronous send).

MOC_Recv receives all messages irrespective wether buffered or synchronous communication is used.

Note:
Because there are separate message-queues for each remote process and no distinct global ordering of messages, there may be some situation where a message from a process may never be received. This may occur when MOC_Recv, MOC_Probe and MOC_IProbe are used with MOC_ANY_SOURCE, because then there is the possibility that new messages are received before a specific message from a process with a higher rank than the other senders. This may also occur with lower possibility when using MOC_ANY_TAG between messages from the same sender but with other tags.


Modules

 Return Status
 Receiving operations return a status-object holding information about the message.
 Datatypes
 Datatypes supported by MOC.
 Synchronous Communication
 Direct blocking sending of messages without any intermediate buffer.
 Buffered Communication
 Blocking sending of messages with the use of an intermediate buffer.
 Send-Receive
 The send-receive operations combine in one call the sending of a message to one destination and the receiving of another message, from another process.
 Non-Blocking Communication
 Non-blocking sending and receiving messages.

Defines

#define MOC_SEND_TRESHOLD   4096
 Indicates, at which message-size MOC_Send switches to synchronous send.

Functions

int MOC_Send (void *buf, int count, MOC_Datatype datatype, int dest, int tag, MOC_Comm comm)
 Performs a blocking standard mode send operation.
int MOC_Recv (void *buf, int count, MOC_Datatype datatype, int source, int tag, MOC_Comm comm, MOC_Status *status)
 Performs a blocking standard mode receive operation.
int MOC_Probe (int source, int tag, MOC_Comm comm, MOC_Status *status)
 Waits till a message is received and returns information without actually receiving the message.
int MOC_Iprobe (int source, int tag, MOC_Comm comm, int *flag, MOC_Status *status)
 Tests if a message is available and returns information without actually receiving the message.


Define Documentation

#define MOC_SEND_TRESHOLD   4096

Indicates, at which message-size MOC_Send switches to synchronous send.

Definition at line 374 of file moc.h.

Referenced by MOC_ISend(), and MOC_Send().


Function Documentation

int MOC_Iprobe ( int  source,
int  tag,
MOC_Comm  comm,
int *  flag,
MOC_Status *  status 
)

Tests if a message is available and returns information without actually receiving the message.

Parameters:
source in source of message
tag in message-tag
comm in communicator
flag out boolean value telling if a message is available
status out status-object holding information about message
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

Definition at line 5 of file moc_iprobe.c.

References moc_message_envelope_struct::id, IMOC_get_entry(), MOC_Status_struct::message_size, MOC_Status_struct::mid, MOC_Status_struct::MOC_ERROR, MOC_Status_struct::MOC_SOURCE, MOC_Status_struct::MOC_TAG, moc_message_envelope_struct::size, and moc_message_envelope_struct::tag.

Here is the call graph for this function:

int MOC_Probe ( int  source,
int  tag,
MOC_Comm  comm,
MOC_Status *  status 
)

Waits till a message is received and returns information without actually receiving the message.

Parameters:
source in source of message
tag in message-tag
comm in communicator
status out status-object holding information about message
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

Definition at line 4 of file moc_probe.c.

References moc_message_envelope_struct::id, IMOC_get_entry(), MOC_Status_struct::message_size, MOC_Status_struct::mid, MOC_Status_struct::MOC_ERROR, MOC_Status_struct::MOC_SOURCE, MOC_Status_struct::MOC_TAG, moc_message_envelope_struct::size, and moc_message_envelope_struct::tag.

Here is the call graph for this function:

int MOC_Recv ( void *  buf,
int  count,
MOC_Datatype  datatype,
int  source,
int  tag,
MOC_Comm  comm,
MOC_Status *  status 
)

Performs a blocking standard mode receive operation.

Note:
This routine blocks until the message is received.
Parameters:
buf inout Buffer into which data should be stored
count in Number of elements in receive buffer (not equal to actual byte-value)
datatype in Datatype of each receive buffer element
source in Rank of source
tag in Tag of message
comm in Communicator of message
status inout Object holding status-information (has to be allocated by user)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

Definition at line 11 of file moc_recv_ppu.c.

References __attribute__(), moc_message_envelope_struct::bits, moc_message_envelope_struct::datatype, moc_message_envelope_struct::flags, moc_message_envelope_struct::id, IMOC_EA_REMOTE_STATUS_ENTRY, IMOC_get_data(), IMOC_get_entry(), IMOC_MESSAGE_CHANNEL_DMA, IMOC_MESSAGE_CHANNEL_ENV, IMOC_TEST_ALIGNMENT, IMOC_TEST_BUFFER, IMOC_TEST_BYTECOUNT, IMOC_TEST_COMM_RECV, IMOC_TEST_PROC_NULL, IMOC_TEST_PROC_SELF, IMOC_TEST_RANK_RECV, IMOC_TEST_TAG_RECV, moc_spu_thread_struct::ls_base, moc_message_envelope_struct::message_address, MOC_Status_struct::message_size, MOC_Status_struct::mid, MOC_BYTE, MOC_ERR_INTERN, MOC_ERR_TYPE, MOC_Status_struct::MOC_ERROR, moc_ppu_thread_count, MOC_Status_struct::MOC_SOURCE, moc_spu_thread_list, MOC_Status_struct::MOC_TAG, moc_message_envelope_struct::size, and moc_message_envelope_struct::value.

Referenced by MOC_Bcast(), MOC_Sendrecv(), and MOC_Sendrecv_replace().

Here is the call graph for this function:

Here is the caller graph for this function:

int MOC_Send ( void *  buf,
int  count,
MOC_Datatype  datatype,
int  dest,
int  tag,
MOC_Comm  comm 
)

Performs a blocking standard mode send operation.

Note:
This routine may block until the message is received.
Parameters:
buf in Pointer to buffer where data is stored
count in Number of elements to be send (not equal to actual byte-value)
datatype in Type of elements to be send
dest in Rank of receiving process
tag in Tag of message
comm in communicator of message
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

Definition at line 19 of file moc_send.c.

References MOC_Bsend(), MOC_SEND_TRESHOLD, and MOC_Ssend().

Referenced by MOC_Sendrecv(), and MOC_Sendrecv_replace().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Thu Feb 12 13:50:48 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6