Main Page Modules Data Structures File List Data Fields Globals Related Pages
VIII. Sending Messages
In GM, message sends are regulated by a simple token-passing mechanism to prevent GM's bounded-size internal queues from overflowing. The client software must possess a send token before calling gm_send_with_callback(). After initialization, the client software implicitly possesses all gm_num_send_tokens() send tokens, and implicitly passes one token to the GM library with each call to gm_send_with_callback() or gm_send_to_peer_with_callback(). The token is retained by GM until the send completes, at which time GM calls the client-supplied callback, implicitly returning the send token to the client. The contents of the send message should not be modified in the interval between the call to gm_send_with_callback() and the send completion, because doing so will cause undefined data to be delivered to the receiver.
The order of messages with different priorities or with different destination ports is not preserved. Only the order of messages with the same priority and to the same destination port is preserved.
In the special case that the TARGET_PORT_ID is the same as the sending port ID (as is often the case), the streamlined gm_send_to_peer_with_callback() function may be used instead of gm_send_with_callback(), allowing the TARGET_PORT_ID parameter to be omitted, and slightly improving small-message performance on 32-bit Myrinet interfaces.
The send completion status codes (listed in gm.h) are as follows:
- GM_SUCCESS The send succeeded. This status code does not indicate an error.
- GM_FAILURE Operation failed.
- GM_INPUT_BUFFER_TOO_SMALL Input buffer is too small.
- GM_OUTPUT_BUFFER_TOO_SMALL Output buffer is too small.
- GM_MEMORY_FAULT Memory Fault.
- GM_INTERRUPTED Interrupted.
- GM_INVALID_PARAMETER Invalid input parameter.
- GM_OUT_OF_MEMORY Out of Memory.
- GM_INVALID_COMMAND Invalid Command.
- GM_PERMISSION_DENIED Permission Denied.
- GM_INTERNAL_ERROR Internal Error.
- GM_UNATTACHED Unattached.
- GM_UNSUPPORTED_DEVICE Unsupported Device.
- GM_SEND_TIMED_OUT The target port is open and responsive and the message is of an acceptable size, but the receiver failed to provide a matching receive buffer within the timeout period. This error can be caused by the receive neglecting its responsibility to provide receive buffers in a timely fashion or crashing. It can also be caused by severe congestion at the receiving node where many senders are contending for the same receive buffers on the target port for an extended period. This error indicates a programming error in the client software.
- GM_SEND_REJECTED The receiver indicated (in a call to gm_set_acceptable_sizes()) the size of the message was unacceptable. This error indicates a programming error in the client software.
- GM_SEND_TARGET_PORT_CLOSED The message cannot be delivered because the destination port has been closed.
- GM_SEND_TARGET_NODE_UNREACHABLE The target node could not be reached over the Myrinet. This error can be caused by the network becoming disconnected for too long, the remote node being powered off, or by network links being rearranged when the Myrinet mapper is not running.
- GM_SEND_DROPPED The send was dropped at the client's request. (The client called gm_drop_sends().) This status code does not indicate an error.
- GM_SEND_PORT_CLOSED Clients should never see this internal error code.
- GM_NODE_ID_NOT_YET_SET Node ID is not yet set.
- GM_STILL_SHUTTING_DOWN GM Port is still shutting down.
- GM_CLONE_BUSY GM Clone Busy.
- GM_NO_SUCH_DEVICE No such device.
- GM_INCOMPATIBLE_LIB_AND_DRIVER Incompatible GM library and driver.
- GM_UNTRANSLATED_SYSTEM_ERROR Untranslated System Error.
- GM_ACCESS_DENIED Access Denied.
- GM_NO_DRIVER_SUPPORT No Driver Support.
- GM_PTE_REF_CNT_OVERFLOW PTE Ref Cnt Overflow.
- GM_NOT_SUPPORTED_IN_KERNEL Not supported in the kernel.
- GM_NOT_SUPPORTED_ON_ARCH Not supported for this architecture.
- GM_USER_ERROR User error.
- GM_DATA_CORRUPTED Data has been corrupted.
- GM_HARDWARE_FAULT Hardware fault.
- GM_SEND_ORPHANED Send orphaned.
- GM_MINOR_OVERFLOW Minor overflow.
- GM_PAGE_TABLE_FULL Page Table is Full.
- GM_INVALID_PORT_NUMBER Invalid Port Number.
Generated on Mon Nov 3 15:39:27 2003 for GM by
1.2.15