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

📄 ssend_init.c

📁 刚才是说明 现在是安装程序在 LINUX环境下进行编程的MPICH安装文件
💻 C
字号:
/* -*- Mode: C; c-basic-offset:4 ; -*- *//* * *  (C) 2001 by Argonne National Laboratory. *      See COPYRIGHT in top-level directory. */#include "mpiimpl.h"/* -- Begin Profiling Symbol Block for routine MPI_Ssend_init */#if defined(HAVE_PRAGMA_WEAK)#pragma weak MPI_Ssend_init = PMPI_Ssend_init#elif defined(HAVE_PRAGMA_HP_SEC_DEF)#pragma _HP_SECONDARY_DEF PMPI_Ssend_init  MPI_Ssend_init#elif defined(HAVE_PRAGMA_CRI_DUP)#pragma _CRI duplicate MPI_Ssend_init as PMPI_Ssend_init#endif/* -- End Profiling Symbol Block *//* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build   the MPI routines */#ifndef MPICH_MPI_FROM_PMPI#define MPI_Ssend_init PMPI_Ssend_init#endif#undef FUNCNAME#define FUNCNAME MPI_Ssend_init/*@    MPI_Ssend_init - Builds a handle for a synchronous sendInput Parameters:+ buf - initial address of send buffer (choice) . count - number of elements sent (integer) . datatype - type of each element (handle) . dest - rank of destination (integer) . tag - message tag (integer) - comm - communicator (handle) Output Parameter:. request - communication request (handle) .N fortran.N Errors.N MPI_SUCCESS.N MPI_ERR_COMM.N MPI_ERR_COUNT.N MPI_ERR_TYPE.N MPI_ERR_TAG.N MPI_ERR_RANK@*/int MPI_Ssend_init(void *buf, int count, MPI_Datatype datatype, int dest,		   int tag, MPI_Comm comm, MPI_Request *request){    static const char FCNAME[] = "MPI_Ssend_init";    int mpi_errno = MPI_SUCCESS;    MPID_Comm *comm_ptr = NULL;    MPID_Request *request_ptr = NULL;    MPID_MPI_STATE_DECL(MPID_STATE_MPI_SSEND_INIT);    /* Verify that MPI has been initialized */#   ifdef HAVE_ERROR_CHECKING    {        MPID_BEGIN_ERROR_CHECKS;        {	    MPIR_ERRTEST_INITIALIZED(mpi_errno);	    MPIR_ERRTEST_COMM(comm, mpi_errno);            if (mpi_errno) {                return MPIR_Err_return_comm( 0, FCNAME, mpi_errno );            }	}        MPID_END_ERROR_CHECKS;    }#   endif /* HAVE_ERROR_CHECKING */	        MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_SSEND_INIT);        /* ... body of routine ...  */        /* Convert MPI object handles to object pointers */    MPID_Comm_get_ptr( comm, comm_ptr );    /* Validate parameters if error checking is enabled */#   ifdef HAVE_ERROR_CHECKING    {        MPID_BEGIN_ERROR_CHECKS;        {	    MPID_Datatype * datatype_ptr = NULL;	                MPID_Comm_valid_ptr( comm_ptr, mpi_errno );            if (mpi_errno) {                MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND_INIT);                return MPIR_Err_return_comm( NULL, FCNAME, mpi_errno );            }	    	    MPIR_ERRTEST_COUNT(count, mpi_errno);	    MPIR_ERRTEST_DATATYPE(count, datatype, mpi_errno);	    MPIR_ERRTEST_SEND_RANK(comm_ptr, dest, mpi_errno);	    MPIR_ERRTEST_SEND_TAG(tag, mpi_errno);	    MPIR_ERRTEST_ARGNULL(request,"request",mpi_errno);	    if (request != NULL)	    {		MPIR_ERRTEST_REQUEST(*request, mpi_errno);	    }            if (mpi_errno) {                MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND_INIT);                return MPIR_Err_return_comm( comm_ptr, FCNAME, mpi_errno );            }	    	    MPID_Datatype_get_ptr(datatype, datatype_ptr);            MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );            if (mpi_errno) {                MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND_INIT);                return MPIR_Err_return_comm( comm_ptr, FCNAME, mpi_errno );            }        }        MPID_END_ERROR_CHECKS;    }#   endif /* HAVE_ERROR_CHECKING */    mpi_errno = MPID_Ssend_init(buf, count, datatype, dest, tag, comm_ptr,				MPID_CONTEXT_INTRA_PT2PT, &request_ptr);    if (mpi_errno == MPI_SUCCESS)    {	/* return the handle of the request to the user */	*request = request_ptr->handle;		MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND_INIT);	return MPI_SUCCESS;    }        /* ... end of body of routine ... */        MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND_INIT);    return MPIR_Err_return_comm( comm_ptr, FCNAME, mpi_errno );}

⌨️ 快捷键说明

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