⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpidu_sock.h

📁 fortran并行计算包
💻 H
📖 第 1 页 / 共 4 页
字号:
The implementation should strive to only wakeup a MPIDU_Sock_wait() that is already blocking; however, it is acceptable (althoughundesireable) for it wakeup a MPIDU_Sock_wait() that is called in the future.Module:Utility-Sock@*/int MPIDU_Sock_wakeup(MPIDU_Sock_set_t set);/*@MPIDU_Sock_read - perform an immediate readInput Parameters:+ sock - sock object from which data is to be read. buf - buffer into which the data should be placed- len - maximum number of bytes to readOutput Parameter:. num_read - number of bytes actually readReturn value: a MPI error code with a Sock extended error class+ MPI_SUCCESS - no error encountered during the read operation. MPIDU_SOCK_ERR_INIT - Sock module not initialized. MPIDU_SOCK_ERR_BAD_SOCK - invalid sock object. MPIDU_SOCK_ERR_BAD_BUF - using the buffer described by buf and len resulted in a memory fault. MPIDU_SOCK_ERR_BAD_LEN - length parameter must be greater than zero. MPIDU_SOCK_ERR_SOCK_CLOSED - the sock object was closed locally. MPIDU_SOCK_ERR_CONN_CLOSED - the connection was closed by the peer. MPIDU_SOCK_ERR_CONN_FAILED - the connection failed. MPIDU_SOCK_ERR_INPROGRESS - this operation overlapped with another like operation already in progress. MPIDU_SOCK_ERR_NOMEM - unable to allocate required memory- MPIDU_SOCK_ERR_FAIL - other error attempting to post readNotes:An immediate read may not be performed while a posted read is outstanding on the same sock.  This is considered to be anapplication error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Thread safety:MPIDU_Sock_read() may be called while another thread is attempting to perform an immediate write or post a write operation on thesame sock.  MPIDU_Sock_read() may also be called while another thread is calling or blocking in MPIDU_Sock_wait() on the same sockset to which the specified sock belongs.A immediate read may not be performed if another thread is performing an immediate read on the same sock.  This is considered to bean application error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Calling MPIDU_Sock_read() during or after the call to MPIDU_Sock_post_close() is consider an application error.  The result ofdoing so is undefined, although the implementation may choose to return MPIDU_SOCK_ERR_SOCK_CLOSED if it is able to catch theerror.  The application should coordinate the closing of a sock with the activities of other threads to ensure that one thread isnot attempting to perform an immediate read while another thread is attempting to close the sock.Module:Utility-Sock@*/int MPIDU_Sock_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len, MPIU_Size_t * num_read);/*@MPIDU_Sock_readv - perform an immediate vector readInput Parameters:+ sock - sock object from which data is to be read. iov - I/O vector describing buffers into which the data is placed- iov_n - number of elements in I/O vector (must be less than MPID_IOV_LIMIT)Output Parameter:. num_read - number of bytes actually readReturn value: a MPI error code with a Sock extended error class+ MPI_SUCCESS - no error encountered during the read operation. MPIDU_SOCK_ERR_INIT - Sock module not initialized. MPIDU_SOCK_ERR_BAD_SOCK - invalid sock object. MPIDU_SOCK_ERR_BAD_BUF - using the buffer described by iov and iov_n resulted in a memory fault. MPIDU_SOCK_ERR_BAD_LEN - iov_n parameter must be greater than zero and not greater than MPID_IOV_LIMIT. MPIDU_SOCK_ERR_SOCK_CLOSED - the sock object was closed locally. MPIDU_SOCK_ERR_CONN_CLOSED - the connection was closed by the peer. MPIDU_SOCK_ERR_CONN_FAILED - the connection failed. MPIDU_SOCK_ERR_INPROGRESS - this operation overlapped with another like operation already in progress. MPIDU_SOCK_ERR_NOMEM - unable to allocate required memory- MPIDU_SOCK_ERR_FAIL - other error attempting to post readNotes:An immediate read may not be performed while a posted read is outstanding on the same sock.  This is considered to be anapplication error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Thread safety:MPIDU_Sock_read() may be called while another thread is attempting to perform an immediate write or post a write operation on thesame sock.  MPIDU_Sock_read() may also be called while another thread is calling or blocking in MPIDU_Sock_wait() on the same sockset to which the specified sock belongs.A immediate read may not be performed if another thread is performing an immediate read on the same sock.  This is considered to bean application error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Calling MPIDU_Sock_read() during or after the call to MPIDU_Sock_post_close() is consider an application error.  The result ofdoing so is undefined, although the implementation may choose to return MPIDU_SOCK_ERR_SOCK_CLOSED if it is able to catch theerror.  The application should coordinate the closing of a sock with the activities of other threads to ensure that one thread isnot attempting to perform an immediate read while another thread is attempting to close the sock.Module:Utility-Sock@*/int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_read);/*@MPIDU_Sock_write - perform an immediate writeInput Parameters:+ sock - sock object to which data is to be written. buf - buffer containing the data to be written- len - maximum number of bytes to writtenOutput Parameter:. num_written - actual number of bytes writtenReturn value: a MPI error code with a Sock extended error class+ MPI_SUCCESS - no error encountered during the write operation. MPIDU_SOCK_ERR_INIT - Sock module not initialized. MPIDU_SOCK_ERR_BAD_SOCK - invalid sock object. MPIDU_SOCK_ERR_BAD_BUF - using the buffer described by buf and len resulted in a memory fault. MPIDU_SOCK_ERR_BAD_LEN - length parameter must be greater than zero. MPIDU_SOCK_ERR_SOCK_CLOSED - the sock object was closed locally. MPIDU_SOCK_ERR_CONN_CLOSED - the connection was closed by the peer. MPIDU_SOCK_ERR_CONN_FAILED - the connection failed. MPIDU_SOCK_ERR_INPROGRESS - this operation overlapped with another like operation already in progress. MPIDU_SOCK_ERR_NOMEM - unable to allocate required memory- MPIDU_SOCK_ERR_FAIL - other error attempting to perform the writeNotes:An immediate write may not be performed while a posted write is outstanding on the same sock.  This is considered to be anapplication error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Thread safety:MPIDU_Sock_write() may be called while another thread is attempting to perform an immediate read or post a read operation on thesame sock.  MPIDU_Sock_write() may also be called while another thread is calling or blocking in MPIDU_Sock_wait() on the same sockset to which the specified sock belongs.A immediate write may not be performed if another thread is performing an immediate write on the same sock.  This is considered tobe an application error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Calling MPIDU_Sock_write() during or after the call to MPIDU_Sock_post_close() is consider to be an application error.  The resultof doing so is undefined, although the implementation may choose to return MPIDU_SOCK_ERR_SOCK_CLOSED if it is able to catch theerror.  The application should coordinate the closing of a sock with the activities of other threads to ensure that one thread isnot attempting to perform an immediate write while another thread is attempting to close the sock.Module:Utility-Sock@*/int MPIDU_Sock_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len, MPIU_Size_t * num_written);/*@MPIDU_Sock_writev - perform an immediate vector writeInput Parameters:+ sock - sock object to which data is to be written. iov - I/O vector describing buffers of data to be written- iov_n - number of elements in I/O vector (must be less than MPID_IOV_LIMIT)Output Parameter:. num_written - actual number of bytes writtenReturn value: a MPI error code with a Sock extended error class+ MPI_SUCCESS - no error encountered during the write operation. MPIDU_SOCK_ERR_INIT - Sock module not initialized. MPIDU_SOCK_ERR_BAD_SOCK - invalid sock object. MPIDU_SOCK_ERR_BAD_BUF - using the buffer described by iov and iov_n resulted in a memory fault. MPIDU_SOCK_ERR_BAD_LEN - iov_n parameter must be greater than zero and not greater than MPID_IOV_LIMIT. MPIDU_SOCK_ERR_SOCK_CLOSED - the sock object was closed locally. MPIDU_SOCK_ERR_CONN_CLOSED - the connection was closed by the peer. MPIDU_SOCK_ERR_CONN_FAILED - the connection failed. MPIDU_SOCK_ERR_INPROGRESS - this operation overlapped with another like operation already in progress. MPIDU_SOCK_ERR_NOMEM - unable to allocate required memory- MPIDU_SOCK_ERR_FAIL - other error attempting to perform the writeNotes:An immediate write may not be performed while a posted write is outstanding on the same sock.  This is considered to be anapplication error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Thread safety:MPIDU_Sock_write() may be called while another thread is attempting to perform an immediate read or post a read operation on thesame sock.  MPIDU_Sock_write() may also be called while another thread is calling or blocking in MPIDU_Sock_wait() on the same sockset to which the specified sock belongs.A immediate write may not be performed if another thread is performing an immediate write on the same sock.  This is considered tobe an application error, and the results of doing so are undefined.  The implementation may choose to catch the error and returnMPIDU_SOCK_ERR_INPROGRESS, but it is not required to do so.Calling MPIDU_Sock_write() during or after the call to MPIDU_Sock_post_close() is consider to be an application error.  The resultof doing so is undefined, although the implementation may choose to return MPIDU_SOCK_ERR_SOCK_CLOSED if it is able to catch theerror.  The application should coordinate the closing of a sock with the activities of other threads to ensure that one thread isnot attempting to perform an immediate write while another thread is attempting to close the sock.Module:Utility-Sock@*/int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_written);/*@MPIDU_Sock_get_sock_id - get an integer identifier for a sock objectInput Parameter:. sock - sock objectReturn value: an integer that uniquely identifies the sock objectNotes:The integer is unique relative to all other open sock objects in the local process.  The integer may later be reused for adifferent sock once the current object is closed and destroyed.This function does not return an error code.  Passing in an invalid sock object has undefined results (garbage in, garbage out).Module:Utility-Sock@*/int MPIDU_Sock_get_sock_id(MPIDU_Sock_t sock);/*@MPIDU_Sock_get_sock_set_id - get an integer identifier for a sock set objectInput Parameter:. sock set - sock set objectReturn value: an integer that uniquely identifies the sock set objectNotes:The integer is unique relative to all other sock set objects currently existing in the local process.  The integer may later bereused for a different sock set once the current object destroyed.This function does not return an error code.  Passing in an invalid sock set object has undefined results (garbage in, garbageout).Module:Utility-Sock@*/int MPIDU_Sock_get_sock_set_id(MPIDU_Sock_set_t set);/*@MPIDU_Sock_get_error_class_string - get a generic error string from an error codeInput Parameter:+ error - sock error- length - length of error stringOutput Parameter:. error_string - error stringReturn value: a string representation of the sock errorNotes:The returned string is the generic error message for the supplied error code.Module:Utility-Sock@*/int MPIDU_Sock_get_error_class_string(int error, char *error_string, int length);CPLUSPLUS_END#endif /* !defined(MPIDU_SOCK_H_INCLUDED) */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -