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