This source file includes following definitions.
- MPI_Mprobe
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "ompi_config.h"
15 #include <stdio.h>
16
17 #include "ompi/mpi/c/bindings.h"
18 #include "ompi/runtime/params.h"
19 #include "ompi/mca/pml/pml.h"
20 #include "ompi/memchecker.h"
21 #include "ompi/request/request.h"
22 #include "ompi/message/message.h"
23
24 #if OMPI_BUILD_MPI_PROFILING
25 #if OPAL_HAVE_WEAK_SYMBOLS
26 #pragma weak MPI_Mprobe = PMPI_Mprobe
27 #endif
28 #define MPI_Mprobe PMPI_Mprobe
29 #endif
30
31 static const char FUNC_NAME[] = "MPI_Mprobe";
32
33 int MPI_Mprobe(int source, int tag, MPI_Comm comm,
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 return MPI_SUCCESS;
70 }
71
72 OPAL_CR_ENTER_LIBRARY();
73
74 rc = MCA_PML_CALL(mprobe(source, tag, comm, message, status));
75
76
77 MEMCHECKER(
78 opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
79 );
80
81 OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
82 }