Commit a91381e9 authored by David Goodell's avatar David Goodell
Browse files

[svn-r9511] implement MPIX_Mprobe and friends

This includes MPIX_Mprobe, MPIX_Improbe, MPIX_Mrecv, and MPIX_Imrecv.

!!!NOTE!!! This change adds four more functions to the ADI.

The current implementation of MPIX_Mprobe is much less efficient than it
could be.  Right now it polls the unexpected queue (UQ), much like
MPI_Probe does.  A better implementation would enqueue the "message"
object on the PQ so that the matching is handled by the progress engine
in the various packet handlers.  Unfortunately, such an implementation
is surprisingly complicated at this point.

Includes only a simple test for now (test/mpi/pt2pt/mprobe), but it at
least shows that our Mprobe functionality basically all works.

Reviewed by buntinas@.
parent ec71c1a8
......@@ -192,6 +192,7 @@ typedef int MPI_Op;
#define MPI_DATATYPE_NULL ((MPI_Datatype)0x0c000000)
#define MPI_REQUEST_NULL ((MPI_Request)0x2c000000)
#define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0x14000000)
#define MPIX_MESSAGE_NULL ((MPIX_Message)MPI_REQUEST_NULL)
/* These are only guesses; make sure you change them in mpif.h as well */
#define MPI_MAX_PROCESSOR_NAME @MPI_MAX_PROCESSOR_NAME@
......@@ -272,6 +273,9 @@ typedef int MPI_Errhandler;
/* MPI request opjects */
typedef int MPI_Request;
/* MPI message objects for Mprobe and related functions */
typedef int MPIX_Message;
/* User combination function */
typedef void (MPI_User_function) ( void *, void *, int *, MPI_Datatype * );
......@@ -975,6 +979,12 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, int [], int [], int [], int
int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted);
int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int [], int [], int maxoutdegree, int [], int []);
/* MPI-3 matched probe functionality, currently MPIX_ extensions */
int MPIX_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPIX_Message *message, MPI_Status *status);
int MPIX_Imrecv(void *buf, int count, MPI_Datatype datatype, MPIX_Message *message, MPI_Request *request);
int MPIX_Mprobe(int source, int tag, MPI_Comm comm, MPIX_Message *message, MPI_Status *status);
int MPIX_Mrecv(void *buf, int count, MPI_Datatype datatype, MPIX_Message *message, MPI_Status *status);
/* MPI-3 nonblocking collectives, currently MPIX_ extensions */
int MPIX_Ibarrier(MPI_Comm comm, MPI_Request *request);
int MPIX_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request);
......@@ -1323,6 +1333,10 @@ int PMPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, int [], int
int PMPI_Dist_graph_create(MPI_Comm comm_old, int n, int [], int [], int [], int [], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph);
int PMPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted);
int PMPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int [], int [], int maxoutdegree, int [], int []);
int PMPIX_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPIX_Message *message, MPI_Status *status);
int PMPIX_Imrecv(void *buf, int count, MPI_Datatype datatype, MPIX_Message *message, MPI_Request *request);
int PMPIX_Mprobe(int source, int tag, MPI_Comm comm, MPIX_Message *message, MPI_Status *status);
int PMPIX_Mrecv(void *buf, int count, MPI_Datatype datatype, MPIX_Message *message, MPI_Status *status);
int PMPIX_Ibarrier(MPI_Comm comm, MPI_Request *request);
int PMPIX_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request);
int PMPIX_Igather(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
......
......@@ -1329,6 +1329,12 @@ void MPIR_Free_contextid( MPIR_Context_id_t );
/* Requests */
/* This currently defines a single structure type for all requests.
Eventually, we may want a union type, as used in MPICH-1 */
/* NOTE-R1: MPID_REQUEST_MPROBE signifies that this is a request created by
* MPI_Mprobe or MPI_Improbe. Since we use MPI_Request objects as our
* MPI_Message objects, we use this separate kind in order to provide stronger
* error checking. Once a message (backed by a request) is promoted to a real
* request by calling MPI_Mrecv/MPI_Imrecv, we actually modify the kind to be
* MPID_REQUEST_RECV in order to keep completion logic as simple as possible. */
/*E
MPID_Request_kind - Kinds of MPI Requests
......@@ -1344,6 +1350,7 @@ typedef enum MPID_Request_kind_t {
MPID_PREQUEST_RECV,
MPID_UREQUEST,
MPID_COLL_REQUEST,
MPID_REQUEST_MPROBE, /* see NOTE-R1 */
MPID_LAST_REQUEST_KIND
#ifdef MPID_DEV_REQUEST_KIND_DECL
, MPID_DEV_REQUEST_KIND_DECL
......@@ -2904,6 +2911,118 @@ int MPID_Probe(int, int, MPID_Comm *, int, MPI_Status *);
@*/
int MPID_Iprobe(int, int, MPID_Comm *, int, int *, MPI_Status *);
/*@
MPID_Mprobe - Block until a matching request is found and return information
about it, including a message handle for later reception.
Input Parameters:
+ source - rank to match (or 'MPI_ANY_SOURCE')
. tag - Tag to match (or 'MPI_ANY_TAG')
. comm - communicator to match.
- context_offset - context id offset of communicator to match
Output Parameter:
+ message - 'MPID_Request' (logically a message) set as defined by 'MPI_Mprobe'
- status - 'MPI_Status' set as defined by 'MPI_Mprobe'
Return Value:
Error code.
Providing the 'context_offset' is necessary at this level to support the
way in which the MPICH implementation uses context ids in the implementation
of other operations. The communicator is present to allow the device
to use message-queues attached to particular communicators or connections
between processes.
Module:
Request
@*/
int MPID_Mprobe(int source, int tag, MPID_Comm *comm, int context_offset,
MPID_Request **message, MPI_Status *status);
/*@
MPID_Improbe - Look for a matching request in the receive queue and return
information about it, including a message handle for later reception.
Input Parameters:
+ source - rank to match (or 'MPI_ANY_SOURCE')
. tag - Tag to match (or 'MPI_ANY_TAG')
. comm - communicator to match.
- context_offset - context id offset of communicator to match
Output Parameter:
+ flag - 'flag' set as defined by 'MPI_Improbe'
. message - 'MPID_Request' (logically a message) set as defined by 'MPI_Improbe'
- status - 'MPI_Status' set as defined by 'MPI_Improbe'
Return Value:
Error code.
Providing the 'context_offset' is necessary at this level to support the
way in which the MPICH implementation uses context ids in the implementation
of other operations. The communicator is present to allow the device
to use message-queues attached to particular communicators or connections
between processes.
Module:
Request
@*/
int MPID_Improbe(int source, int tag, MPID_Comm *comm, int context_offset,
int *flag, MPID_Request **message, MPI_Status *status);
/*@
MPID_Imrecv - Begin receiving the message indicated by the given message
handle and return a request object for later completion.
Input Parameters:
+ count - number of elements to receive
. datatype - datatype of each recv buffer element
- message - 'MPID_Request' (logically a message) set as defined by 'MPI_Mprobe'
Output Parameter:
+ buf - receive buffer
- request - request object for completing the recv
Return Value:
Error code.
Module:
Request
NOTE: under most implementations the request object returned will
probably be some modified version of the "message" object passed in.
@*/
int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
MPID_Request *message, MPID_Request **rreqp);
/*@
MPID_Mrecv - Receive the message indicated by the given message handle.
Input Parameters:
+ count - number of elements to receive
. datatype - datatype of each recv buffer element
- message - 'MPID_Request' (logically a message) set as defined by 'MPI_Mprobe'
Output Parameter:
+ buf - receive buffer
- status - 'MPI_Status' set as defined by 'MPI_Mrecv'
Return Value:
Error code.
Module:
Request
NOTE: under most implementations the request object returned will
probably be some modified version of the "message" object passed in.
@*/
int MPID_Mrecv(void *buf, int count, MPI_Datatype datatype,
MPID_Request *message, MPI_Status *status);
/*@
MPID_Cancel_send - Cancel the indicated send request
......
......@@ -269,6 +269,9 @@ be in the range 0 to %d
**request_invalid_kind %d:The supplied request was invalid (kind=%d)
**request_invalid_kind %d %d:The supplied request in array element %d was \
invalid (kind=%d)
**reqnotmsg: Invalid MPIX_Message (MPI_Request passed)
**msgnotreq: Invalid MPI_Request (MPIX_Message passed)
**msgnotreq %d: Invalid MPI_Request at array index %d (MPIX_Message passed)
**requestnull:Null MPI_Request
**requestnotpersist:Request is not persistent in MPI_Start or MPI_Startall.
**requestpersistactive:Persistent request passed to MPI_Start or MPI_Startall is already active.
......@@ -1448,6 +1451,16 @@ is too big (> MPIU_SHMW_GHND_SZ)
**mpir_wingetattr:MPIR_WinGetAttr failed
**mpir_wingetattr %W %d %p %p:MPIR_WinGetAttr(%W, win_keyval=%d, attribute_val=%p, flag=%p) failed
## MPI-3 Mprobe routines
**mpix_improbe: MPIX_Improbe failed
**mpix_improbe %d %d %C %p %p %p: MPIX_Improbe(source=%d, tag=%d, comm=%C, flag=%p, message=%p, status=%p)
**mpix_mprobe: MPIX_Mprobe failed
**mpix_mprobe %d %d %C %p %p: MPIX_Mprobe(source=%d, tag=%d, comm=%C, message=%p, status=%p)
**mpix_mrecv: MPIX_Mrecv failed
**mpix_mrecv %p %d %D %p %p: MPIX_Mrecv(buf=%p, count=%d, datatype=%D, message=%p, status=%p)
**mpix_imrecv: MPIX_Imrecv failed
**mpix_imrecv %p %d %D %p %p: MPIX_Imrecv(buf=%p, count=%d, datatype=%D, message=%p, request=%p)
## MPI-3 nonblocking collectives
**mpix_ibarrier: MPIX_Ibarrier failed
**mpix_ibarrier %C %p: MPIX_Ibarrier(comm=%C, request=%p)
......
......@@ -14,11 +14,15 @@ mpi_sources += \
src/mpi/pt2pt/greq_start.c \
src/mpi/pt2pt/greq_complete.c \
src/mpi/pt2pt/ibsend.c \
src/mpi/pt2pt/improbe.c \
src/mpi/pt2pt/imrecv.c \
src/mpi/pt2pt/iprobe.c \
src/mpi/pt2pt/irecv.c \
src/mpi/pt2pt/irsend.c \
src/mpi/pt2pt/isend.c \
src/mpi/pt2pt/issend.c \
src/mpi/pt2pt/mprobe.c \
src/mpi/pt2pt/mrecv.c \
src/mpi/pt2pt/probe.c \
src/mpi/pt2pt/recv.c \
src/mpi/pt2pt/recv_init.c \
......
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2012 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpiimpl.h"
/* -- Begin Profiling Symbol Block for routine MPIX_Improbe */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPIX_Improbe = PMPIX_Improbe
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#pragma _HP_SECONDARY_DEF PMPIX_Improbe MPIX_Improbe
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Improbe as PMPIX_Improbe
#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
#undef MPIX_Improbe
#define MPIX_Improbe PMPIX_Improbe
/* any non-MPI functions go here, especially non-static ones */
#endif /* MPICH_MPI_FROM_PMPI */
#undef FUNCNAME
#define FUNCNAME MPIX_Improbe
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
/*@
MPIX_Improbe - Nonblocking matched probe.
Input Parameters:
+ source - rank of source or MPI_ANY_SOURCE (integer)
. tag - message tag or MPI_ANY_TAG (integer)
- comm - communicator (handle)
Output Parameters:
+ flag - flag (logical)
. message - returned message (handle)
- status - status object (status)
.N ThreadSafe
.N Fortran
.N Errors
@*/
int MPIX_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPIX_Message *message, MPI_Status *status)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *msgp = NULL;
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPIX_IMPROBE);
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_IMPROBE);
/* Validate parameters, especially handles needing to be converted */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_COMM(comm, mpi_errno);
/* TODO more checks may be appropriate */
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS
}
# endif /* HAVE_ERROR_CHECKING */
/* Convert MPI object handles to object pointers */
MPID_Comm_get_ptr(comm, comm_ptr);
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS
{
MPID_Comm_valid_ptr(comm_ptr, mpi_errno);
MPIR_ERRTEST_ARGNULL(flag, "flag", mpi_errno);
/* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS
}
# endif /* HAVE_ERROR_CHECKING */
/* ... body of routine ... */
*message = MPIX_MESSAGE_NULL;
mpi_errno = MPID_Improbe(source, tag, comm_ptr, MPID_CONTEXT_INTRA_PT2PT, flag, &msgp, status);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
if (*flag) {
*message = msgp->handle;
}
else {
/* the standard says that if flag is false then message and status are
* undefined */
*message = MPIX_MESSAGE_NULL;
}
/* ... end of body of routine ... */
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_IMPROBE);
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
# ifdef HAVE_ERROR_CHECKING
{
mpi_errno = MPIR_Err_create_code(
mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
"**mpix_improbe", "**mpix_improbe %d %d %C %p %p %p", source, tag, comm, flag, message, status);
}
# endif
mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno);
goto fn_exit;
/* --END ERROR HANDLING-- */
}
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2012 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpiimpl.h"
/* -- Begin Profiling Symbol Block for routine MPIX_Imrecv */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPIX_Imrecv = PMPIX_Imrecv
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#pragma _HP_SECONDARY_DEF PMPIX_Imrecv MPIX_Imrecv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Imrecv as PMPIX_Imrecv
#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
#undef MPIX_Imrecv
#define MPIX_Imrecv PMPIX_Imrecv
/* any non-MPI functions go here, especially non-static ones */
#endif /* MPICH_MPI_FROM_PMPI */
#undef FUNCNAME
#define FUNCNAME MPIX_Imrecv
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
/*@
MPIX_Imrecv - Nonblocking receive of message matched by MPIX_Mprobe or MPIX_Improbe.
Input/Output Parameters:
. message - message (handle)
Input Parameters:
+ count - number of elements in the receive buffer (non-negative integer)
- datatype - datatype of each receive buffer element (handle)
Output Parameters:
+ buf - initial address of the receive buffer (choice)
- request - communication request (handle)
.N ThreadSafe
.N Fortran
.N Errors
@*/
int MPIX_Imrecv(void *buf, int count, MPI_Datatype datatype, MPIX_Message *message, MPI_Request *request)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *rreq = NULL;
MPID_Request *msgp = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPIX_IMRECV);
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_IMRECV);
/* Validate parameters, especially handles needing to be converted */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
/* TODO more checks may be appropriate */
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS
}
# endif /* HAVE_ERROR_CHECKING */
/* Convert MPI object handles to object pointers */
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS
{
if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
MPID_Datatype *datatype_ptr = NULL;
MPID_Datatype_get_ptr(datatype, datatype_ptr);
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
}
MPID_Request_valid_ptr(msgp, mpi_errno);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
MPIU_ERR_CHKANDJUMP((msgp->kind != MPID_REQUEST_MPROBE),
mpi_errno, MPI_ERR_ARG, "**reqnotmsg")
MPIR_ERRTEST_ARGNULL(request, "request", mpi_errno);
/* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS
}
# endif /* HAVE_ERROR_CHECKING */
/* ... body of routine ... */
mpi_errno = MPID_Imrecv(buf, count, datatype, msgp, &rreq);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
MPIU_Assert(rreq != NULL);
*request = rreq->handle;
*message = MPIX_MESSAGE_NULL;
/* ... end of body of routine ... */
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_IMRECV);
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
# ifdef HAVE_ERROR_CHECKING
{
mpi_errno = MPIR_Err_create_code(
mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
"**mpix_imrecv", "**mpix_imrecv %p %d %D %p %p", buf, count, datatype, message, request);
}
# endif
mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno);
goto fn_exit;
/* --END ERROR HANDLING-- */
}
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2012 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpiimpl.h"
/* -- Begin Profiling Symbol Block for routine MPIX_Mprobe */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPIX_Mprobe = PMPIX_Mprobe
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#pragma _HP_SECONDARY_DEF PMPIX_Mprobe MPIX_Mprobe
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Mprobe as PMPIX_Mprobe
#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
#undef MPIX_Mprobe
#define MPIX_Mprobe PMPIX_Mprobe
/* any non-MPI functions go here, especially non-static ones */
#endif /* MPICH_MPI_FROM_PMPI */
#undef FUNCNAME
#define FUNCNAME MPIX_Mprobe
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
/*@
MPIX_Mprobe - Blocking matched probe.
Input Parameters:
+ source - rank of source or MPI_ANY_SOURCE (integer)
. tag - message tag or MPI_ANY_TAG (integer)
- comm - communicator (handle)
Output Parameters:
+ message - returned message (handle)
- status - status object (status)
.N ThreadSafe
.N Fortran
.N Errors
@*/
int MPIX_Mprobe(int source, int tag, MPI_Comm comm, MPIX_Message *message, MPI_Status *status)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *msgp = NULL;
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPIX_MPROBE);
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_MPROBE);
/* Validate parameters, especially handles needing to be converted */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_COMM(comm, mpi_errno);
/* TODO more checks may be appropriate */
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS
}
# endif /* HAVE_ERROR_CHECKING */
/* Convert MPI object handles to object pointers */
MPID_Comm_get_ptr(comm, comm_ptr);
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS
{
MPID_Comm_valid_ptr(comm_ptr, mpi_errno);
/* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS
}
# endif /* HAVE_ERROR_CHECKING */
/* ... body of routine ... */
*message = MPIX_MESSAGE_NULL;
mpi_errno = MPID_Mprobe(source, tag, comm_ptr, MPID_CONTEXT_INTRA_PT2PT, &msgp, status);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
*message = msgp->handle;
/* ... end of body of routine ... */
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_MPROBE);
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
# ifdef HAVE_ERROR_CHECKING
{
mpi_errno = MPIR_Err_create_code(
mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
"**mpix_mprobe", "**mpix_mprobe %d %d %C %p %p", source, tag, comm, message, status);
}
# endif
mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno);
goto fn_exit;
/* --END ERROR HANDLING-- */
}
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2012 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpiimpl.h"
/* -- Begin Profiling Symbol Block for routine MPIX_Mrecv */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPIX_Mrecv = PMPIX_Mrecv
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#pragma _HP_SECONDARY_DEF PMPIX_Mrecv MPIX_Mrecv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Mrecv as PMPIX_Mrecv
#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
#undef MPIX_Mrecv
#define MPIX_Mrecv PMPIX_Mrecv
/* any non-MPI functions go here, especially non-static ones */
#endif /* MPICH_MPI_FROM_PMPI */
#undef FUNCNAME
#define FUNCNAME MPIX_Mrecv
#undef FCNAME