1 /*
2  * Copyright (C) by Argonne National Laboratory
3  *     See COPYRIGHT in top-level directory
4  *
5  * This file is automatically generated by buildiface
6  * DO NOT EDIT
7  */
8 #include "mpi_fortimpl.h"
9 
10 
11 /* Begin MPI profiling block */
12 #if defined(USE_WEAK_SYMBOLS) && !defined(USE_ONLY_MPI_NAMES)
13 #if defined(HAVE_MULTIPLE_PRAGMA_WEAK)
14 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * );
15 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * );
16 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * );
17 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * );
18 
19 #if defined(F77_NAME_UPPER)
20 #pragma weak MPI_TYPE_UB = PMPI_TYPE_UB
21 #pragma weak mpi_type_ub__ = PMPI_TYPE_UB
22 #pragma weak mpi_type_ub_ = PMPI_TYPE_UB
23 #pragma weak mpi_type_ub = PMPI_TYPE_UB
24 #elif defined(F77_NAME_LOWER_2USCORE)
25 #pragma weak MPI_TYPE_UB = pmpi_type_ub__
26 #pragma weak mpi_type_ub__ = pmpi_type_ub__
27 #pragma weak mpi_type_ub_ = pmpi_type_ub__
28 #pragma weak mpi_type_ub = pmpi_type_ub__
29 #elif defined(F77_NAME_LOWER_USCORE)
30 #pragma weak MPI_TYPE_UB = pmpi_type_ub_
31 #pragma weak mpi_type_ub__ = pmpi_type_ub_
32 #pragma weak mpi_type_ub_ = pmpi_type_ub_
33 #pragma weak mpi_type_ub = pmpi_type_ub_
34 #else
35 #pragma weak MPI_TYPE_UB = pmpi_type_ub
36 #pragma weak mpi_type_ub__ = pmpi_type_ub
37 #pragma weak mpi_type_ub_ = pmpi_type_ub
38 #pragma weak mpi_type_ub = pmpi_type_ub
39 #endif
40 
41 
42 
43 #elif defined(HAVE_PRAGMA_WEAK)
44 
45 #if defined(F77_NAME_UPPER)
46 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * );
47 
48 #pragma weak MPI_TYPE_UB = PMPI_TYPE_UB
49 #elif defined(F77_NAME_LOWER_2USCORE)
50 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * );
51 
52 #pragma weak mpi_type_ub__ = pmpi_type_ub__
53 #elif !defined(F77_NAME_LOWER_USCORE)
54 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * );
55 
56 #pragma weak mpi_type_ub = pmpi_type_ub
57 #else
58 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * );
59 
60 #pragma weak mpi_type_ub_ = pmpi_type_ub_
61 #endif
62 
63 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
64 #if defined(F77_NAME_UPPER)
65 #pragma _HP_SECONDARY_DEF PMPI_TYPE_UB  MPI_TYPE_UB
66 #elif defined(F77_NAME_LOWER_2USCORE)
67 #pragma _HP_SECONDARY_DEF pmpi_type_ub__  mpi_type_ub__
68 #elif !defined(F77_NAME_LOWER_USCORE)
69 #pragma _HP_SECONDARY_DEF pmpi_type_ub  mpi_type_ub
70 #else
71 #pragma _HP_SECONDARY_DEF pmpi_type_ub_  mpi_type_ub_
72 #endif
73 
74 #elif defined(HAVE_PRAGMA_CRI_DUP)
75 #if defined(F77_NAME_UPPER)
76 #pragma _CRI duplicate MPI_TYPE_UB as PMPI_TYPE_UB
77 #elif defined(F77_NAME_LOWER_2USCORE)
78 #pragma _CRI duplicate mpi_type_ub__ as pmpi_type_ub__
79 #elif !defined(F77_NAME_LOWER_USCORE)
80 #pragma _CRI duplicate mpi_type_ub as pmpi_type_ub
81 #else
82 #pragma _CRI duplicate mpi_type_ub_ as pmpi_type_ub_
83 #endif
84 
85 #elif defined(HAVE_WEAK_ATTRIBUTE)
86 #if defined(F77_NAME_UPPER)
87 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
88 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
89 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
90 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
91 
92 #elif defined(F77_NAME_LOWER_2USCORE)
93 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
94 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
95 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
96 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
97 
98 #elif defined(F77_NAME_LOWER_USCORE)
99 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
100 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
101 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
102 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
103 
104 #else
105 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
106 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
107 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
108 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
109 
110 #endif
111 #endif /* HAVE_PRAGMA_WEAK */
112 #endif /* USE_WEAK_SYMBOLS */
113 /* End MPI profiling block */
114 
115 
116 /* These definitions are used only for generating the Fortran wrappers */
117 #if defined(USE_WEAK_SYMBOLS) && defined(USE_ONLY_MPI_NAMES)
118 #if defined(HAVE_MULTIPLE_PRAGMA_WEAK)
119 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * );
120 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * );
121 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * );
122 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * );
123 
124 #if defined(F77_NAME_UPPER)
125 #pragma weak mpi_type_ub__ = MPI_TYPE_UB
126 #pragma weak mpi_type_ub_ = MPI_TYPE_UB
127 #pragma weak mpi_type_ub = MPI_TYPE_UB
128 #elif defined(F77_NAME_LOWER_2USCORE)
129 #pragma weak MPI_TYPE_UB = mpi_type_ub__
130 #pragma weak mpi_type_ub_ = mpi_type_ub__
131 #pragma weak mpi_type_ub = mpi_type_ub__
132 #elif defined(F77_NAME_LOWER_USCORE)
133 #pragma weak MPI_TYPE_UB = mpi_type_ub_
134 #pragma weak mpi_type_ub__ = mpi_type_ub_
135 #pragma weak mpi_type_ub = mpi_type_ub_
136 #else
137 #pragma weak MPI_TYPE_UB = mpi_type_ub
138 #pragma weak mpi_type_ub__ = mpi_type_ub
139 #pragma weak mpi_type_ub_ = mpi_type_ub
140 #endif
141 #elif defined(HAVE_WEAK_ATTRIBUTE)
142 #if defined(F77_NAME_UPPER)
143 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * );
144 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("MPI_TYPE_UB")));
145 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("MPI_TYPE_UB")));
146 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("MPI_TYPE_UB")));
147 
148 #elif defined(F77_NAME_LOWER_2USCORE)
149 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub__")));
150 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * );
151 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub__")));
152 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub__")));
153 
154 #elif defined(F77_NAME_LOWER_USCORE)
155 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub_")));
156 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub_")));
157 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * );
158 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub_")));
159 
160 #else
161 extern FORT_DLL_SPEC void FORT_CALL MPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub")));
162 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub")));
163 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("mpi_type_ub")));
164 extern FORT_DLL_SPEC void FORT_CALL mpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * );
165 
166 #endif
167 #endif
168 
169 #endif
170 
171 /* Map the name to the correct form */
172 #ifndef MPICH_MPI_FROM_PMPI
173 #if defined(USE_WEAK_SYMBOLS)
174 #if defined(HAVE_MULTIPLE_PRAGMA_WEAK)
175 /* Define the weak versions of the PMPI routine*/
176 #ifndef F77_NAME_UPPER
177 extern FORT_DLL_SPEC void FORT_CALL PMPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * );
178 #endif
179 #ifndef F77_NAME_LOWER_2USCORE
180 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * );
181 #endif
182 #ifndef F77_NAME_LOWER_USCORE
183 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * );
184 #endif
185 #ifndef F77_NAME_LOWER
186 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * );
187 
188 #endif
189 
190 #if defined(F77_NAME_UPPER)
191 #pragma weak pmpi_type_ub__ = PMPI_TYPE_UB
192 #pragma weak pmpi_type_ub_ = PMPI_TYPE_UB
193 #pragma weak pmpi_type_ub = PMPI_TYPE_UB
194 #elif defined(F77_NAME_LOWER_2USCORE)
195 #pragma weak PMPI_TYPE_UB = pmpi_type_ub__
196 #pragma weak pmpi_type_ub_ = pmpi_type_ub__
197 #pragma weak pmpi_type_ub = pmpi_type_ub__
198 #elif defined(F77_NAME_LOWER_USCORE)
199 #pragma weak PMPI_TYPE_UB = pmpi_type_ub_
200 #pragma weak pmpi_type_ub__ = pmpi_type_ub_
201 #pragma weak pmpi_type_ub = pmpi_type_ub_
202 #else
203 #pragma weak PMPI_TYPE_UB = pmpi_type_ub
204 #pragma weak pmpi_type_ub__ = pmpi_type_ub
205 #pragma weak pmpi_type_ub_ = pmpi_type_ub
206 #endif /* Test on name mapping */
207 
208 #elif defined(HAVE_WEAK_ATTRIBUTE)
209 #if defined(F77_NAME_UPPER)
210 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
211 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
212 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("PMPI_TYPE_UB")));
213 
214 #elif defined(F77_NAME_LOWER_2USCORE)
215 extern FORT_DLL_SPEC void FORT_CALL PMPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
216 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
217 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub__")));
218 
219 #elif defined(F77_NAME_LOWER_USCORE)
220 extern FORT_DLL_SPEC void FORT_CALL PMPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
221 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
222 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub_")));
223 
224 #else
225 extern FORT_DLL_SPEC void FORT_CALL PMPI_TYPE_UB( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
226 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub__( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
227 extern FORT_DLL_SPEC void FORT_CALL pmpi_type_ub_( MPI_Fint *, MPI_Fint *, MPI_Fint * ) __attribute__((weak,alias("pmpi_type_ub")));
228 
229 #endif /* Test on name mapping */
230 #endif /* HAVE_MULTIPLE_PRAGMA_WEAK */
231 #endif /* USE_WEAK_SYMBOLS */
232 
233 #ifdef F77_NAME_UPPER
234 #define mpi_type_ub_ PMPI_TYPE_UB
235 #elif defined(F77_NAME_LOWER_2USCORE)
236 #define mpi_type_ub_ pmpi_type_ub__
237 #elif !defined(F77_NAME_LOWER_USCORE)
238 #define mpi_type_ub_ pmpi_type_ub
239 #else
240 #define mpi_type_ub_ pmpi_type_ub_
241 #endif /* Test on name mapping */
242 
243 #ifdef F77_USE_PMPI
244 /* This defines the routine that we call, which must be the PMPI version
245    since we're renaming the Fortran entry as the pmpi version.  The MPI name
246    must be undefined first to prevent any conflicts with previous renamings. */
247 #undef MPI_Type_ub
248 #define MPI_Type_ub PMPI_Type_ub
249 #endif
250 
251 #else
252 
253 #ifdef F77_NAME_UPPER
254 #define mpi_type_ub_ MPI_TYPE_UB
255 #elif defined(F77_NAME_LOWER_2USCORE)
256 #define mpi_type_ub_ mpi_type_ub__
257 #elif !defined(F77_NAME_LOWER_USCORE)
258 #define mpi_type_ub_ mpi_type_ub
259 /* Else leave name alone */
260 #endif
261 
262 
263 #endif /* MPICH_MPI_FROM_PMPI */
264 
265 /* Prototypes for the Fortran interfaces */
266 #include "fproto.h"
mpi_type_ub_(MPI_Fint * v1,MPI_Fint * v2,MPI_Fint * ierr)267 FORT_DLL_SPEC void FORT_CALL mpi_type_ub_ ( MPI_Fint *v1, MPI_Fint * v2, MPI_Fint *ierr ){
268     MPI_Aint l2;
269     *ierr = MPI_Type_ub( (MPI_Datatype)(*v1), &l2 );
270     if (*ierr == MPI_SUCCESS) *v2 = (MPI_Fint)(l2);
271 }
272