Files | |
file | pm.h |
char * | pmxErrorString (int error) |
int | pmxGetAttribute (pmContext *pmc, pmAttribute *attrp) |
int | pmxOpen (pm_key_t key, pm_flags_t flags, pmContext **pmcp, int *fdp) |
int | pmxIsReady (pmContext *pmc) |
int | pmxReset (pmContext *pmc) |
int | pmxInitialize (pmContext *pmc) |
int | pmxStart (pmContext *pmc) |
int | pmxGetMtu (pmContext *pmc, pm_node_t nodeno, pm_size_t *tsmtup, pm_size_t *osmtup) |
int | pmxNotCommunicating (pmContext *pmc) |
int | pmxStop (pmContext *pmc) |
int | pmxClose (pmContext *pmc) |
void | pmxDescribeRouting (pmContext *pmc, FILE *fp) |
void | pmxDump (pmContext *pmc, FILE *fp) |
int | pmxReceive (pmContext *pmc, void **bufp, pm_size_t *sizep, pm_desc_t *descp) |
int | pmxReleaseReceiveBuffer (pmContext *pmc, pm_desc_t desc) |
int | pmxGetSendBuffer (pmContext *pmc, pm_node_t nodeno, void **bufp, pm_size_t len, pm_desc_t *descp) |
int | pmxSend (pmContext *pmc, pm_desc_t desc) |
int | pmxTruncateBuffer (pmContext *pmc, pm_desc_t desc, pm_size_t len) |
int | pmxKeepSendDesc (pmContext *pmc, pm_desc_t desc) |
int | pmxGetSendDescInfo (pmContext *pmc, pm_desc_t desc, pmSendDescInfo *infop) |
int | pmxReleaseSendDesc (pmContext *pmc, pm_desc_t desc) |
int | pmxIsSendDone (pmContext *pmc, pm_desc_t desc) |
int | pmxBeforeSelect (pmContext *pmc, fd_set *fdsp, int *fdmaxp, sigset_t *maskp) |
int | pmxAfterSelect (pmContext *pmc) |
int | pmxBreak (pmContext *pmc) |
int | pmxWaive (pmContext *pmc) |
int | pmxContinue (pmContext *pmc) |
int | pmxExport (pmContext *pmc, void *addr, pm_size_t len, pm_node_t dst, pmAddrHandle *hndlp) |
int | pmxUnexport (pmContext *pmc, pmAddrHandle *hndlp) |
int | pmxWrite (pmContext *pmc, pmAddrHandle *locp, pm_off_t loff, pmAddrHandle *remp, pm_off_t roff, pm_size_t length, pm_desc_t *descp) |
int | pmxIsWriteDone (pmContext *pmc, pm_desc_t desc) |
int | pmxRead (pmContext *pmc, pmAddrHandle *remp, pm_off_t roff, pmAddrHandle *locp, pm_off_t loff, pm_size_t length, pm_desc_t *descp) |
int | pmxIsReadDone (pmContext *pmc, pm_desc_t desc) |
int | pmxSave (pmContext *pmc, void **savep) |
int | pmxReopen (pmContext *pmc, void *save) |
int | pmxAddMember (pmContext *pmc, const char *netname) |
PMX is a high-performance communication library supporting multiple networks, such as Myrinet(TM), Infiniband, Ethernet, shared-memory, and any combination of those networks. PMX is also designed so that checkpoint/restart and gang-scheduling can be implemented with.
int pmxAddMember | ( | pmContext * | pmc, | |
const char * | netname | |||
) |
The pmxAddMember() function adds member device to PMX context.
[in] | pmc | PMX context |
[in] | netname | network name defined in the scorehosts.db(5) file. |
ENOENT | No such PMX device having the name of netname |
int pmxAfterSelect | ( | pmContext * | pmc | ) |
This function must be called after calling (p)select() system call for blocking message receive. The (p)select() system call should be wrapped with the pair of calling pmxBeforeSelect() and pmxAfterSelect() functions.
[in] | pmc | PMX context |
int pmxBeforeSelect | ( | pmContext * | pmc, | |
fd_set * | fdsp, | |||
int * | fdmaxp, | |||
sigset_t * | maskp | |||
) |
This function must be called before calling the (p)select() system call for blocking message receive. The (p)select() system call should be wrapped with the pair of calling pmxBeforeSelect() and pmxAfterSelect() functions.
[in] | pmc | PMX context |
[in,out] | fdsp | Pointer to the fdset to be passed to the (p)select() system call |
[in,out] | fdmaxp | Pointer to the max number of file descriptor in the fdset |
[in,out] | maskp | Pointer ot the signal mask to be passed to the pselect system call |
EPERM | At least one member context have the capability of blocking receive. | |
others | An error number returning from member context. |
int pmxClose | ( | pmContext * | pmc | ) |
The pmxClose() function finalizes the endpoint function of the context and then frees all allocated resources.
[in] | pmc | PMX context |
void pmxDump | ( | pmContext * | pmc, | |
FILE * | fp | |||
) |
The pmxDump() function dumps the content of PMX context in a human-readable format for debugging.
[in] | pmc | PMX context |
[in] | fp | pointer to a valid FILE stream |
int pmxGetAttribute | ( | pmContext * | pmc, | |
pmAttribute * | attrp | |||
) |
The pmxGetAttribute() function is to obtain attributes of PMX context.
[in] | pmc | PMX context |
[out] | attrp | Pointer to pmAttribute structure |
EINVAL | pmc is NULL or attrp is NULL |
int pmxGetSendBuffer | ( | pmContext * | pmc, | |
pm_node_t | nodeno, | |||
void ** | bufp, | |||
pm_size_t | len, | |||
pm_desc_t * | descp | |||
) |
The pmxGetSendBuffer() function is to allocate a buffer for message sending. When the message to be sent is ready to send, call the pmxSend() function. The function calls of pmxGetSendBuffer() and pmxSend() must be paired always.
[in] | pmc | PMX context |
[in] | nodeno | Destination node |
[out] | bufp | Handle to the allocated send buffer |
[in] | len | Length of sending message |
[out] | descp | Pointer to a PMX send descriptor |
ENOBUFS | no buffer is available | |
EBUSY | no resource is available temporarily | |
ERANGE | nodeno is out of range | |
EMSGSIZE | message length is larger than MTU | |
EPERM | try to send itself | |
EINVAL | buffer handle is NULL or message length is zero |
int pmxGetSendDescInfo | ( | pmContext * | pmc, | |
pm_desc_t | desc, | |||
pmSendDescInfo * | infop | |||
) |
The pmxGetSendDescInfo() function is to obtain the status and send descriptor. The descriptor information is stored into the pmSendDescInfo structure.
[in] | pmx | PMX ocntext |
[in] | desc | PMX send descriptor |
[out] | infop | pointer to the pmSendDescInfo structure |
EINVAL | desc does not look like a right PMX send descriptor |
int pmxIsReady | ( | pmContext * | pmc | ) |
The pmxIsReady() function succeeds when there are enough member PMX devices are added by calling the pmxAddMember() function and the context can communicate with every other node except self node.
[in] | pmc | PMX context |
EBUSY | Not yet to have enough member devices. |
int pmxIsSendDone | ( | pmContext * | pmc, | |
pm_desc_t | desc | |||
) |
The pmxIsSendDone() function succeeds when the sent message arrives at the destination node. Otherwise it returns EBUSY. When the send descriptor is PMX_DESC_ANY, then the pmxIsSendDone() function succeeds when all of the sent messages arrives.
[in] | pmc | PMX context |
[in] | desc | PMX send descriptor |
EINVAL | desc does not look like a right PMX send descriptor |
int pmxKeepSendDesc | ( | pmContext * | pmc, | |
pm_desc_t | desc | |||
) |
The pmxKeedSendDesc() function is not to discard the send descriptor after calling the pmxSend() function. The send message buffer allocated by calling the pmxGetSendBuffer() function is also accessible after calling the pmxSend() function, untile the descriptor is freed by calling the pmxReleaseSendDesc() function.
[in] | pmc | PMX context |
[in] | desc | PMX send descriptor |
EINVAL | desc does not look like a right PMX send descriptor |
int pmxNotCommunicating | ( | pmContext * | pmc | ) |
The pmxNotCommunicating() function succeeds when there is NO outstanding messages to send nor receive.
[in] | pmc | PMX context |
EBUSY | one or more outstanding messages exist |
int pmxReceive | ( | pmContext * | pmc, | |
void ** | bufp, | |||
pm_size_t * | sizep, | |||
pm_desc_t * | descp | |||
) |
The pmxReceive() function tries to receive a message. When a received message is available then the pmxReceive() function returns the pointer to the message, size of the message and receive descriptor of the receive message. The received message should be freed by calling the pmxReleaseReceiveBuffer() function.
[in] | pmc | PMX context |
[out] | bufp | pointer to a received message |
[out] | sizep | pointer to the size of received message to be stored |
[out] | descp | pointer to a PMX receive descriptor |
ENOBUFS | no received message is available | |
EBUSY | no resource is available temporarily | |
EINVAL | handle is NULL |
int pmxReleaseReceiveBuffer | ( | pmContext * | pmc, | |
pm_desc_t | desc | |||
) |
The pmxReleaseReceiveBuffer() released the buffer region of a received message. The received message region should not be accessed after calling this function. Ifhen the value of the receive descriptor is PMX_DESC_ANY, then all received messages are freed.
[in] | pmc | PMX context |
[in] | desc | PMX receive descriptor |
EINVAL | handle is NULL | |
EINVAL | desc does not look like a right PMX receive descriptor |
int pmxReleaseSendDesc | ( | pmContext * | pmc, | |
pm_desc_t | desc | |||
) |
The pmxReleaseSendDesc() function is to free the send descriptor kept by calling the pmxKeepSendDesc() function.
[in] | pmc | PMX context |
[in] | desc | PMX send descriptor |
EINVAL | desc does not look like a right PMX send descriptor |
int pmxSave | ( | pmContext * | pmc, | |
void ** | savep | |||
) |
The pmxSave() function allocates a memory region and saves the internal information to the allocated region, so that the calling process can have a checkpoint.
[in] | pmc | PMX context |
[out] | savep | allocated memory region for save |
ENOMEM | Not enough memory to allcoate the save region |
int pmxSend | ( | pmContext * | pmc, | |
pm_desc_t | desc | |||
) |
The pmxSend() function is to send a message. If the desc is not kept by calling the pmxKeepSendDesc() function, then the send descriptor is freed and prohibited to access. When the send descriptor is the value of PMX_DESC_ANY, then all sending messages will be sent.
[in] | pmc | PMX context |
[in] | desc | PMX send descriptor |
EINVAL | desc does not look like a right PMX send descriptor |
int pmxTruncateBuffer | ( | pmContext * | pmc, | |
pm_desc_t | desc, | |||
pm_size_t | len | |||
) |
The pmxTruncateBuffrer() function is to shorten the message size specified in the argument of the pmxGetSendBuffer() function.
[in] | pmc | PMX context |
[in] | desc | PMX send descriptor |
[in] | len | length of send message to be truncated |
EINVAL | desc does not look like a right PMX send descriptor |