This source file includes following definitions.
- MPI_Start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "ompi_config.h"
23 #include <stdio.h>
24
25 #include "ompi/mpi/c/bindings.h"
26 #include "ompi/runtime/params.h"
27 #include "ompi/communicator/communicator.h"
28 #include "ompi/mca/pml/pml.h"
29 #include "ompi/request/request.h"
30 #include "ompi/errhandler/errhandler.h"
31 #include "ompi/memchecker.h"
32
33 #if OMPI_BUILD_MPI_PROFILING
34 #if OPAL_HAVE_WEAK_SYMBOLS
35 #pragma weak MPI_Start = PMPI_Start
36 #endif
37 #define MPI_Start PMPI_Start
38 #endif
39
40 static const char FUNC_NAME[] = "MPI_Start";
41
42
43 int MPI_Start(MPI_Request *request)
44 {
45 int ret = OMPI_SUCCESS;
46
47 MEMCHECKER(
48 memchecker_request(request);
49 );
50
51 if ( MPI_PARAM_CHECK ) {
52 int rc = MPI_SUCCESS;
53 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
54 if (request == NULL) {
55 rc = MPI_ERR_REQUEST;
56 }
57 OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
58 }
59
60
61
62
63
64
65
66
67
68 switch((*request)->req_type) {
69 case OMPI_REQUEST_PML:
70 case OMPI_REQUEST_COLL:
71 if ( MPI_PARAM_CHECK && !(*request)->req_persistent) {
72 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST, FUNC_NAME);
73 }
74 OPAL_CR_ENTER_LIBRARY();
75
76 ret = (*request)->req_start(1, request);
77
78 OPAL_CR_EXIT_LIBRARY();
79 return ret;
80
81 case OMPI_REQUEST_NOOP:
82
83
84
85
86
87
88 if( OMPI_REQUEST_INACTIVE == (*request)->req_state ) {
89 (*request)->req_state = OMPI_REQUEST_ACTIVE;
90 return MPI_SUCCESS;
91 }
92
93 default:
94 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST, FUNC_NAME);
95 }
96 }
97