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