1 #ifndef PyMPI_CONFIG_MPICH2_H
2 #define PyMPI_CONFIG_MPICH2_H
3 
4 #include "mpi-11.h"
5 #include "mpi-12.h"
6 #include "mpi-20.h"
7 #include "mpi-22.h"
8 #include "mpi-30.h"
9 #include "mpi-31.h"
10 
11 /* These types are difficult to implement portably */
12 #undef PyMPI_HAVE_MPI_REAL2
13 #undef PyMPI_HAVE_MPI_COMPLEX4
14 
15 #if defined(MPI_UNWEIGHTED) && (MPICH2_NUMVERSION < 10300000)
16 #undef  MPI_UNWEIGHTED
17 #define MPI_UNWEIGHTED ((int *)0)
18 #endif /* MPICH2 < 1.3.0 */
19 
20 #if !defined(MPICH2_NUMVERSION) || (MPICH2_NUMVERSION < 10100000)
21 #undef PyMPI_HAVE_MPI_Type_create_f90_integer
22 #undef PyMPI_HAVE_MPI_Type_create_f90_real
23 #undef PyMPI_HAVE_MPI_Type_create_f90_complex
24 #endif /* MPICH2 < 1.1.0 */
25 
26 #ifndef ROMIO_VERSION
27 #include "mpich2-io.h"
28 #endif
29 
30 #if MPI_VERSION < 3 && defined(MPICH2_NUMVERSION)
31 #if MPICH2_NUMVERSION >= 10500000 && \
32     MPICH2_NUMVERSION <  20000000
33 
34 /*
35 #define PyMPI_HAVE_MPI_Count 1
36 #define PyMPI_HAVE_MPI_COUNT 1
37 #define PyMPI_HAVE_MPI_Type_size_x 1
38 #define PyMPI_HAVE_MPI_Type_get_extent_x 1
39 #define PyMPI_HAVE_MPI_Type_get_true_extent_x 1
40 #define PyMPI_HAVE_MPI_Get_elements_x 1
41 #define PyMPI_HAVE_MPI_Status_set_elements_x 1
42 #define MPI_Count                  MPIX_Count
43 #define MPI_COUNT                  MPIX_COUNT
44 #define MPI_Type_size_x            MPIX_Type_size_x
45 #define MPI_Type_get_extent_x      MPIX_Type_get_extent_x
46 #define MPI_Type_get_true_extent_x MPIX_Type_get_true_extent_x
47 #define MPI_Get_elements_x         MPIX_Get_elements_x
48 #define MPI_Status_set_elements_x  MPIX_Status_set_elements_x
49 */
50 
51 #define PyMPI_HAVE_MPI_COMBINER_HINDEXED_BLOCK 1
52 #define PyMPI_HAVE_MPI_Type_create_hindexed_block 1
53 #define MPI_COMBINER_HINDEXED_BLOCK    MPIX_COMBINER_HINDEXED_BLOCK
54 #define MPI_Type_create_hindexed_block MPIX_Type_create_hindexed_block
55 
56 #define PyMPI_HAVE_MPI_NO_OP 1
57 #define MPI_NO_OP MPIX_NO_OP
58 
59 #define PyMPI_HAVE_MPI_Message 1
60 #define PyMPI_HAVE_MPI_MESSAGE_NULL 1
61 #define PyMPI_HAVE_MPI_MESSAGE_NO_PROC 1
62 #define PyMPI_HAVE_MPI_Message_c2f 1
63 #define PyMPI_HAVE_MPI_Message_f2c 1
64 #define PyMPI_HAVE_MPI_Mprobe 1
65 #define PyMPI_HAVE_MPI_Improbe 1
66 #define PyMPI_HAVE_MPI_Mrecv 1
67 #define PyMPI_HAVE_MPI_Imrecv 1
68 #define MPI_Message         MPIX_Message
69 #define MPI_MESSAGE_NULL    MPIX_MESSAGE_NULL
70 #define MPI_MESSAGE_NO_PROC MPIX_MESSAGE_NO_PROC
71 #define MPI_Message_c2f     MPIX_Message_c2f
72 #define MPI_Message_f2c     MPIX_Message_f2c
73 #define MPI_Mprobe          MPIX_Mprobe
74 #define MPI_Improbe         MPIX_Improbe
75 #define MPI_Mrecv           MPIX_Mrecv
76 #define MPI_Imrecv          MPIX_Imrecv
77 
78 #define PyMPI_HAVE_MPI_Ibarrier 1
79 #define PyMPI_HAVE_MPI_Ibcast 1
80 #define PyMPI_HAVE_MPI_Igather 1
81 #define PyMPI_HAVE_MPI_Igatherv 1
82 #define PyMPI_HAVE_MPI_Iscatter 1
83 #define PyMPI_HAVE_MPI_Iscatterv 1
84 #define PyMPI_HAVE_MPI_Iallgather 1
85 #define PyMPI_HAVE_MPI_Iallgatherv 1
86 #define PyMPI_HAVE_MPI_Ialltoall 1
87 #define PyMPI_HAVE_MPI_Ialltoallv 1
88 #define PyMPI_HAVE_MPI_Ialltoallw 1
89 #define PyMPI_HAVE_MPI_Ireduce 1
90 #define PyMPI_HAVE_MPI_Iallreduce 1
91 #define PyMPI_HAVE_MPI_Ireduce_scatter_block 1
92 #define PyMPI_HAVE_MPI_Ireduce_scatter 1
93 #define PyMPI_HAVE_MPI_Iscan 1
94 #define PyMPI_HAVE_MPI_Iexscan 1
95 #define MPI_Ibarrier              MPIX_Ibarrier
96 #define MPI_Ibcast                MPIX_Ibcast
97 #define MPI_Igather               MPIX_Igather
98 #define MPI_Igatherv              MPIX_Igatherv
99 #define MPI_Iscatter              MPIX_Iscatter
100 #define MPI_Iscatterv             MPIX_Iscatterv
101 #define MPI_Iallgather            MPIX_Iallgather
102 #define MPI_Iallgatherv           MPIX_Iallgatherv
103 #define MPI_Ialltoall             MPIX_Ialltoall
104 #define MPI_Ialltoallv            MPIX_Ialltoallv
105 #define MPI_Ialltoallw            MPIX_Ialltoallw
106 #define MPI_Ireduce               MPIX_Ireduce
107 #define MPI_Iallreduce            MPIX_Iallreduce
108 #define MPI_Ireduce_scatter_block MPIX_Ireduce_scatter_block
109 #define MPI_Ireduce_scatter       MPIX_Ireduce_scatter
110 #define MPI_Iscan                 MPIX_Iscan
111 #define MPI_Iexscan               MPIX_Iexscan
112 
113 #define PyMPI_HAVE_MPI_Neighbor_allgather 1
114 #define PyMPI_HAVE_MPI_Neighbor_allgatherv 1
115 #define PyMPI_HAVE_MPI_Neighbor_alltoall 1
116 #define PyMPI_HAVE_MPI_Neighbor_alltoallv 1
117 #define PyMPI_HAVE_MPI_Neighbor_alltoallw 1
118 #define MPI_Neighbor_allgather  MPIX_Neighbor_allgather
119 #define MPI_Neighbor_allgatherv MPIX_Neighbor_allgatherv
120 #define MPI_Neighbor_alltoall   MPIX_Neighbor_alltoall
121 #define MPI_Neighbor_alltoallv  MPIX_Neighbor_alltoallv
122 #define MPI_Neighbor_alltoallw  MPIX_Neighbor_alltoallw
123 #define PyMPI_HAVE_MPI_Ineighbor_allgather 1
124 #define PyMPI_HAVE_MPI_Ineighbor_allgatherv 1
125 #define PyMPI_HAVE_MPI_Ineighbor_alltoall 1
126 #define PyMPI_HAVE_MPI_Ineighbor_alltoallv 1
127 #define PyMPI_HAVE_MPI_Ineighbor_alltoallw 1
128 #define MPI_Ineighbor_allgather  MPIX_Ineighbor_allgather
129 #define MPI_Ineighbor_allgatherv MPIX_Ineighbor_allgatherv
130 #define MPI_Ineighbor_alltoall   MPIX_Ineighbor_alltoall
131 #define MPI_Ineighbor_alltoallv  MPIX_Ineighbor_alltoallv
132 #define MPI_Ineighbor_alltoallw  MPIX_Ineighbor_alltoallw
133 
134 #define PyMPI_HAVE_MPI_Comm_idup 1
135 #define PyMPI_HAVE_MPI_Comm_create_group 1
136 #define PyMPI_HAVE_MPI_COMM_TYPE_SHARED 1
137 #define PyMPI_HAVE_MPI_Comm_split_type 1
138 #define MPI_Comm_idup             MPIX_Comm_idup
139 #define MPI_Comm_create_group     MPIX_Comm_create_group
140 #define MPI_COMM_TYPE_SHARED      MPIX_COMM_TYPE_SHARED
141 #define MPI_Comm_split_type       MPIX_Comm_split_type
142 /*
143 #define PyMPI_HAVE_MPI_Comm_dup_with_info 1
144 #define PyMPI_HAVE_MPI_Comm_set_info 1
145 #define PyMPI_HAVE_MPI_Comm_get_info 1
146 #define MPI_Comm_dup_with_info    MPIX_Comm_dup_with_info
147 #define MPI_Comm_set_info         MPIX_Comm_set_info
148 #define MPI_Comm_get_info         MPIX_Comm_get_info
149 */
150 
151 #define PyMPI_HAVE_MPI_WIN_CREATE_FLAVOR 1
152 #define PyMPI_HAVE_MPI_WIN_FLAVOR_CREATE 1
153 #define PyMPI_HAVE_MPI_WIN_FLAVOR_ALLOCATE 1
154 #define PyMPI_HAVE_MPI_WIN_FLAVOR_DYNAMIC 1
155 #define PyMPI_HAVE_MPI_WIN_FLAVOR_SHARED 1
156 #define MPI_WIN_CREATE_FLAVOR   MPIX_WIN_CREATE_FLAVOR
157 #define MPI_WIN_FLAVOR_CREATE   MPIX_WIN_FLAVOR_CREATE
158 #define MPI_WIN_FLAVOR_ALLOCATE MPIX_WIN_FLAVOR_ALLOCATE
159 #define MPI_WIN_FLAVOR_DYNAMIC  MPIX_WIN_FLAVOR_DYNAMIC
160 #define MPI_WIN_FLAVOR_SHARED   MPIX_WIN_FLAVOR_SHARED
161 #define PyMPI_HAVE_MPI_WIN_MODEL 1
162 #define PyMPI_HAVE_MPI_WIN_SEPARATE 1
163 #define PyMPI_HAVE_MPI_WIN_UNIFIED 1
164 #define MPI_WIN_MODEL    MPIX_WIN_MODEL
165 #define MPI_WIN_SEPARATE MPIX_WIN_SEPARATE
166 #define MPI_WIN_UNIFIED  MPIX_WIN_UNIFIED
167 #define PyMPI_HAVE_MPI_Win_allocate 1
168 #define MPI_Win_allocate MPIX_Win_allocate
169 #define PyMPI_HAVE_MPI_Win_allocate_shared 1
170 #define PyMPI_HAVE_MPI_Win_shared_query 1
171 #define MPI_Win_allocate_shared MPIX_Win_allocate_shared
172 #define MPI_Win_shared_query    MPIX_Win_shared_query
173 #define PyMPI_HAVE_MPI_Win_create_dynamic 1
174 #define PyMPI_HAVE_MPI_Win_attach 1
175 #define PyMPI_HAVE_MPI_Win_detach 1
176 #define MPI_Win_create_dynamic  MPIX_Win_create_dynamic
177 #define MPI_Win_attach          MPIX_Win_attach
178 #define MPI_Win_detach          MPIX_Win_detach
179 /*
180 #define PyMPI_HAVE_MPI_Win_set_info 1
181 #define PyMPI_HAVE_MPI_Win_get_info 1
182 #define MPI_Win_set_info MPIX_Win_set_info
183 #define MPI_Win_get_info MPIX_Win_get_info
184 */
185 #define PyMPI_HAVE_MPI_Get_accumulate 1
186 #define PyMPI_HAVE_MPI_Fetch_and_op 1
187 #define PyMPI_HAVE_MPI_Compare_and_swap 1
188 #define MPI_Get_accumulate   MPIX_Get_accumulate
189 #define MPI_Fetch_and_op     MPIX_Fetch_and_op
190 #define MPI_Compare_and_swap MPIX_Compare_and_swap
191 #define PyMPI_HAVE_MPI_Rget 1
192 #define PyMPI_HAVE_MPI_Rput 1
193 #define PyMPI_HAVE_MPI_Raccumulate 1
194 #define PyMPI_HAVE_MPI_Rget_accumulate 1
195 #define MPI_Rget            MPIX_Rget
196 #define MPI_Rput            MPIX_Rput
197 #define MPI_Raccumulate     MPIX_Raccumulate
198 #define MPI_Rget_accumulate MPIX_Rget_accumulate
199 #define PyMPI_HAVE_MPI_Win_lock_all 1
200 #define PyMPI_HAVE_MPI_Win_unlock_all 1
201 #define PyMPI_HAVE_MPI_Win_flush 1
202 #define PyMPI_HAVE_MPI_Win_flush_all 1
203 #define PyMPI_HAVE_MPI_Win_flush_local 1
204 #define PyMPI_HAVE_MPI_Win_flush_local_all 1
205 #define PyMPI_HAVE_MPI_Win_sync
206 #define MPI_Win_lock_all        MPIX_Win_lock_all
207 #define MPI_Win_unlock_all      MPIX_Win_unlock_all
208 #define MPI_Win_flush           MPIX_Win_flush
209 #define MPI_Win_flush_all       MPIX_Win_flush_all
210 #define MPI_Win_flush_local     MPIX_Win_flush_local
211 #define MPI_Win_flush_local_all MPIX_Win_flush_local_all
212 #define MPI_Win_sync            MPIX_Win_sync
213 #define PyMPI_HAVE_MPI_ERR_RMA_RANGE 1
214 #define PyMPI_HAVE_MPI_ERR_RMA_ATTACH 1
215 #define PyMPI_HAVE_MPI_ERR_RMA_SHARED 1
216 #define PyMPI_HAVE_MPI_ERR_RMA_FLAVOR 1
217 #define MPI_ERR_RMA_RANGE  MPIX_ERR_RMA_RANGE
218 #define MPI_ERR_RMA_ATTACH MPIX_ERR_RMA_ATTACH
219 #define MPI_ERR_RMA_SHARED MPIX_ERR_RMA_SHARED
220 #define MPI_ERR_RMA_FLAVOR MPIX_ERR_RMA_WRONG_FLAVOR
221 
222 /*
223 #define PyMPI_HAVE_MPI_MAX_LIBRARY_VERSION_STRING 1
224 #define PyMPI_HAVE_MPI_Get_library_version 1
225 #define PyMPI_HAVE_MPI_INFO_ENV 1
226 #define MPI_MAX_LIBRARY_VERSION_STRING MPIX_MAX_LIBRARY_VERSION_STRING
227 #define MPI_Get_library_version        MPIX_Get_library_version
228 #define MPI_INFO_ENV                   MPIX_INFO_ENV
229 */
230 
231 #endif /* MPICH2 < 1.5*/
232 #endif /* MPI    < 3.0*/
233 
234 #endif /* !PyMPI_CONFIG_MPICH2_H */
235