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

📄 request_free.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_Request_free */#if defined(HAVE_PRAGMA_WEAK)#pragma weak MPI_Request_free = PMPI_Request_free#elif defined(HAVE_PRAGMA_HP_SEC_DEF)#pragma _HP_SECONDARY_DEF PMPI_Request_free  MPI_Request_free#elif defined(HAVE_PRAGMA_CRI_DUP)#pragma _CRI duplicate MPI_Request_free as PMPI_Request_free#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_Request_free PMPI_Request_free#endif#undef FUNCNAME#define FUNCNAME MPI_Request_free/*@    MPI_Request_free - Frees a communication request objectInput Parameter:. request - communication request (handle) Notes:This routine is normally used to free inactive persistent requests created witheither 'MPI_Recv_init' or 'MPI_Send_init' and friends.  It `is` alsopermissible to free an active request.  However, once freed, the request can nolonger be used in a wait or test routine (e.g., 'MPI_Wait') to determinecompletion.This routine may also be used to free a non-persistent requests such as thosecreated with 'MPI_Irecv' or 'MPI_Isend' and friends.  Like active persistentrequests, once freed, the request can no longer be used with test/wait routinesto determine completion..N fortran.N Errors.N MPI_SUCCESS.N MPI_ERR_REQUEST.N MPI_ERR_ARG.see also: MPI_Isend, MPI_Irecv, MPI_Issend, MPI_Ibsend, MPI_Irsend,MPI_Recv_init, MPI_Send_init, MPI_Ssend_init, MPI_Rsend_init, MPI_Wait,MPI_Test, MPI_Waitall, MPI_Waitany, MPI_Waitsome, MPI_Testall, MPI_Testany,MPI_Testsome@*/int MPI_Request_free(MPI_Request *request){    static const char FCNAME[] = "MPI_Request_free";    int mpi_errno = MPI_SUCCESS;    MPID_Request *request_ptr = NULL;    MPID_MPI_STATE_DECL(MPID_STATE_MPI_REQUEST_FREE);    /* Verify that MPI has been initialized */#   ifdef HAVE_ERROR_CHECKING    {        MPID_BEGIN_ERROR_CHECKS;        {	    MPIR_ERRTEST_INITIALIZED(mpi_errno);            if (mpi_errno) {                return MPIR_Err_return_comm( 0, FCNAME, mpi_errno );            }	}        MPID_END_ERROR_CHECKS;    }#   endif /* HAVE_ERROR_CHECKING */	        MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_REQUEST_FREE);        /* Convert MPI object handles to object pointers */    MPID_Request_get_ptr( *request, request_ptr );    /* Validate parameters if error checking is enabled */#   ifdef HAVE_ERROR_CHECKING    {        MPID_BEGIN_ERROR_CHECKS;        {	    /* Validate request_ptr */            MPID_Request_valid_ptr( request_ptr, mpi_errno );            if (mpi_errno) {                MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_REQUEST_FREE);                return MPIR_Err_return_comm( 0, FCNAME, mpi_errno );            }        }        MPID_END_ERROR_CHECKS;    }#   endif /* HAVE_ERROR_CHECKING */        MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_REQUEST_FREE);    /* If this is an active persistent request, we must also release the       partner request. */    if (request_ptr->kind == MPID_PREQUEST_SEND ||	request_ptr->kind == MPID_PREQUEST_RECV)    {	if (request_ptr->partner_request != NULL)	{	    MPID_Request_release(request_ptr->partner_request);	}    }    MPID_Request_release(request_ptr);    *request = MPI_REQUEST_NULL;        MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_REQUEST_FREE);    return MPI_SUCCESS;}

⌨️ 快捷键说明

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