This source file includes following definitions.
- ompi_mrecv_f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #include "ompi_config.h"
25
26 #include "ompi/mpi/fortran/mpif-h/bindings.h"
27 #include "ompi/mpi/fortran/mpif-h/status-conversion.h"
28 #include "ompi/mpi/fortran/base/constants.h"
29 #include "ompi/communicator/communicator.h"
30
31 #if OMPI_BUILD_MPI_PROFILING
32 #if OPAL_HAVE_WEAK_SYMBOLS
33 #pragma weak PMPI_MRECV = ompi_mrecv_f
34 #pragma weak pmpi_mrecv = ompi_mrecv_f
35 #pragma weak pmpi_mrecv_ = ompi_mrecv_f
36 #pragma weak pmpi_mrecv__ = ompi_mrecv_f
37
38 #pragma weak PMPI_Mrecv_f = ompi_mrecv_f
39 #pragma weak PMPI_Mrecv_f08 = ompi_mrecv_f
40 #else
41 OMPI_GENERATE_F77_BINDINGS (PMPI_MRECV,
42 pmpi_mrecv,
43 pmpi_mrecv_,
44 pmpi_mrecv__,
45 pompi_mrecv_f,
46 (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message,
47 MPI_Fint *status, MPI_Fint *ierr),
48 (buf, count, datatype, message, status, ierr) )
49 #endif
50 #endif
51
52 #if OPAL_HAVE_WEAK_SYMBOLS
53 #pragma weak MPI_MRECV = ompi_mrecv_f
54 #pragma weak mpi_mrecv = ompi_mrecv_f
55 #pragma weak mpi_mrecv_ = ompi_mrecv_f
56 #pragma weak mpi_mrecv__ = ompi_mrecv_f
57
58 #pragma weak MPI_Mrecv_f = ompi_mrecv_f
59 #pragma weak MPI_Mrecv_f08 = ompi_mrecv_f
60 #else
61 #if ! OMPI_BUILD_MPI_PROFILING
62 OMPI_GENERATE_F77_BINDINGS (MPI_MRECV,
63 mpi_mrecv,
64 mpi_mrecv_,
65 mpi_mrecv__,
66 ompi_mrecv_f,
67 (char *buf, MPI_Fint *count, MPI_Fint *datatype,
68 MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr),
69 (buf, count, datatype, message, status, ierr) )
70 #else
71 #define ompi_mrecv_f pompi_mrecv_f
72 #endif
73 #endif
74
75
76 void ompi_mrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
77 MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr)
78 {
79 int c_ierr;
80 OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
81 MPI_Message c_message = PMPI_Message_f2c(*message);
82 MPI_Datatype c_type = PMPI_Type_f2c(*datatype);
83
84 OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
85
86
87 c_ierr = OMPI_INT_2_FINT(PMPI_Mrecv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count),
88 c_type, &c_message,
89 c_status));
90 if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
91
92 if (MPI_SUCCESS == c_ierr) {
93 OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
94
95 *message = PMPI_Message_c2f(c_message);
96 }
97 }