This source file includes following definitions.
- ompi_win_allocate_f
- ompi_win_allocate_cptr_f
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
24 #include "ompi/mpi/fortran/mpif-h/bindings.h"
25
26 #if OMPI_BUILD_MPI_PROFILING
27 #if OPAL_HAVE_WEAK_SYMBOLS
28 #pragma weak PMPI_WIN_ALLOCATE = ompi_win_allocate_f
29 #pragma weak pmpi_win_allocate = ompi_win_allocate_f
30 #pragma weak pmpi_win_allocate_ = ompi_win_allocate_f
31 #pragma weak pmpi_win_allocate__ = ompi_win_allocate_f
32
33 #pragma weak PMPI_Win_allocate_f = ompi_win_allocate_f
34 #pragma weak PMPI_Win_allocate_f08 = ompi_win_allocate_f
35
36 #pragma weak PMPI_WIN_ALLOCATE_CPTR = ompi_win_allocate_f
37 #pragma weak pmpi_win_allocate_cptr = ompi_win_allocate_f
38 #pragma weak pmpi_win_allocate_cptr_ = ompi_win_allocate_f
39 #pragma weak pmpi_win_allocate_cptr__ = ompi_win_allocate_f
40
41 #pragma weak PMPI_Win_allocate_cptr_f = ompi_win_allocate_f
42 #pragma weak PMPI_Win_allocate_cptr_f08 = ompi_win_allocate_f
43 #else
44 OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_ALLOCATE,
45 pmpi_win_allocate,
46 pmpi_win_allocate_,
47 pmpi_win_allocate__,
48 pompi_win_allocate_f,
49 (MPI_Aint *size, MPI_Fint *disp_unit,
50 MPI_Fint *info, MPI_Fint *comm, char *baseptr,
51 MPI_Fint *win, MPI_Fint *ierr),
52 (size, disp_unit, info, comm, baseptr, win, ierr) )
53
54 OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_ALLOCATE_CPTR,
55 pmpi_win_allocate_cptr,
56 pmpi_win_allocate_cptr_,
57 pmpi_win_allocate_cptr__,
58 pompi_win_allocate_cptr_f,
59 (MPI_Aint *size, MPI_Fint *disp_unit,
60 MPI_Fint *info, MPI_Fint *comm, char *baseptr,
61 MPI_Fint *win, MPI_Fint *ierr),
62 (size, disp_unit, info, comm, baseptr, win, ierr) )
63 #endif
64 #endif
65
66 #if OPAL_HAVE_WEAK_SYMBOLS
67 #pragma weak MPI_WIN_ALLOCATE = ompi_win_allocate_f
68 #pragma weak mpi_win_allocate = ompi_win_allocate_f
69 #pragma weak mpi_win_allocate_ = ompi_win_allocate_f
70 #pragma weak mpi_win_allocate__ = ompi_win_allocate_f
71
72 #pragma weak MPI_Win_allocate_f = ompi_win_allocate_f
73 #pragma weak MPI_Win_allocate_f08 = ompi_win_allocate_f
74
75 #pragma weak MPI_WIN_ALLOCATE_CPTR = ompi_win_allocate_f
76 #pragma weak mpi_win_allocate_cptr = ompi_win_allocate_f
77 #pragma weak mpi_win_allocate_cptr_ = ompi_win_allocate_f
78 #pragma weak mpi_win_allocate_cptr__ = ompi_win_allocate_f
79
80 #pragma weak MPI_Win_allocate_cptr_f = ompi_win_allocate_f
81 #pragma weak MPI_Win_allocate_cptr_f08 = ompi_win_allocate_f
82 #else
83 #if ! OMPI_BUILD_MPI_PROFILING
84 OMPI_GENERATE_F77_BINDINGS (MPI_WIN_ALLOCATE,
85 mpi_win_allocate,
86 mpi_win_allocate_,
87 mpi_win_allocate__,
88 ompi_win_allocate_f,
89 (MPI_Aint *size, MPI_Fint *disp_unit,
90 MPI_Fint *info, MPI_Fint *comm, char *baseptr,
91 MPI_Fint *win, MPI_Fint *ierr),
92 (size, disp_unit, info, comm, baseptr, win, ierr) )
93
94 OMPI_GENERATE_F77_BINDINGS (MPI_WIN_ALLOCATE_CPTR,
95 mpi_win_allocate_cptr,
96 mpi_win_allocate_cptr_,
97 mpi_win_allocate_cptr__,
98 ompi_win_allocate_cptr_f,
99 (MPI_Aint *size, MPI_Fint *disp_unit,
100 MPI_Fint *info, MPI_Fint *comm, char *baseptr,
101 MPI_Fint *win, MPI_Fint *ierr),
102 (size, disp_unit, info, comm, baseptr, win, ierr) )
103 #else
104 #define ompi_win_allocate_f pompi_win_allocate_f
105 #define ompi_win_allocate_cptr_f pompi_win_allocate_cptr_f
106 #endif
107 #endif
108
109
110 void ompi_win_allocate_f(MPI_Aint *size, MPI_Fint *disp_unit,
111 MPI_Fint *info, MPI_Fint *comm, char *baseptr,
112 MPI_Fint *win, MPI_Fint *ierr)
113 {
114 int c_ierr;
115 MPI_Info c_info;
116 MPI_Comm c_comm;
117 MPI_Win c_win;
118
119 c_info = PMPI_Info_f2c(*info);
120 c_comm = PMPI_Comm_f2c(*comm);
121
122 c_ierr = PMPI_Win_allocate(*size, OMPI_FINT_2_INT(*disp_unit),
123 c_info, c_comm,
124 baseptr, &c_win);
125 *win = PMPI_Win_c2f(c_win);
126 if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
127 }
128
129
130
131
132
133 void ompi_win_allocate_cptr_f(MPI_Aint *size, MPI_Fint *disp_unit,
134 MPI_Fint *info, MPI_Fint *comm,
135 char *baseptr,
136 MPI_Fint *win, MPI_Fint *ierr)
137 {
138 ompi_win_allocate_f(size, disp_unit, info, comm, baseptr,
139 win, ierr);
140 }