This source file includes following definitions.
- MPI_Improbe
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "ompi_config.h"
15
16 #include "ompi/mpi/c/bindings.h"
17 #include "ompi/runtime/params.h"
18 #include "ompi/mca/pml/pml.h"
19 #include "ompi/memchecker.h"
20 #include "ompi/request/request.h"
21 #include "ompi/message/message.h"
22
23 #if OMPI_BUILD_MPI_PROFILING
24 #if OPAL_HAVE_WEAK_SYMBOLS
25 #pragma weak MPI_Improbe = PMPI_Improbe
26 #endif
27 #define MPI_Improbe PMPI_Improbe
28 #endif
29
30 static const char FUNC_NAME[] = "MPI_Improbe";
31
32
33 int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag,
34 MPI_Message *message, MPI_Status *status)
35 {
36 int rc;
37
38 MEMCHECKER(
39 memchecker_comm(comm);
40 );
41
42 if ( MPI_PARAM_CHECK ) {
43 rc = MPI_SUCCESS;
44 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
45 if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > mca_pml.pml_max_tag)) {
46 rc = MPI_ERR_TAG;
47 } else if (ompi_comm_invalid(comm)) {
48 rc = MPI_ERR_COMM;
49 } else if ((source != MPI_ANY_SOURCE) &&
50 (MPI_PROC_NULL != source) &&
51 ompi_comm_peer_invalid(comm, source)) {
52 rc = MPI_ERR_RANK;
53 } else if (NULL == message) {
54 rc = MPI_ERR_REQUEST;
55 }
56 OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
57 }
58
59 if (MPI_PROC_NULL == source) {
60 if (MPI_STATUS_IGNORE != status) {
61 *status = ompi_request_empty.req_status;
62
63
64 MEMCHECKER(
65 opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
66 );
67 }
68 *message = &ompi_message_no_proc.message;
69 *flag = 1;
70 return MPI_SUCCESS;
71 }
72
73 OPAL_CR_ENTER_LIBRARY();
74
75 rc = MCA_PML_CALL(improbe(source, tag, comm, flag, message, status));
76
77
78 MEMCHECKER(
79 opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
80 );
81
82 OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
83 }
84