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

📄 mpidimpl.h

📁 fortran并行计算包
💻 H
📖 第 1 页 / 共 5 页
字号:
/* internal */int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, int source_win_ptr);int MPIDI_CH3I_Send_pt_rma_done_pkt(MPIDI_VC_t * vc, int source_win_ptr);#define MPIDI_CH3I_DATATYPE_IS_PREDEFINED(type, predefined) \    if ((HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) || \        (type == MPI_FLOAT_INT) || (type == MPI_DOUBLE_INT) || \        (type == MPI_LONG_INT) || (type == MPI_SHORT_INT) || \	(type == MPI_LONG_DOUBLE_INT)) \        predefined = 1; \    else predefined = 0;int MPIDI_CH3I_Progress_finalize(void);/*@  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.  Notes on the implementation:  This code is designed to support one particular model of thread-safety.  It is common to many of the channels and was moved into this file because  the MPIDI_CH3_Progress_signal_completion reference is used by the   macro the implements MPID_Request_set_completed.  Note that there is   a function version of MPID_Request_set_completed for use by greq_complete.c@*//* * MPIDI_CH3_Progress_signal_completion() is used to notify the progress * engine that a completion has occurred.  The multi-threaded version will need * to wake up any (and all) threads blocking in MPIDI_CH3_Progress(). *//* This allows the channel to define an alternate to the    completion counter.  The dllchannel uses this to access the    counter through a pointer.  Others could use this to provide   more complex operations */#ifndef MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT#define MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT \        MPIDI_CH3I_progress_completion_count++#endif#ifndef MPICH_IS_THREADED#   define MPIDI_CH3_Progress_signal_completion()	\    {							\       MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT;		\    }#else    extern volatile int MPIDI_CH3I_progress_blocked;    extern volatile int MPIDI_CH3I_progress_wakeup_signalled;    void MPIDI_CH3I_Progress_wakeup(void);#   define MPIDI_CH3_Progress_signal_completion()			\    {									\        MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT;                      \	if (MPIDI_CH3I_progress_blocked == TRUE && MPIDI_CH3I_progress_wakeup_signalled == FALSE)\	{								\	    MPIDI_CH3I_progress_wakeup_signalled = TRUE;		\	    MPIDI_CH3I_Progress_wakeup();				\	}								\    }#endif/* Function that may be used to provide business card info */int MPIDI_CH3I_BCInit( char **bc_val_p, int *val_max_sz_p);/* Function to free the storage allocated by MPIDI_CH3I_BCInit */int MPIDI_CH3I_BCFree( char *publish_bc );/* Inform the process group of our connection information string (business   card) */int MPIDI_PG_SetConnInfo( int rank, const char *connString );/* NOTE: Channel function prototypes are in mpidi_ch3_post.h since some of the    macros require their declarations. *//* FIXME: These should be defined only when these particular utility   packages are used.  Best would be to keep these prototypes in the   related util/xxx directories, and either copy them into an include   directory used only for builds or add (yet another) include path *//* from util/sock */int MPIDI_VC_InitSock( MPIDI_VC_t *);int MPIDI_CH3I_Connect_to_root_sock(const char *, MPIDI_VC_t **);int MPIDI_CH3I_VC_post_sockconnect(MPIDI_VC_t * );/* FIXME: Where should this go? *//* Used internally to broadcast process groups belonging to peercomm to all processes in comm*/int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root );/* from util/shm */int MPIDI_CH3I_Connect_to_root_sshm(const char *, MPIDI_VC_t **);int MPIDI_VC_InitShm( MPIDI_VC_t *vc );/* from util/shmbase */void MPIDI_Generate_shm_string(char *, int);/* Channel defintitions *//*@  MPIDI_CH3_iStartMsg - A non-blocking request to send a CH3 packet.  A r  equest 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 should return   NULL.@*/int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, MPIDI_msg_sz_t pkt_sz, 			MPID_Request **sreq_ptr);/*@  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 should return   NULL.@*/int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int iov_n, 			 MPID_Request **sreq_ptr);/*@  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 the OnDataAvail routine in the  request, if any (if not, the channel implementation will mark the   request as complete).  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   invoke the OnDataAvail routine in the request, if any; otherwise, is   must set the request as complete.@*/int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt, 		    MPIDI_msg_sz_t pkt_sz);/*@  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 the  OnDataAvail routine in the request, if any.  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 the OnDataAvail routine in the request, if any.@*/int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, MPID_IOV * iov, 		     int iov_n);/*@  MPIDI_CH3_Connection_terminate - terminate the underlying connection   associated with the specified VC  Input Parameters:. vc - virtual connection  Return value:  An MPI error code@*/int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc);/* MPIDI_CH3_Connect_to_root (really connect to peer) - channel routine   for connecting to a process through a port, used in implementing   MPID_Comm_connect and accept */int MPIDI_CH3_Connect_to_root(const char *, MPIDI_VC_t **);/* * Channel utility prototypes */int MPIDI_CH3U_Recvq_FU(int, int, int, MPI_Status * );MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request, MPIDI_Message_match *);MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int, int, int, int * found);int MPIDI_CH3U_Recvq_DP(MPID_Request * rreq);MPID_Request * MPIDI_CH3U_Recvq_FDP(MPIDI_Message_match * match);MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match, 					   int * found);#if 0/* FIXME: These are macros! Why do they have prototypes */void MPIDI_CH3U_Request_complete(MPID_Request * req);void MPIDI_CH3U_Request_increment_cc(MPID_Request * req, int * was_incomplete);void MPIDI_CH3U_Request_decrement_cc(MPID_Request * req, int * incomplete);#endifint MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq, 				     MPID_IOV * const iov, int * const iov_n);int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq);int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq);int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq);void MPIDI_CH3U_Buffer_copy(const void * const sbuf, int scount, 			    MPI_Datatype sdt, int * smpi_errno,			    void * const rbuf, int rcount, MPI_Datatype rdt, 			    MPIDI_msg_sz_t * rdata_sz, int * rmpi_errno);int MPIDI_CH3U_Post_data_receive(int found, MPID_Request ** rreqp);int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreqp);int MPIDI_CH3U_Post_data_receive_unexpected(MPID_Request * rreqp);int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete);int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete);/* FIXME: This is a macro! */#ifndef MPIDI_CH3_Request_add_ref/*@  MPIDI_CH3_Request_add_ref - Increment the reference count associated with a  request object  Input Parameters:. req - pointer to the request object@*/void MPIDI_CH3_Request_add_ref(MPID_Request * req);#endif/*@  MPIDI_CH3_GetParentPort - 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_GetParentPort' 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.@*/int MPIDI_CH3_GetParentPort(char ** parent_port_name);/*@   MPIDI_CH3_FreeParentPort - This routine frees the storage associated with   a parent port (allocted with MPIDH_CH3_GetParentPort).  @*/void MPIDI_CH3_FreeParentPort( void );/*E  MPIDI_CH3_Abort - Abort this process.  Input Parameters:+ exit_code - exit code to be returned by the process- error_msg - error message to print  Return value:  This function should not return.  Notes:  This routine is used only if the channel defines  'MPIDI_CH3_IMPLEMENTS_ABORT'.  This allows the channel to handle   aborting processes, particularly when the channel does not use the standard  PMI interface.

⌨️ 快捷键说明

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