This source file includes following definitions.
- MPI_Rsend_init
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 #include <stdio.h>
27
28 #include "ompi/mpi/c/bindings.h"
29 #include "ompi/runtime/params.h"
30 #include "ompi/communicator/communicator.h"
31 #include "ompi/errhandler/errhandler.h"
32 #include "ompi/mca/pml/pml.h"
33 #include "ompi/request/request.h"
34 #include "ompi/memchecker.h"
35
36 #if OMPI_BUILD_MPI_PROFILING
37 #if OPAL_HAVE_WEAK_SYMBOLS
38 #pragma weak MPI_Rsend_init = PMPI_Rsend_init
39 #endif
40 #define MPI_Rsend_init PMPI_Rsend_init
41 #endif
42
43 static const char FUNC_NAME[] = "MPI_Rsend_init";
44
45
46 int MPI_Rsend_init(const void *buf, int count, MPI_Datatype type,
47 int dest, int tag, MPI_Comm comm,
48 MPI_Request *request)
49 {
50 int rc;
51
52 MEMCHECKER(
53 memchecker_datatype(type);
54 memchecker_call(&opal_memchecker_base_isaddressable, buf, count, type);
55 memchecker_comm(comm);
56 );
57
58 if ( MPI_PARAM_CHECK ) {
59 rc = MPI_SUCCESS;
60 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
61 if (ompi_comm_invalid(comm)) {
62 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME);
63 } else if (count < 0) {
64 rc = MPI_ERR_COUNT;
65 } else if (MPI_DATATYPE_NULL == type || NULL == type) {
66 rc = MPI_ERR_TYPE;
67 } else if (tag < 0 || tag > mca_pml.pml_max_tag) {
68 rc = MPI_ERR_TAG;
69 } else if (ompi_comm_peer_invalid(comm, dest) &&
70 (MPI_PROC_NULL != dest)) {
71 rc = MPI_ERR_RANK;
72 } else if (request == NULL) {
73 rc = MPI_ERR_REQUEST;
74 }
75 OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
76 }
77
78 if (MPI_PROC_NULL == dest) {
79 rc = ompi_request_persistent_noop_create(request);
80 OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
81 }
82
83 OPAL_CR_ENTER_LIBRARY();
84
85
86
87
88 rc = MCA_PML_CALL(isend_init(buf,count,type,dest,tag,
89 MCA_PML_BASE_SEND_READY,comm,request));
90 OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
91 }
92