📄 mpidpost.h
字号:
/* -*- Mode: C; c-basic-offset:4 ; -*- *//* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */#if !defined(MPICH_MPIDPOST_H_INCLUDED)#define MPICH_MPIDPOST_H_INCLUDED/* FIXME: mpidpost.h is included by mpiimpl.h . However, mpiimpl.h should refer only to the ADI3 prototypes and should never include prototypes specific to any particular device. Factor the include files to maintain better modularity by providing mpiimpl.h with only the definitions that it needs *//* * Channel API prototypes *//* FIXME: *E is the "enum" doctext structure comment marker; these should be *@ instead. Also, these may be out of date; not all of these are referenced * (They should all be used in the ch3/src directory; otherwise they're not * part of the channel API). *//*E MPIDI_CH3_Init - Initialize the channel implementation. Input Parameters:+ has_parent - boolean value that is true if this MPI job was spawned by another set of MPI processes. pg_ptr - the new process group representing MPI_COMM_WORLD- pg_rank - my rank in the process group Return value: A MPI error code. Notes: MPID_Init has called 'PMI_Init' and created the process group structure before this routine is called.E*/int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t *pg_ptr, int pg_rank );/*E MPIDI_CH3_Finalize - Shutdown the channel implementation. Return value: A MPI error class.E*/int MPIDI_CH3_Finalize(void);/*E MPIDI_CH3_Get_parent_port - obtain the port name associated with the parent Output Parameters:. parent_port_name - the port name associated with the parent communicator Return value: A MPI error code. NOTE: 'MPIDI_CH3_Get_parent_port' should only be called if the initialization (in the current implementation, done with the static function 'InitPGFromPMI' in 'mpid_init.c') has determined that this process in fact has a parent.E*/int MPIDI_CH3_Get_parent_port(char ** parent_port_name);/*E MPIDI_CH3_iStartMsg - A non-blocking request to send a CH3 packet. A request object is allocated only if the send could not be completed immediately. Input Parameters:+ vc - virtual connection to send the message over. pkt - pointer to a MPIDI_CH3_Pkt_t structure containing the substructure to be sent- pkt_sz - size of the packet substucture Output Parameters:. sreq_ptr - send request or NULL if the send completed immediately Return value: An mpi error code. NOTE: The packet structure may be allocated on the stack. IMPLEMETORS: If the send can not be completed immediately, the CH3 packet structure must be stored internally until the request is complete. If the send completes immediately, the channel implementation shold return NULL and must not call MPIDI_CH3U_Handle_send_req().E*/int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, MPIDI_msg_sz_t pkt_sz, MPID_Request **sreq_ptr);/*E MPIDI_CH3_iStartMsgv - A non-blocking request to send a CH3 packet and associated data. A request object is allocated only if the send could not be completed immediately. Input Parameters:+ vc - virtual connection to send the message over. iov - a vector of a structure contains a buffer pointer and length- iov_n - number of elements in the vector Output Parameters:. sreq_ptr - send request or NULL if the send completed immediately Return value: An mpi error code. NOTE: The first element in the vector must point to the packet structure. The packet structure and the vector may be allocated on the stack. IMPLEMENTORS: If the send can not be completed immediately, the CH3 packet structure and the vector must be stored internally until the request is complete. If the send completes immediately, the channel implementation shold return NULL and must not call MPIDI_CH3U_Handle_send_req().E*/int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int iov_n, MPID_Request **sreq_ptr);/*E MPIDI_CH3_iSend - A non-blocking request to send a CH3 packet using an existing request object. When the send is complete the channel implementation will call MPIDI_CH3U_Handle_send_req(). Input Parameters:+ vc - virtual connection over which to send the CH3 packet. sreq - pointer to the send request object. pkt - pointer to a MPIDI_CH3_Pkt_t structure containing the substructure to be sent- pkt_sz - size of the packet substucture Return value: An mpi error code. NOTE: The packet structure may be allocated on the stack. IMPLEMETORS: If the send can not be completed immediately, the packet structure must be stored internally until the request is complete. If the send completes immediately, the channel implementation still must call MPIDI_CH3U_Handle_send_req().E*/int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt, MPIDI_msg_sz_t pkt_sz);/*E MPIDI_CH3_iSendv - A non-blocking request to send a CH3 packet and associated data using an existing request object. When the send is complete the channel implementation will call MPIDI_CH3U_Handle_send_req(). Input Parameters:+ vc - virtual connection over which to send the CH3 packet and data. sreq - pointer to the send request object. iov - a vector of a structure contains a buffer pointer and length- iov_n - number of elements in the vector Return value: An mpi error code. NOTE: The first element in the vector must point to the packet structure. The packet structure and the vector may be allocated on the stack. IMPLEMENTORS: If the send can not be completed immediately, the packet structure and the vector must be stored internally until the request is complete. If the send completes immediately, the channel implementation still must call MPIDI_CH3U_Handle_send_req().E*/int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, MPID_IOV * iov, int iov_n);/*E MPIDI_CH3_Cancel_send - Attempt to cancel a send request by removing the request from the local send queue. Input Parameters:+ vc - virtual connection over which to send the data - sreq - pointer to the send request object Output Parameters:. cancelled - TRUE if the send request was successful. FALSE otherwise. Return value: An mpi error code. IMPLEMENTORS: The send request may not be removed from the send queue if one or more bytes of the message have already been sent.E*/int MPIDI_CH3_Cancel_send(MPIDI_VC_t * vc, MPID_Request * sreq, int *cancelled);/*E MPIDI_CH3_Request_create - Allocate and initialize a new request object. Return value: A pointer to an initialized request object, or NULL if an error occurred. IMPLEMENTORS: MPIDI_CH3_Request_create() must call MPIDI_CH3U_Request_create() after the request object has been allocated.E*/MPID_Request * MPIDI_CH3_Request_create(void);/*E MPIDI_CH3_Request_add_ref - Increment the reference count associated with a request object Input Parameters:. req - pointer to the request objectE*/void MPIDI_CH3_Request_add_ref(MPID_Request * req);/*E MPIDI_CH3_Request_release_ref - Decrement the reference count associated with a request object. Input Parameters:. req - pointer to the request object Output Parameters:. inuse - TRUE if the object is still inuse; FALSE otherwise.E*/void MPIDI_CH3_Request_release_ref(MPID_Request * req, int * inuse);/*E MPIDI_CH3_Request_destroy - Release resources in use by an existing request object. Input Parameters:. req - pointer to the request object IMPLEMENTORS: MPIDI_CH3_Request_destroy() must call MPIDI_CH3U_Request_destroy() before request object is freed.E*/void MPIDI_CH3_Request_destroy(MPID_Request * req);/*E MPIDI_CH3_Progress_start - Mark the beginning of a progress epoch. Input Parameters:. state - pointer to a MPID_Progress_state object Return value: An MPI error code. NOTE: This routine need only be called if the code might call MPIDI_CH3_Progress_wait(). It is normally used as follows example:.vb if (*req->cc_ptr != 0) { MPID_Progress_state state; MPIDI_CH3_Progress_start(&state); { while(*req->cc_ptr != 0) { MPIDI_CH3_Progress_wait(&state); } } MPIDI_CH3_Progress_end(&state); }.ve IMPLEMENTORS: A multi-threaded implementation might save the current value of a request completion counter in the state.E*/void MPIDI_CH3_Progress_start(MPID_Progress_state * state);/*E MPIDI_CH3_Progress_wait - Give the channel implementation an opportunity to make progress on outstanding communication requests. Input Parameters:. state - pointer to the same MPID_Progress_state object passed to MPIDI_CH3_Progress_start Return value: An MPI error code. NOTE: MPIDI_CH3_Progress_start/end() need to be called. IMPLEMENTORS: A multi-threaded implementation would return immediately if the a request had been completed between the call to MPIDI_CH3_Progress_start() and MPIDI_CH3_Progress_wait(). This could be implemented by checking a request completion counter in the progress state against a global counter, and returning if they did not match.E*/int MPIDI_CH3_Progress_wait(MPID_Progress_state * state);/*E MPIDI_CH3_Progress_end - Mark the end of a progress epoch. Input Parameters:. state - pointer to the same MPID_Progress_state object passed to MPIDI_CH3_Progress_start Return value: An MPI error code.E*/void MPIDI_CH3_Progress_end(MPID_Progress_state * state);/*E MPIDI_CH3_Progress_test - Give the channel implementation an opportunity to make progress on outstanding communication requests. Return value: An MPI error code. NOTE: This function implicitly marks the beginning and end of a progress epoch.E*/int MPIDI_CH3_Progress_test(void);/*E MPIDI_CH3_Progress_poke - Give the channel implementation a moment of opportunity to make progress on outstanding communication. Return value: An mpi error code. IMPLEMENTORS: This routine is similar to MPIDI_CH3_Progress_test but may not be as thorough in its attempt to satisfy all outstanding communication.E*/int MPIDI_CH3_Progress_poke(void);/*E MPIDI_CH3_Progress_signal_completion - Inform the progress engine that a pending request has completed. IMPLEMENTORS: In a single-threaded environment, this routine can be implemented by incrementing a request completion counter. In a multi-threaded environment, the request completion counter must be atomically incremented, and any threaded blocking in the progress engine must be woken up when a request is completed.E*/void MPIDI_CH3_Progress_signal_completion(void);int MPIDI_CH3_Open_port(char *port_name);int MPIDI_GetTagFromPort( const char *, int * );int MPIDI_CH3_Comm_spawn_multiple(int count, char ** commands, char *** argvs, int * maxprocs, MPID_Info ** info_ptrs, int root, MPID_Comm * comm_ptr, MPID_Comm ** intercomm, int * errcodes);int MPIDI_CH3_Comm_accept(char * port_name, int root, MPID_Comm * comm_ptr, MPID_Comm ** newcomm); int MPIDI_CH3_Comm_connect(char * port_name, int root, MPID_Comm * comm_ptr, MPID_Comm ** newcomm);/*E MPIDI_CH3_Connection_terminate - terminate the underlying connection associated with the specified VC Input Parameters:. vc - virtual connection
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -