btl_mvapi.h

来自「MPI stands for the Message Passing Inter」· C头文件 代码 · 共 523 行 · 第 1/2 页

H
523
字号
             (unsigned char*) frag->hdr);  \       desc_post[i] = frag->desc.rr_desc; \    }\    ret = VAPI_post_srq( nic, \                         srq_hndl, \                         cnt, \                         desc_post, \                         &rwqe_posted); \   if(VAPI_OK != ret) { \        BTL_ERROR(("error posting receive descriptors to shared receive queue: %s",\                   VAPI_strerror(ret))); \   } else if(rwqe_posted < 1) { \       BTL_ERROR(("error posting receive descriptors to shared receive queue, number of entries posted is %d", rwqe_posted)); \   } else {\        OPAL_THREAD_ADD32(srd_posted, cnt); \   }\   } while(0);\}struct mca_btl_mvapi_frag_t; extern mca_btl_mvapi_module_t mca_btl_mvapi_module;/** * Register IB component parameters with the MCA framework */extern int mca_btl_mvapi_component_open(void);/** * Any final cleanup before being unloaded. */extern int mca_btl_mvapi_component_close(void);/** * IB component initialization. *  * @param num_btl_modules (OUT)                  Number of BTLs returned in BTL array. * @param allow_multi_user_threads (OUT)  Flag indicating wether BTL supports user threads (TRUE) * @param have_hidden_threads (OUT)       Flag indicating wether BTL uses threads (TRUE) * *  (1) read interface list from kernel and compare against component parameters *      then create a BTL instance for selected interfaces *  (2) setup IB listen socket for incoming connection attempts *  (3) publish BTL addressing info  * */extern mca_btl_base_module_t** mca_btl_mvapi_component_init(    int *num_btl_modules,     bool allow_multi_user_threads,    bool have_hidden_threads);/** * IB component progress. */extern int mca_btl_mvapi_component_progress( void );/** * Register a callback function that is called on receipt * of a fragment. * * @param btl (IN)     BTL module * @return             Status indicating if cleanup was successful * * When the process list changes, the PML notifies the BTL of the * change, to provide the opportunity to cleanup or release any * resources associated with the peer. */int mca_btl_mvapi_register(    struct mca_btl_base_module_t* btl,    mca_btl_base_tag_t tag,    mca_btl_base_module_recv_cb_fn_t cbfunc,    void* cbdata);                                                                                                                     /** * Cleanup any resources held by the BTL. *  * @param btl  BTL instance. * @return     OMPI_SUCCESS or error status on failure. */extern int mca_btl_mvapi_finalize(    struct mca_btl_base_module_t* btl);/** * PML->BTL notification of change in the process list. *  * @param btl (IN) * @param nprocs (IN)     Number of processes * @param procs (IN)      Set of processes * @param peers (OUT)     Set of (optional) peer addressing info. * @param peers (IN/OUT)  Set of processes that are reachable via this BTL. * @return     OMPI_SUCCESS or error status on failure. *  */extern int mca_btl_mvapi_add_procs(    struct mca_btl_base_module_t* btl,    size_t nprocs,    struct ompi_proc_t **procs,    struct mca_btl_base_endpoint_t** peers,    ompi_bitmap_t* reachable);/** * PML->BTL notification of change in the process list. * * @param btl (IN)     BTL instance * @param nproc (IN)   Number of processes. * @param procs (IN)   Set of processes. * @param peers (IN)   Set of peer data structures. * @return             Status indicating if cleanup was successful * */extern int mca_btl_mvapi_del_procs(    struct mca_btl_base_module_t* btl,    size_t nprocs,    struct ompi_proc_t **procs,    struct mca_btl_base_endpoint_t** peers);/** * PML->BTL Initiate a send of the specified size. * * @param btl (IN)               BTL instance * @param btl_base_peer (IN)     BTL peer addressing * @param send_request (IN/OUT)  Send request (allocated by PML via mca_btl_base_request_alloc_fn_t) * @param size (IN)              Number of bytes PML is requesting BTL to deliver * @param flags (IN)             Flags that should be passed to the peer via the message header. * @param request (OUT)          OMPI_SUCCESS if the BTL was able to queue one or more fragments */extern int mca_btl_mvapi_send(    struct mca_btl_base_module_t* btl,    struct mca_btl_base_endpoint_t* btl_peer,    struct mca_btl_base_descriptor_t* descriptor,     mca_btl_base_tag_t tag);/** * PML->BTL Initiate a put of the specified size. * * @param btl (IN)               BTL instance * @param btl_base_peer (IN)     BTL peer addressing * @param send_request (IN/OUT)  Send request (allocated by PML via mca_btl_base_request_alloc_fn_t) * @param size (IN)              Number of bytes PML is requesting BTL to deliver * @param flags (IN)             Flags that should be passed to the peer via the message header. * @param request (OUT)          OMPI_SUCCESS if the BTL was able to queue one or more fragments */extern int mca_btl_mvapi_put(    struct mca_btl_base_module_t* btl,    struct mca_btl_base_endpoint_t* btl_peer,    struct mca_btl_base_descriptor_t* decriptor);/** * PML->BTL Initiate a get of the specified size. * * @param btl (IN)               BTL instance * @param btl_base_peer (IN)     BTL peer addressing * @param send_request (IN/OUT)  Send request (allocated by PML via mca_btl_base_request_alloc_fn_t) * @param size (IN)              Number of bytes PML is requesting BTL to deliver * @param flags (IN)             Flags that should be passed to the peer via the message header. * @param request (OUT)          OMPI_SUCCESS if the BTL was able to queue one or more fragments */extern int mca_btl_mvapi_get(    struct mca_btl_base_module_t* btl,    struct mca_btl_base_endpoint_t* btl_peer,    struct mca_btl_base_descriptor_t* decriptor);/** * Allocate a descriptor. * * @param btl (IN)      BTL module * @param size (IN)     Requested descriptor size. */extern mca_btl_base_descriptor_t* mca_btl_mvapi_alloc(    struct mca_btl_base_module_t* btl,     size_t size); /** * Return a segment allocated by this BTL. * * @param btl (IN)         BTL module * @param descriptor (IN)  Allocated descriptor. */extern int mca_btl_mvapi_free(    struct mca_btl_base_module_t* btl,     mca_btl_base_descriptor_t* des);     /** * Pack data and return a descriptor that can be * used for send/put. * * @param btl (IN)      BTL module * @param peer (IN)     BTL peer addressing */mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src(    struct mca_btl_base_module_t* btl,    struct mca_btl_base_endpoint_t* peer,    mca_mpool_base_registration_t* registration,     struct ompi_convertor_t* convertor,    size_t reserve,    size_t* size);/** * Allocate a descriptor initialized for RDMA write. * * @param btl (IN)      BTL module * @param peer (IN)     BTL peer addressing */extern mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst(                                                          struct mca_btl_base_module_t* btl,                                                          struct mca_btl_base_endpoint_t* peer,                                                         mca_mpool_base_registration_t* registration,                                                          struct ompi_convertor_t* convertor,                                                         size_t reserve,                                                         size_t* size); /** * Return a send fragment to the modules free list. * * @param btl (IN)   BTL instance * @param frag (IN)  IB send fragment * */extern void mca_btl_mvapi_send_frag_return(    struct mca_btl_base_module_t* btl,    struct mca_btl_mvapi_frag_t*);/* * Dump state of btl/queues */                                                                                                            extern void mca_btl_mvapi_dump(    struct mca_btl_base_module_t* btl,    struct mca_btl_base_endpoint_t* endpoint,    int verbose);int mca_btl_mvapi_module_init(mca_btl_mvapi_module_t* mvapi_btl); #if defined(c_plusplus) || defined(__cplusplus)}#endif#endif

⌨️ 快捷键说明

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