mpi.h.in 96.6 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*  
 *  (C) 2001 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */
/* @configure_input@ */
#ifndef MPI_INCLUDED
#define MPI_INCLUDED

/* user include file for MPI programs */

/* Keep C++ compilers from getting confused */
#if defined(__cplusplus)
extern "C" {
#endif

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#if defined(__has_attribute)
#  if __has_attribute(pointer_with_type_tag) && \
      __has_attribute(type_tag_for_datatype) && \
      !defined(MPICH_NO_ATTR_TYPE_TAGS)
#    define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx)  __attribute__((pointer_with_type_tag(MPI,buffer_idx,type_idx)))
#    define MPICH_ATTR_TYPE_TAG(type)                               __attribute__((type_tag_for_datatype(MPI,type)))
#    define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type)             __attribute__((type_tag_for_datatype(MPI,type,layout_compatible)))
#    define MPICH_ATTR_TYPE_TAG_MUST_BE_NULL()                      __attribute__((type_tag_for_datatype(MPI,void,must_be_null)))
#    include <stddef.h>
#  endif
#endif

#if !defined(MPICH_ATTR_POINTER_WITH_TYPE_TAG)
#  define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx)
#  define MPICH_ATTR_TYPE_TAG(type)
#  define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type)
#  define MPICH_ATTR_TYPE_TAG_MUST_BE_NULL()
#endif

#if !defined(INT8_C)
/* stdint.h was not included, see if we can get it */
#  if defined(__cplusplus)
#    if __cplusplus >= 201103
#      include <cstdint>
#    endif
#  endif
#endif

#if !defined(INT8_C)
/* stdint.h was not included, see if we can get it */
#  if defined(__STDC_VERSION__)
#    if __STDC_VERSION__ >= 199901
#      include <stdint.h>
#    endif
#  endif
#endif

#if defined(INT8_C)
/* stdint.h was included, so we can annotate these types */
#  define MPICH_ATTR_TYPE_TAG_STDINT(type) MPICH_ATTR_TYPE_TAG(type)
#else
#  define MPICH_ATTR_TYPE_TAG_STDINT(type)
#endif

61
#ifdef __STDC_VERSION__ 
62
63
64
65
66
#if __STDC_VERSION__ >= 199901
#  define MPICH_ATTR_TYPE_TAG_C99(type) MPICH_ATTR_TYPE_TAG(type)
#else
#  define MPICH_ATTR_TYPE_TAG_C99(type)
#endif
67
68
69
#else 
#  define MPICH_ATTR_TYPE_TAG_C99(type)
#endif
70
71
72
73
74
75
76

#if defined(__cplusplus)
#  define MPICH_ATTR_TYPE_TAG_CXX(type) MPICH_ATTR_TYPE_TAG(type)
#else
#  define MPICH_ATTR_TYPE_TAG_CXX(type)
#endif

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* Results of the compare operations. */
#define MPI_IDENT     0
#define MPI_CONGRUENT 1
#define MPI_SIMILAR   2
#define MPI_UNEQUAL   3

typedef int MPI_Datatype;
#define MPI_CHAR           ((MPI_Datatype)@MPI_CHAR@)
#define MPI_SIGNED_CHAR    ((MPI_Datatype)@MPI_SIGNED_CHAR@)
#define MPI_UNSIGNED_CHAR  ((MPI_Datatype)@MPI_UNSIGNED_CHAR@)
#define MPI_BYTE           ((MPI_Datatype)@MPI_BYTE@)
#define MPI_WCHAR          ((MPI_Datatype)@MPI_WCHAR@)
#define MPI_SHORT          ((MPI_Datatype)@MPI_SHORT@)
#define MPI_UNSIGNED_SHORT ((MPI_Datatype)@MPI_UNSIGNED_SHORT@)
#define MPI_INT            ((MPI_Datatype)@MPI_INT@)
#define MPI_UNSIGNED       ((MPI_Datatype)@MPI_UNSIGNED_INT@)
#define MPI_LONG           ((MPI_Datatype)@MPI_LONG@)
#define MPI_UNSIGNED_LONG  ((MPI_Datatype)@MPI_UNSIGNED_LONG@)
#define MPI_FLOAT          ((MPI_Datatype)@MPI_FLOAT@)
#define MPI_DOUBLE         ((MPI_Datatype)@MPI_DOUBLE@)
#define MPI_LONG_DOUBLE    ((MPI_Datatype)@MPI_LONG_DOUBLE@)
#define MPI_LONG_LONG_INT  ((MPI_Datatype)@MPI_LONG_LONG@)
#define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)@MPI_UNSIGNED_LONG_LONG@)
#define MPI_LONG_LONG      MPI_LONG_LONG_INT

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
static const MPI_Datatype mpich_mpi_char               MPICH_ATTR_TYPE_TAG(char)               = MPI_CHAR;
static const MPI_Datatype mpich_mpi_signed_char        MPICH_ATTR_TYPE_TAG(signed char)        = MPI_SIGNED_CHAR;
static const MPI_Datatype mpich_mpi_unsigned_char      MPICH_ATTR_TYPE_TAG(unsigned char)      = MPI_UNSIGNED_CHAR;
/*static const MPI_Datatype mpich_mpi_byte               MPICH_ATTR_TYPE_TAG(char)               = MPI_BYTE;*/
static const MPI_Datatype mpich_mpi_wchar              MPICH_ATTR_TYPE_TAG(wchar_t)            = MPI_WCHAR;
static const MPI_Datatype mpich_mpi_short              MPICH_ATTR_TYPE_TAG(short)              = MPI_SHORT;
static const MPI_Datatype mpich_mpi_unsigned_short     MPICH_ATTR_TYPE_TAG(unsigned short)     = MPI_UNSIGNED_SHORT;
static const MPI_Datatype mpich_mpi_int                MPICH_ATTR_TYPE_TAG(int)                = MPI_INT;
static const MPI_Datatype mpich_mpi_unsigned           MPICH_ATTR_TYPE_TAG(unsigned)           = MPI_UNSIGNED;
static const MPI_Datatype mpich_mpi_long               MPICH_ATTR_TYPE_TAG(long)               = MPI_LONG;
static const MPI_Datatype mpich_mpi_unsigned_long      MPICH_ATTR_TYPE_TAG(unsigned long)      = MPI_UNSIGNED_LONG;
static const MPI_Datatype mpich_mpi_float              MPICH_ATTR_TYPE_TAG(float)              = MPI_FLOAT;
static const MPI_Datatype mpich_mpi_double             MPICH_ATTR_TYPE_TAG(double)             = MPI_DOUBLE;
static const MPI_Datatype mpich_mpi_long_double        MPICH_ATTR_TYPE_TAG(long double)        = MPI_LONG_DOUBLE;
static const MPI_Datatype mpich_mpi_long_long_int      MPICH_ATTR_TYPE_TAG(long long int)      = MPI_LONG_LONG_INT;
static const MPI_Datatype mpich_mpi_unsigned_long_long MPICH_ATTR_TYPE_TAG(unsigned long long) = MPI_UNSIGNED_LONG_LONG;

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#define MPI_PACKED         ((MPI_Datatype)@MPI_PACKED@)
#define MPI_LB             ((MPI_Datatype)@MPI_LB@)
#define MPI_UB             ((MPI_Datatype)@MPI_UB@)

/* 
   The layouts for the types MPI_DOUBLE_INT etc are simply
   struct { 
       double var;
       int    loc;
   }
   This is documented in the man pages on the various datatypes.   
 */
#define MPI_FLOAT_INT         ((MPI_Datatype)@MPI_FLOAT_INT@)
#define MPI_DOUBLE_INT        ((MPI_Datatype)@MPI_DOUBLE_INT@)
#define MPI_LONG_INT          ((MPI_Datatype)@MPI_LONG_INT@)
#define MPI_SHORT_INT         ((MPI_Datatype)@MPI_SHORT_INT@)
#define MPI_2INT              ((MPI_Datatype)@MPI_2INT@)
#define MPI_LONG_DOUBLE_INT   ((MPI_Datatype)@MPI_LONG_DOUBLE_INT@)

138
139
140
141
142
143
144
145
146
147
148
149
150
151
struct mpich_struct_mpi_float_int       { float f; int i; };
struct mpich_struct_mpi_double_int      { double d; int i; };
struct mpich_struct_mpi_long_int        { long l; int i; };
struct mpich_struct_mpi_short_int       { short s; int i; };
struct mpich_struct_mpi_2int            { int i1; int i2; };
struct mpich_struct_mpi_long_double_int { long double ld; int i; };

static const MPI_Datatype mpich_mpi_float_int       MPICH_ATTR_TYPE_TAG(struct mpich_struct_mpi_float_int)       = MPI_FLOAT_INT;
static const MPI_Datatype mpich_mpi_double_int      MPICH_ATTR_TYPE_TAG(struct mpich_struct_mpi_double_int)      = MPI_DOUBLE_INT;
static const MPI_Datatype mpich_mpi_long_int        MPICH_ATTR_TYPE_TAG(struct mpich_struct_mpi_long_int)        = MPI_LONG_INT;
static const MPI_Datatype mpich_mpi_short_int       MPICH_ATTR_TYPE_TAG(struct mpich_struct_mpi_short_int)       = MPI_SHORT_INT;
static const MPI_Datatype mpich_mpi_2int            MPICH_ATTR_TYPE_TAG(struct mpich_struct_mpi_2int)            = MPI_2INT;
static const MPI_Datatype mpich_mpi_long_double_int MPICH_ATTR_TYPE_TAG(struct mpich_struct_mpi_long_double_int) = MPI_LONG_DOUBLE_INT;

152
153
154
155
156
157
158
159
/* Fortran types */
#define MPI_COMPLEX           ((MPI_Datatype)@MPI_COMPLEX@)
#define MPI_DOUBLE_COMPLEX    ((MPI_Datatype)@MPI_DOUBLE_COMPLEX@)
#define MPI_LOGICAL           ((MPI_Datatype)@MPI_LOGICAL@)
#define MPI_REAL              ((MPI_Datatype)@MPI_REAL@)
#define MPI_DOUBLE_PRECISION  ((MPI_Datatype)@MPI_DOUBLE_PRECISION@)
#define MPI_INTEGER           ((MPI_Datatype)@MPI_INTEGER@)
#define MPI_2INTEGER          ((MPI_Datatype)@MPI_2INTEGER@)
160
161
162
163
164
165
166
167
/* 
 * MPI_2COMPLEX and MPI_2DOUBLE_COMPLEX were defined by accident in 
 * MPI 1.0 and removed in MPI 1.1.  
 *
 * This definition provides backward compatibility.  These definitions
 * will be removed in a subsequent MPICH release
 */
#ifdef MPICH_DEFINE_2COMPLEX
168
169
#define MPI_2COMPLEX          ((MPI_Datatype)@MPI_2COMPLEX@)
#define MPI_2DOUBLE_COMPLEX   ((MPI_Datatype)@MPI_2DOUBLE_COMPLEX@)
170
#endif 
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#define MPI_2REAL             ((MPI_Datatype)@MPI_2REAL@)
#define MPI_2DOUBLE_PRECISION ((MPI_Datatype)@MPI_2DOUBLE_PRECISION@)
#define MPI_CHARACTER         ((MPI_Datatype)@MPI_CHARACTER@)

/* Size-specific types (see MPI-2, 10.2.5) */
#define MPI_REAL4             ((MPI_Datatype)@MPI_REAL4@)
#define MPI_REAL8             ((MPI_Datatype)@MPI_REAL8@)
#define MPI_REAL16            ((MPI_Datatype)@MPI_REAL16@)
#define MPI_COMPLEX8          ((MPI_Datatype)@MPI_COMPLEX8@)
#define MPI_COMPLEX16         ((MPI_Datatype)@MPI_COMPLEX16@)
#define MPI_COMPLEX32         ((MPI_Datatype)@MPI_COMPLEX32@)
#define MPI_INTEGER1          ((MPI_Datatype)@MPI_INTEGER1@)
#define MPI_INTEGER2          ((MPI_Datatype)@MPI_INTEGER2@)
#define MPI_INTEGER4          ((MPI_Datatype)@MPI_INTEGER4@)
#define MPI_INTEGER8          ((MPI_Datatype)@MPI_INTEGER8@)
#define MPI_INTEGER16         ((MPI_Datatype)@MPI_INTEGER16@)

188
189
190
191
192
193
194
195
196
197
/* C99 fixed-width datatypes */
#define MPI_INT8_T            ((MPI_Datatype)@MPI_INT8_T@)
#define MPI_INT16_T           ((MPI_Datatype)@MPI_INT16_T@)
#define MPI_INT32_T           ((MPI_Datatype)@MPI_INT32_T@)
#define MPI_INT64_T           ((MPI_Datatype)@MPI_INT64_T@)
#define MPI_UINT8_T           ((MPI_Datatype)@MPI_UINT8_T@)
#define MPI_UINT16_T          ((MPI_Datatype)@MPI_UINT16_T@)
#define MPI_UINT32_T          ((MPI_Datatype)@MPI_UINT32_T@)
#define MPI_UINT64_T          ((MPI_Datatype)@MPI_UINT64_T@)

198
199
200
201
202
203
204
205
206
static const MPI_Datatype mpich_mpi_int8_t   MPICH_ATTR_TYPE_TAG_STDINT(int8_t)   = MPI_INT8_T;
static const MPI_Datatype mpich_mpi_int16_t  MPICH_ATTR_TYPE_TAG_STDINT(int16_t)  = MPI_INT16_T;
static const MPI_Datatype mpich_mpi_int32_t  MPICH_ATTR_TYPE_TAG_STDINT(int32_t)  = MPI_INT32_T;
static const MPI_Datatype mpich_mpi_int64_t  MPICH_ATTR_TYPE_TAG_STDINT(int64_t)  = MPI_INT64_T;
static const MPI_Datatype mpich_mpi_uint8_t  MPICH_ATTR_TYPE_TAG_STDINT(uint8_t)  = MPI_UINT8_T;
static const MPI_Datatype mpich_mpi_uint16_t MPICH_ATTR_TYPE_TAG_STDINT(uint16_t) = MPI_UINT16_T;
static const MPI_Datatype mpich_mpi_uint32_t MPICH_ATTR_TYPE_TAG_STDINT(uint32_t) = MPI_UINT32_T;
static const MPI_Datatype mpich_mpi_uint64_t MPICH_ATTR_TYPE_TAG_STDINT(uint64_t) = MPI_UINT64_T;

207
208
209
210
211
212
213
/* other C99 types */
#define MPI_C_BOOL                 ((MPI_Datatype)@MPI_C_BOOL@)
#define MPI_C_FLOAT_COMPLEX        ((MPI_Datatype)@MPI_C_FLOAT_COMPLEX@)
#define MPI_C_COMPLEX              MPI_C_FLOAT_COMPLEX
#define MPI_C_DOUBLE_COMPLEX       ((MPI_Datatype)@MPI_C_DOUBLE_COMPLEX@)
#define MPI_C_LONG_DOUBLE_COMPLEX  ((MPI_Datatype)@MPI_C_LONG_DOUBLE_COMPLEX@)

214
215
216
217
218
static const MPI_Datatype mpich_mpi_c_bool                MPICH_ATTR_TYPE_TAG_C99(_Bool)           = MPI_C_BOOL;
static const MPI_Datatype mpich_mpi_c_float_complex       MPICH_ATTR_TYPE_TAG_C99(float _Complex)  = MPI_C_FLOAT_COMPLEX;
static const MPI_Datatype mpich_mpi_c_double_complex      MPICH_ATTR_TYPE_TAG_C99(double _Complex) = MPI_C_DOUBLE_COMPLEX;
static const MPI_Datatype mpich_mpi_c_long_double_complex MPICH_ATTR_TYPE_TAG_C99(double _Complex) = MPI_C_LONG_DOUBLE_COMPLEX;

219
220
221
222
/* address/offset types */
#define MPI_AINT          ((MPI_Datatype)@MPI_AINT_DATATYPE@)
#define MPI_OFFSET        ((MPI_Datatype)@MPI_OFFSET_DATATYPE@)

223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
/* typeclasses */
#define MPI_TYPECLASS_REAL 1
#define MPI_TYPECLASS_INTEGER 2
#define MPI_TYPECLASS_COMPLEX 3

/* Communicators */
typedef int MPI_Comm;
#define MPI_COMM_WORLD ((MPI_Comm)0x44000000)
#define MPI_COMM_SELF  ((MPI_Comm)0x44000001)

/* Groups */
typedef int MPI_Group;
#define MPI_GROUP_EMPTY ((MPI_Group)0x48000000)

/* RMA and Windows */
typedef int MPI_Win;
#define MPI_WIN_NULL ((MPI_Win)0x20000000)

/* File and IO */
/* This define lets ROMIO know that MPI_File has been defined */
#define MPI_FILE_DEFINED
/* ROMIO uses a pointer for MPI_File objects.  This must be the same definition
   as in src/mpi/romio/include/mpio.h.in  */
typedef struct ADIOI_FileD *MPI_File;
#define MPI_FILE_NULL ((MPI_File)0)

/* Collective operations */
typedef int MPI_Op;

#define MPI_MAX     (MPI_Op)(0x58000001)
#define MPI_MIN     (MPI_Op)(0x58000002)
#define MPI_SUM     (MPI_Op)(0x58000003)
#define MPI_PROD    (MPI_Op)(0x58000004)
#define MPI_LAND    (MPI_Op)(0x58000005)
#define MPI_BAND    (MPI_Op)(0x58000006)
#define MPI_LOR     (MPI_Op)(0x58000007)
#define MPI_BOR     (MPI_Op)(0x58000008)
#define MPI_LXOR    (MPI_Op)(0x58000009)
#define MPI_BXOR    (MPI_Op)(0x5800000a)
#define MPI_MINLOC  (MPI_Op)(0x5800000b)
#define MPI_MAXLOC  (MPI_Op)(0x5800000c)
#define MPI_REPLACE (MPI_Op)(0x5800000d)
265
#define MPI_NO_OP   (MPI_Op)(0x5800000e)
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287

/* Permanent key values */
/* C Versions (return pointer to value),
   Fortran Versions (return integer value).
   Handled directly by the attribute value routine
   
   DO NOT CHANGE THESE.  The values encode:
   builtin kind (0x1 in bit 30-31)
   Keyval object (0x9 in bits 26-29)
   for communicator (0x1 in bits 22-25)
   
   Fortran versions of the attributes are formed by adding one to
   the C version.
 */
#define MPI_TAG_UB           0x64400001
#define MPI_HOST             0x64400003
#define MPI_IO               0x64400005
#define MPI_WTIME_IS_GLOBAL  0x64400007
#define MPI_UNIVERSE_SIZE    0x64400009
#define MPI_LASTUSEDCODE     0x6440000b
#define MPI_APPNUM           0x6440000d

288
/* In addition, there are 5 predefined window attributes that are
289
   defined for every window */
290
291
292
#define MPI_WIN_BASE          0x66000001
#define MPI_WIN_SIZE          0x66000003
#define MPI_WIN_DISP_UNIT     0x66000005
293
294
#define MPI_WIN_CREATE_FLAVOR 0x66000007
#define MPI_WIN_MODEL         0x66000009
295
296
297
298
299
300
301
302

/* Define some null objects */
#define MPI_COMM_NULL      ((MPI_Comm)0x04000000)
#define MPI_OP_NULL        ((MPI_Op)0x18000000)
#define MPI_GROUP_NULL     ((MPI_Group)0x08000000)
#define MPI_DATATYPE_NULL  ((MPI_Datatype)0x0c000000)
#define MPI_REQUEST_NULL   ((MPI_Request)0x2c000000)
#define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0x14000000)
303
304
#define MPI_MESSAGE_NULL   ((MPI_Message)MPI_REQUEST_NULL)
#define MPI_MESSAGE_NO_PROC ((MPI_Message)0x6c000000)
305

306
307
static const MPI_Datatype mpich_mpi_datatype_null MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() = MPI_DATATYPE_NULL;

308
309
/* These are only guesses; make sure you change them in mpif.h as well */
#define MPI_MAX_PROCESSOR_NAME @MPI_MAX_PROCESSOR_NAME@
310
#define MPI_MAX_ERROR_STRING   @MPI_MAX_ERROR_STRING@
311
312
313
314
315
316
317
#define MPI_MAX_PORT_NAME      256
#define MPI_MAX_OBJECT_NAME    128

/* Pre-defined constants */
#define MPI_UNDEFINED      (-32766)
#define MPI_KEYVAL_INVALID 0x24000000

318
/* MPI-3 window flavors */
319
typedef enum MPIR_Win_flavor_e {
320
321
322
323
    MPI_WIN_FLAVOR_CREATE      = 1,
    MPI_WIN_FLAVOR_ALLOCATE    = 2,
    MPI_WIN_FLAVOR_DYNAMIC     = 3,
    MPI_WIN_FLAVOR_SHARED      = 4
324
} MPIR_Win_flavor_t;
325
326

/* MPI-3 window consistency models */
327
typedef enum MPIR_Win_model_e {
328
329
    MPI_WIN_SEPARATE   = 1,
    MPI_WIN_UNIFIED    = 2
330
} MPIR_Win_model_t;
331

332
333
334
335
/* Upper bound on the overhead in bsend for each message buffer */
#define MPI_BSEND_OVERHEAD @BSEND_OVERHEAD@

/* Topology types */
336
typedef enum MPIR_Topo_type { MPI_GRAPH=1, MPI_CART=2, MPI_DIST_GRAPH=3 } MPIR_Topo_type;
337
338

#define MPI_BOTTOM      (void *)0
339
extern int * const MPI_UNWEIGHTED;
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

#define MPI_PROC_NULL   (-1)
#define MPI_ANY_SOURCE 	(-2)
#define MPI_ROOT        (-3)
#define MPI_ANY_TAG     (-1)

#define MPI_LOCK_EXCLUSIVE  234
#define MPI_LOCK_SHARED     235

/* C functions */
typedef void (MPI_Handler_function) ( MPI_Comm *, int *, ... );
typedef int (MPI_Comm_copy_attr_function)(MPI_Comm, int, void *, void *, 
					  void *, int *);
typedef int (MPI_Comm_delete_attr_function)(MPI_Comm, int, void *, void *);
typedef int (MPI_Type_copy_attr_function)(MPI_Datatype, int, void *, void *, 
					  void *, int *);
typedef int (MPI_Type_delete_attr_function)(MPI_Datatype, int, void *, void *);
typedef int (MPI_Win_copy_attr_function)(MPI_Win, int, void *, void *, void *,
					 int *);
typedef int (MPI_Win_delete_attr_function)(MPI_Win, int, void *, void *);
360
361
362
363
364
365
366
367
/* added in MPI-2.2 */
typedef void (MPI_Comm_errhandler_function)(MPI_Comm *, int *, ...);
typedef void (MPI_File_errhandler_function)(MPI_File *, int *, ...);
typedef void (MPI_Win_errhandler_function)(MPI_Win *, int *, ...);
/* names that were added in MPI-2.0 and deprecated in MPI-2.2 */
typedef MPI_Comm_errhandler_function MPI_Comm_errhandler_fn;
typedef MPI_File_errhandler_function MPI_File_errhandler_fn;
typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn;
368
369
370
371
372

/* Built in (0x1 in 30-31), errhandler (0x5 in bits 26-29, allkind (0
   in 22-25), index in the low bits */
#define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)0x54000000)
#define MPI_ERRORS_RETURN    ((MPI_Errhandler)0x54000001)
373
374
375
376
377
/* MPIR_ERRORS_THROW_EXCEPTIONS is not part of the MPI standard, it is here to
   facilitate the c++ binding which has MPI::ERRORS_THROW_EXCEPTIONS. 
   Using the MPIR prefix preserved the MPI_ names for objects defined by
   the standard. */
#define MPIR_ERRORS_THROW_EXCEPTIONS ((MPI_Errhandler)0x54000002)
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
typedef int MPI_Errhandler;

/* Make the C names for the dup function mixed case.
   This is required for systems that use all uppercase names for Fortran 
   externals.  */
/* MPI 1 names */
#define MPI_NULL_COPY_FN   ((MPI_Copy_function *)0)
#define MPI_NULL_DELETE_FN ((MPI_Delete_function *)0)
#define MPI_DUP_FN         MPIR_Dup_fn
/* MPI 2 names */
#define MPI_COMM_NULL_COPY_FN ((MPI_Comm_copy_attr_function*)0)
#define MPI_COMM_NULL_DELETE_FN ((MPI_Comm_delete_attr_function*)0)
#define MPI_COMM_DUP_FN  ((MPI_Comm_copy_attr_function *)MPI_DUP_FN)
#define MPI_WIN_NULL_COPY_FN ((MPI_Win_copy_attr_function*)0)
#define MPI_WIN_NULL_DELETE_FN ((MPI_Win_delete_attr_function*)0)
#define MPI_WIN_DUP_FN   ((MPI_Win_copy_attr_function*)MPI_DUP_FN)
#define MPI_TYPE_NULL_COPY_FN ((MPI_Type_copy_attr_function*)0)
#define MPI_TYPE_NULL_DELETE_FN ((MPI_Type_delete_attr_function*)0)
#define MPI_TYPE_DUP_FN ((MPI_Type_copy_attr_function*)MPI_DUP_FN)

/* MPI request opjects */
typedef int MPI_Request;

401
/* MPI message objects for Mprobe and related functions */
402
typedef int MPI_Message;
403

404
405
406
407
408
409
410
/* User combination function */
typedef void (MPI_User_function) ( void *, void *, int *, MPI_Datatype * ); 

/* MPI Attribute copy and delete functions */
typedef int (MPI_Copy_function) ( MPI_Comm, int, void *, void *, void *, int * );
typedef int (MPI_Delete_function) ( MPI_Comm, int, void *, void * );

411
412
413
#define MPI_VERSION    3
#define MPI_SUBVERSION 0
#define MPICH_NAME     3
414
415
#define MPICH2         1
#define MPICH_HAS_C2F  1
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440


/* MPICH2_VERSION is the version string. MPICH2_NUMVERSION is the
 * numeric version that can be used in numeric comparisons.
 *
 * MPICH2_VERSION uses the following format:
 * Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER]
 * Example: 1.0.7rc1 has
 *          MAJ = 1
 *          MIN = 0
 *          REV = 7
 *          EXT = rc
 *          EXT_NUMBER = 1
 *
 * MPICH2_NUMVERSION will convert EXT to a format number:
 *          ALPHA (a) = 0
 *          BETA (b)  = 1
 *          RC (rc)   = 2
 *          PATCH (p) = 3
 * Regular releases are treated as patch 0
 *
 * Numeric version will have 1 digit for MAJ, 2 digits for MIN, 2
 * digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER. So,
 * 1.0.7rc1 will have the numeric version 10007201.
 */
441
442
#define MPICH2_VERSION "@MPICH2_VERSION@"
#define MPICH2_NUMVERSION @MPICH2_NUMVERSION@
443

444
445
446
447
448
449
#define MPICH2_RELEASE_TYPE_ALPHA  0
#define MPICH2_RELEASE_TYPE_BETA   1
#define MPICH2_RELEASE_TYPE_RC     2
#define MPICH2_RELEASE_TYPE_PATCH  3

#define MPICH2_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \
450
    (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH))
451

452
/* for the datatype decoders */
453
enum MPIR_Combiner_enum {
454
455
456
457
458
459
460
461
462
463
    MPI_COMBINER_NAMED            = 1,
    MPI_COMBINER_DUP              = 2,
    MPI_COMBINER_CONTIGUOUS       = 3, 
    MPI_COMBINER_VECTOR           = 4,
    MPI_COMBINER_HVECTOR_INTEGER  = 5,
    MPI_COMBINER_HVECTOR          = 6,
    MPI_COMBINER_INDEXED          = 7,
    MPI_COMBINER_HINDEXED_INTEGER = 8, 
    MPI_COMBINER_HINDEXED         = 9, 
    MPI_COMBINER_INDEXED_BLOCK    = 10, 
464
    MPI_COMBINER_HINDEXED_BLOCK   = 11,
465
466
467
468
469
470
471
472
    MPI_COMBINER_STRUCT_INTEGER   = 12,
    MPI_COMBINER_STRUCT           = 13,
    MPI_COMBINER_SUBARRAY         = 14,
    MPI_COMBINER_DARRAY           = 15,
    MPI_COMBINER_F90_REAL         = 16,
    MPI_COMBINER_F90_COMPLEX      = 17,
    MPI_COMBINER_F90_INTEGER      = 18,
    MPI_COMBINER_RESIZED          = 19
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
};

/* for info */
typedef int MPI_Info;
#define MPI_INFO_NULL         ((MPI_Info)0x1c000000)
#define MPI_MAX_INFO_KEY       255
#define MPI_MAX_INFO_VAL      1024

/* for subarray and darray constructors */
#define MPI_ORDER_C              56
#define MPI_ORDER_FORTRAN        57
#define MPI_DISTRIBUTE_BLOCK    121
#define MPI_DISTRIBUTE_CYCLIC   122
#define MPI_DISTRIBUTE_NONE     123
#define MPI_DISTRIBUTE_DFLT_DARG -49767

#define MPI_IN_PLACE  (void *) -1

/* asserts for one-sided communication */
#define MPI_MODE_NOCHECK      1024
#define MPI_MODE_NOSTORE      2048
#define MPI_MODE_NOPUT        4096
#define MPI_MODE_NOPRECEDE    8192
#define MPI_MODE_NOSUCCEED   16384 

498
499
/* predefined types for MPI_Comm_split_type */
#define MPI_COMM_TYPE_SHARED    1
500

501
502
503
/* Definitions that are determined by configure. */
typedef @MPI_AINT@ MPI_Aint;
typedef @MPI_FINT@ MPI_Fint;
504
505
506

static const MPI_Datatype mpich_mpi_aint   MPICH_ATTR_TYPE_TAG(MPI_Aint)   = MPI_AINT;

507
508
509
/* FIXME: The following two definition are not defined by MPI and must not be
   included in the mpi.h file, as the MPI namespace is reserved to the MPI 
   standard */
510
511
512
#define MPI_AINT_FMT_DEC_SPEC "@MPI_AINT_FMT_DEC_SPEC@"
#define MPI_AINT_FMT_HEX_SPEC "@MPI_AINT_FMT_HEX_SPEC@"

513
514
515
516
517
518
519
/* Let ROMIO know that MPI_Offset is already defined */
#define HAVE_MPI_OFFSET
/* MPI_OFFSET_TYPEDEF is set in configure and is 
      typedef $MPI_OFFSET MPI_Offset;
   where $MPI_OFFSET is the correct C type */
@MPI_OFFSET_TYPEDEF@

520
521
static const MPI_Datatype mpich_mpi_offset MPICH_ATTR_TYPE_TAG(MPI_Offset) = MPI_OFFSET;

522
523
524
525
526
527
528
529
530
531
/* The order of these elements must match that in mpif.h */
typedef struct MPI_Status {
    int count;
    int cancelled;
    int MPI_SOURCE;
    int MPI_TAG;
    int MPI_ERROR;
    @EXTRA_STATUS_DECL@
} MPI_Status;

532
/* types for the MPI_T_ interface */
533
struct MPIR_T_enum;
534
typedef struct MPIR_T_enum * MPI_T_enum;
535
struct MPIR_T_cvar_handle;
536
typedef struct MPIR_T_cvar_handle * MPI_T_cvar_handle;
537
struct MPIR_T_pvar_handle;
538
typedef struct MPIR_T_pvar_handle * MPI_T_pvar_handle;
539
struct MPIR_T_pvar_session;
540
typedef struct MPIR_T_pvar_session * MPI_T_pvar_session;
541

542
543
/* extra const at front would be safer, but is incompatible with MPI_T_ prototypes */
extern struct MPIR_T_pvar_handle * const MPI_T_PVAR_ALL_HANDLES;
544

545
546
547
548
#define MPI_T_ENUM_NULL         ((MPI_T_enum)NULL)
#define MPI_T_CVAR_HANDLE_NULL  ((MPI_T_cvar_handle)NULL)
#define MPI_T_PVAR_HANDLE_NULL  ((MPI_T_pvar_handle)NULL)
#define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session)NULL)
549
550
551
552
553
554
555
556
557

/* the MPI_T_ interface requires that these VERBOSITY constants occur in this
 * relative order with increasing values */
enum MPIR_T_verbosity_t {
    /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
     * extension */
    MPIX_T_VERBOSITY_INVALID = 0,

    /* arbitrarily shift values to aid debugging and reduce accidental errors */
558
559
560
    MPI_T_VERBOSITY_USER_BASIC = 221,
    MPI_T_VERBOSITY_USER_DETAIL,
    MPI_T_VERBOSITY_USER_ALL,
561

562
563
564
    MPI_T_VERBOSITY_TUNER_BASIC,
    MPI_T_VERBOSITY_TUNER_DETAIL,
    MPI_T_VERBOSITY_TUNER_ALL,
565

566
567
568
    MPI_T_VERBOSITY_MPIDEV_BASIC,
    MPI_T_VERBOSITY_MPIDEV_DETAIL,
    MPI_T_VERBOSITY_MPIDEV_ALL
569
570
571
572
573
574
575
576
};

enum MPIR_T_bind_t {
    /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
     * extension */
    MPIX_T_BIND_INVALID = 0,

    /* arbitrarily shift values to aid debugging and reduce accidental errors */
577
578
579
580
581
582
583
584
585
586
587
    MPI_T_BIND_NO_OBJECT = 9700,
    MPI_T_BIND_MPI_COMM,
    MPI_T_BIND_MPI_DATATYPE,
    MPI_T_BIND_MPI_ERRHANDLER,
    MPI_T_BIND_MPI_FILE,
    MPI_T_BIND_MPI_GROUP,
    MPI_T_BIND_MPI_OP,
    MPI_T_BIND_MPI_REQUEST,
    MPI_T_BIND_MPI_WIN,
    MPI_T_BIND_MPI_MESSAGE,
    MPI_T_BIND_MPI_INFO
588
589
590
591
592
593
594
595
};

enum MPIR_T_scope_t {
    /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
     * extension */
    MPIX_T_SCOPE_INVALID = 0,

    /* arbitrarily shift values to aid debugging and reduce accidental errors */
596
597
598
599
600
601
    MPI_T_SCOPE_READONLY = 60439,
    MPI_T_SCOPE_LOCAL,
    MPI_T_SCOPE_GROUP,
    MPI_T_SCOPE_GROUP_EQ,
    MPI_T_SCOPE_ALL,
    MPI_T_SCOPE_ALL_EQ
602
603
604
605
606
607
608
609
};

enum MPIR_T_pvar_class_t {
    /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
     * extension */
    MPIX_T_PVAR_CLASS_INVALID = 0,

    /* arbitrarily shift values to aid debugging and reduce accidental errors */
610
611
612
613
614
615
616
617
618
619
    MPI_T_PVAR_CLASS_STATE = 240,
    MPI_T_PVAR_CLASS_LEVEL,
    MPI_T_PVAR_CLASS_SIZE,
    MPI_T_PVAR_CLASS_PERCENTAGE,
    MPI_T_PVAR_CLASS_HIGHWATERMARK,
    MPI_T_PVAR_CLASS_LOWWATERMARK,
    MPI_T_PVAR_CLASS_COUNTER,
    MPI_T_PVAR_CLASS_AGGREGATE,
    MPI_T_PVAR_CLASS_TIMER,
    MPI_T_PVAR_CLASS_GENERIC
620
621
};

622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
/* Handle conversion types/functions */

/* Programs that need to convert types used in MPICH should use these */
#define MPI_Comm_c2f(comm) (MPI_Fint)(comm)
#define MPI_Comm_f2c(comm) (MPI_Comm)(comm)
#define MPI_Type_c2f(datatype) (MPI_Fint)(datatype)
#define MPI_Type_f2c(datatype) (MPI_Datatype)(datatype)
#define MPI_Group_c2f(group) (MPI_Fint)(group)
#define MPI_Group_f2c(group) (MPI_Group)(group)
#define MPI_Info_c2f(info) (MPI_Fint)(info)
#define MPI_Info_f2c(info) (MPI_Info)(info)
#define MPI_Request_f2c(request) (MPI_Request)(request)
#define MPI_Request_c2f(request) (MPI_Fint)(request)
#define MPI_Op_c2f(op) (MPI_Fint)(op)
#define MPI_Op_f2c(op) (MPI_Op)(op)
#define MPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler)
#define MPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler)
#define MPI_Win_c2f(win)   (MPI_Fint)(win)
#define MPI_Win_f2c(win)   (MPI_Win)(win)
641
642
#define MPI_Message_c2f(msg) ((MPI_Fint)(msg))
#define MPI_Message_f2c(msg) ((MPI_Message)(msg))
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660

/* PMPI versions of the handle transfer functions.  See section 4.17 */
#define PMPI_Comm_c2f(comm) (MPI_Fint)(comm)
#define PMPI_Comm_f2c(comm) (MPI_Comm)(comm)
#define PMPI_Type_c2f(datatype) (MPI_Fint)(datatype)
#define PMPI_Type_f2c(datatype) (MPI_Datatype)(datatype)
#define PMPI_Group_c2f(group) (MPI_Fint)(group)
#define PMPI_Group_f2c(group) (MPI_Group)(group)
#define PMPI_Info_c2f(info) (MPI_Fint)(info)
#define PMPI_Info_f2c(info) (MPI_Info)(info)
#define PMPI_Request_f2c(request) (MPI_Request)(request)
#define PMPI_Request_c2f(request) (MPI_Fint)(request)
#define PMPI_Op_c2f(op) (MPI_Fint)(op)
#define PMPI_Op_f2c(op) (MPI_Op)(op)
#define PMPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler)
#define PMPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler)
#define PMPI_Win_c2f(win)   (MPI_Fint)(win)
#define PMPI_Win_f2c(win)   (MPI_Win)(win)
661
662
#define PMPI_Message_c2f(msg) ((MPI_Fint)(msg))
#define PMPI_Message_f2c(msg) ((MPI_Message)(msg))
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767

#define MPI_STATUS_IGNORE (MPI_Status *)1
#define MPI_STATUSES_IGNORE (MPI_Status *)1
#define MPI_ERRCODES_IGNORE (int *)0

/* See 4.12.5 for MPI_F_STATUS(ES)_IGNORE */
@MPIU_DLL_SPEC_DEF@
extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUS_IGNORE;
extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUSES_IGNORE;
/* The annotation MPIU_DLL_SPEC to the extern statements is used 
   as a hook for systems that require C extensions to correctly construct
   DLLs, and is defined as an empty string otherwise
 */

/* The MPI standard requires that the ARGV_NULL values be the same as
   NULL (see 5.3.2) */
#define MPI_ARGV_NULL (char **)0
#define MPI_ARGVS_NULL (char ***)0

/* For supported thread levels */
#define MPI_THREAD_SINGLE 0
#define MPI_THREAD_FUNNELED 1
#define MPI_THREAD_SERIALIZED 2
#define MPI_THREAD_MULTIPLE 3

/* Typedefs for generalized requests */
typedef int (MPI_Grequest_cancel_function)(void *, int); 
typedef int (MPI_Grequest_free_function)(void *); 
typedef int (MPI_Grequest_query_function)(void *, MPI_Status *); 

/* MPI's error classes */
#define MPI_SUCCESS          0      /* Successful return code */
/* Communication argument parameters */
#define MPI_ERR_BUFFER       1      /* Invalid buffer pointer */
#define MPI_ERR_COUNT        2      /* Invalid count argument */
#define MPI_ERR_TYPE         3      /* Invalid datatype argument */
#define MPI_ERR_TAG          4      /* Invalid tag argument */
#define MPI_ERR_COMM         5      /* Invalid communicator */
#define MPI_ERR_RANK         6      /* Invalid rank */
#define MPI_ERR_ROOT         7      /* Invalid root */
#define MPI_ERR_TRUNCATE    14      /* Message truncated on receive */

/* MPI Objects (other than COMM) */
#define MPI_ERR_GROUP        8      /* Invalid group */
#define MPI_ERR_OP           9      /* Invalid operation */
#define MPI_ERR_REQUEST     19      /* Invalid mpi_request handle */

/* Special topology argument parameters */
#define MPI_ERR_TOPOLOGY    10      /* Invalid topology */
#define MPI_ERR_DIMS        11      /* Invalid dimension argument */

/* All other arguments.  This is a class with many kinds */
#define MPI_ERR_ARG         12      /* Invalid argument */

/* Other errors that are not simply an invalid argument */
#define MPI_ERR_OTHER       15      /* Other error; use Error_string */

#define MPI_ERR_UNKNOWN     13      /* Unknown error */
#define MPI_ERR_INTERN      16      /* Internal error code    */

/* Multiple completion has two special error classes */
#define MPI_ERR_IN_STATUS   17      /* Look in status for error value */
#define MPI_ERR_PENDING     18      /* Pending request */

/* New MPI-2 Error classes */
#define MPI_ERR_FILE        27      /* */
#define MPI_ERR_ACCESS      20      /* */
#define MPI_ERR_AMODE       21      /* */
#define MPI_ERR_BAD_FILE    22      /* */
#define MPI_ERR_FILE_EXISTS 25      /* */
#define MPI_ERR_FILE_IN_USE 26      /* */
#define MPI_ERR_NO_SPACE    36      /* */
#define MPI_ERR_NO_SUCH_FILE 37     /* */
#define MPI_ERR_IO          32      /* */
#define MPI_ERR_READ_ONLY   40      /* */
#define MPI_ERR_CONVERSION  23      /* */
#define MPI_ERR_DUP_DATAREP 24      /* */
#define MPI_ERR_UNSUPPORTED_DATAREP   43  /* */

/* MPI_ERR_INFO is NOT defined in the MPI-2 standard.  I believe that
   this is an oversight */
#define MPI_ERR_INFO        28      /* */
#define MPI_ERR_INFO_KEY    29      /* */
#define MPI_ERR_INFO_VALUE  30      /* */
#define MPI_ERR_INFO_NOKEY  31      /* */

#define MPI_ERR_NAME        33      /* */
#define MPI_ERR_NO_MEM      34      /* Alloc_mem could not allocate memory */
#define MPI_ERR_NOT_SAME    35      /* */
#define MPI_ERR_PORT        38      /* */
#define MPI_ERR_QUOTA       39      /* */
#define MPI_ERR_SERVICE     41      /* */
#define MPI_ERR_SPAWN       42      /* */
#define MPI_ERR_UNSUPPORTED_OPERATION 44 /* */
#define MPI_ERR_WIN         45      /* */

#define MPI_ERR_BASE        46      /* */
#define MPI_ERR_LOCKTYPE    47      /* */
#define MPI_ERR_KEYVAL      48      /* Erroneous attribute key */
#define MPI_ERR_RMA_CONFLICT 49     /* */
#define MPI_ERR_RMA_SYNC    50      /* */ 
#define MPI_ERR_SIZE        51      /* */
#define MPI_ERR_DISP        52      /* */
#define MPI_ERR_ASSERT      53      /* */

768
#define MPIX_ERR_PROC_FAIL_STOP 54   /* Process failure */
769

770
771
772
773
#define MPI_ERR_RMA_RANGE  55      /* */
#define MPI_ERR_RMA_ATTACH 56      /* */
#define MPI_ERR_RMA_SHARED 57      /* */
#define MPI_ERR_RMA_WRONG_FLAVOR 58    /* */
774

775
776
#define MPI_ERR_LASTCODE    0x3fffffff  /* Last valid error code for a 
					   predefined error class */
777
/* WARNING: this is also defined in mpishared.h.  Update both locations */
778
#define MPICH_ERR_LAST_CLASS 58     /* It is also helpful to know the
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
				       last valid class */
/* End of MPI's error classes */

/* Function type defs */
typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, 
             void *, MPI_Offset, void *);
typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *,
					  void *);
#define MPI_CONVERSION_FN_NULL ((MPI_Datarep_conversion_function *)0)

/* 
   For systems that may need to add additional definitions to support
   different declaration styles and options (e.g., different calling 
   conventions or DLL import/export controls).  
*/
/* --Insert Additional Definitions Here-- */

/*
797
 * Normally, we provide prototypes for all MPI routines.  In a few weird
798
799
800
801
802
 * cases, we need to suppress the prototypes.
 */
#ifndef MPICH_SUPPRESS_PROTOTYPES
/* We require that the C compiler support prototypes */
/* Begin Prototypes */
803
int MPI_Send(const void*, int, MPI_Datatype, int, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
804
int MPI_Recv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
805
806
807
808
int MPI_Get_count(const MPI_Status *, MPI_Datatype, int *);
int MPI_Bsend(const void*, int, MPI_Datatype, int, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Ssend(const void*, int, MPI_Datatype, int, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Rsend(const void*, int, MPI_Datatype, int, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
809
810
int MPI_Buffer_attach( void*, int);
int MPI_Buffer_detach( void*, int *);
811
812
813
814
int MPI_Isend(const void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Ibsend(const void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Issend(const void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Irsend(const void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
815
int MPI_Irecv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
816
817
818
819
820
821
822
823
824
825
826
827
int MPI_Wait(MPI_Request *, MPI_Status *);
int MPI_Test(MPI_Request *, int *, MPI_Status *);
int MPI_Request_free(MPI_Request *);
int MPI_Waitany(int, MPI_Request *, int *, MPI_Status *);
int MPI_Testany(int, MPI_Request *, int *, int *, MPI_Status *);
int MPI_Waitall(int, MPI_Request *, MPI_Status *);
int MPI_Testall(int, MPI_Request *, int *, MPI_Status *);
int MPI_Waitsome(int, MPI_Request *, int *, int *, MPI_Status *);
int MPI_Testsome(int, MPI_Request *, int *, int *, MPI_Status *);
int MPI_Iprobe(int, int, MPI_Comm, int *, MPI_Status *);
int MPI_Probe(int, int, MPI_Comm, MPI_Status *);
int MPI_Cancel(MPI_Request *);
828
829
830
831
832
int MPI_Test_cancelled(const MPI_Status *, int *);
int MPI_Send_init(const void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Bsend_init(const void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Ssend_init(const void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Rsend_init(const void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
833
int MPI_Recv_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
834
835
int MPI_Start(MPI_Request *);
int MPI_Startall(int, MPI_Request *);
836
int MPI_Sendrecv(const void *, int, MPI_Datatype,int, int, void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(6,8);
837
int MPI_Sendrecv_replace(void*, int, MPI_Datatype, int, int, int, int, MPI_Comm, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
838
839
840
int MPI_Type_contiguous(int, MPI_Datatype, MPI_Datatype *);
int MPI_Type_vector(int, int, int, MPI_Datatype, MPI_Datatype *);
int MPI_Type_hvector(int, int, MPI_Aint, MPI_Datatype, MPI_Datatype *);
841
842
843
844
int MPI_Type_indexed(int, const int *, const int *, MPI_Datatype, MPI_Datatype *);
int MPI_Type_hindexed(int, const int *, const MPI_Aint *, MPI_Datatype, MPI_Datatype *);
int MPI_Type_struct(int, const int *, const MPI_Aint *, const MPI_Datatype *, MPI_Datatype *);
int MPI_Address(const void*, MPI_Aint *);
845
846
847
848
849
850
851
852
853
854
855
/* We could add __attribute__((deprecated)) to routines like MPI_Type_extent */
int MPI_Type_extent(MPI_Datatype, MPI_Aint *);
/* See the 1.1 version of the Standard.  The standard made an 
   unfortunate choice here, however, it is the standard.  The size returned 
   by MPI_Type_size is specified as an int, not an MPI_Aint */
int MPI_Type_size(MPI_Datatype, int *);
/* MPI_Type_count was withdrawn in MPI 1.1 */
int MPI_Type_lb(MPI_Datatype, MPI_Aint *);
int MPI_Type_ub(MPI_Datatype, MPI_Aint *);
int MPI_Type_commit(MPI_Datatype *);
int MPI_Type_free(MPI_Datatype *);
856
857
858
int MPI_Get_elements(const MPI_Status *, MPI_Datatype, int *);
int MPI_Pack(const void*, int, MPI_Datatype, void *, int, int *,  MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Unpack(const void*, int, int *, void *, int, MPI_Datatype, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6);
859
860
int MPI_Pack_size(int, MPI_Datatype, MPI_Comm, int *);
int MPI_Barrier(MPI_Comm );
861
int MPI_Bcast(void*, int, MPI_Datatype, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
862
863
864
865
866
867
868
869
870
871
872
873
int MPI_Gather(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6);
int MPI_Gatherv(const void* , int, MPI_Datatype, void*, const int *,
                const int *, MPI_Datatype, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7);
int MPI_Scatter(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6);
int MPI_Scatterv(const void* , const int *, const int *,  MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7);
int MPI_Allgather(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6);
int MPI_Allgatherv(const void* , int, MPI_Datatype, void*, const int *,
                   const int *, MPI_Datatype, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7);
int MPI_Alltoall(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6);
int MPI_Alltoallv(const void* , const int *, const int *, MPI_Datatype,
                  void*, const int *, const int *, MPI_Datatype, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8);
int MPI_Reduce(const void* , void*, int, MPI_Datatype, MPI_Op, int, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
874
875
int MPI_Op_create(MPI_User_function *, int, MPI_Op *);
int MPI_Op_free( MPI_Op *);
876
877
878
int MPI_Allreduce(const void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_Reduce_scatter(const void* , void*, const int *, MPI_Datatype, MPI_Op, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_Scan(const void* , void*, int, MPI_Datatype, MPI_Op, MPI_Comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
879
880
int MPI_Group_size(MPI_Group, int *);
int MPI_Group_rank(MPI_Group, int *);
881
int MPI_Group_translate_ranks (MPI_Group, int, const int *, MPI_Group, int *);
882
883
884
885
886
int MPI_Group_compare(MPI_Group, MPI_Group, int *);
int MPI_Comm_group(MPI_Comm, MPI_Group *);
int MPI_Group_union(MPI_Group, MPI_Group, MPI_Group *);
int MPI_Group_intersection(MPI_Group, MPI_Group, MPI_Group *);
int MPI_Group_difference(MPI_Group, MPI_Group, MPI_Group *);
887
888
int MPI_Group_incl(MPI_Group, int, const int *, MPI_Group *);
int MPI_Group_excl(MPI_Group, int, const int *, MPI_Group *);
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
int MPI_Group_range_incl(MPI_Group, int, int [][3], MPI_Group *);
int MPI_Group_range_excl(MPI_Group, int, int [][3], MPI_Group *);
int MPI_Group_free(MPI_Group *);
int MPI_Comm_size(MPI_Comm, int *);
int MPI_Comm_rank(MPI_Comm, int *);
int MPI_Comm_compare(MPI_Comm, MPI_Comm, int *);
int MPI_Comm_dup(MPI_Comm, MPI_Comm *);
int MPI_Comm_create(MPI_Comm, MPI_Group, MPI_Comm *);
int MPI_Comm_split(MPI_Comm, int, int, MPI_Comm *);
int MPI_Comm_free(MPI_Comm *);
int MPI_Comm_test_inter(MPI_Comm, int *);
int MPI_Comm_remote_size(MPI_Comm, int *);
int MPI_Comm_remote_group(MPI_Comm, MPI_Group *);
int MPI_Intercomm_create(MPI_Comm, int, MPI_Comm, int, int, MPI_Comm * );
int MPI_Intercomm_merge(MPI_Comm, int, MPI_Comm *);
int MPI_Keyval_create(MPI_Copy_function *, MPI_Delete_function *, int *, void*);
int MPI_Keyval_free(int *);
int MPI_Attr_put(MPI_Comm, int, void*);
int MPI_Attr_get(MPI_Comm, int, void *, int *);
int MPI_Attr_delete(MPI_Comm, int);
int MPI_Topo_test(MPI_Comm, int *);
910
int MPI_Cart_create(MPI_Comm, int, const int *, const int *, int, MPI_Comm *);
911
int MPI_Dims_create(int, int, int *);
912
int MPI_Graph_create(MPI_Comm, int, const int *, const int *, int, MPI_Comm *);
913
914
915
916
int MPI_Graphdims_get(MPI_Comm, int *, int *);
int MPI_Graph_get(MPI_Comm, int, int, int *, int *);
int MPI_Cartdim_get(MPI_Comm, int *);
int MPI_Cart_get(MPI_Comm, int, int *, int *, int *);
917
int MPI_Cart_rank(MPI_Comm, const int *, int *);
918
919
920
921
int MPI_Cart_coords(MPI_Comm, int, int, int *);
int MPI_Graph_neighbors_count(MPI_Comm, int, int *);
int MPI_Graph_neighbors(MPI_Comm, int, int, int *);
int MPI_Cart_shift(MPI_Comm, int, int, int *, int *);
922
923
924
int MPI_Cart_sub(MPI_Comm, const int *, MPI_Comm *);
int MPI_Cart_map(MPI_Comm, int, const int *, const int *, int *);
int MPI_Graph_map(MPI_Comm, int, const int *, const int *, int *);
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
int MPI_Get_processor_name(char *, int *);
int MPI_Get_version(int *, int *);
int MPI_Errhandler_create(MPI_Handler_function *, MPI_Errhandler *);
int MPI_Errhandler_set(MPI_Comm, MPI_Errhandler);
int MPI_Errhandler_get(MPI_Comm, MPI_Errhandler *);
int MPI_Errhandler_free(MPI_Errhandler *);
int MPI_Error_string(int, char *, int *);
int MPI_Error_class(int, int *);
double MPI_Wtime(void);
double MPI_Wtick(void);
#ifndef MPI_Wtime
double PMPI_Wtime(void);
double PMPI_Wtick(void);
#endif
int MPI_Init(int *, char ***);
int MPI_Finalize(void);
int MPI_Initialized(int *);
int MPI_Abort(MPI_Comm, int);


/* Note that we may need to define a @PCONTROL_LIST@ depending on whether 
   stdargs are supported */
int MPI_Pcontrol(const int, ...);

int MPI_DUP_FN ( MPI_Comm, int, void *, void *, void *, int * );


/* MPI-2 functions */

/* Process Creation and Management */
955
956
957
int MPI_Close_port(const char *);
int MPI_Comm_accept(const char *, MPI_Info, int, MPI_Comm, MPI_Comm *);
int MPI_Comm_connect(const char *, MPI_Info, int, MPI_Comm, MPI_Comm *);
958
959
960
int MPI_Comm_disconnect(MPI_Comm *);
int MPI_Comm_get_parent(MPI_Comm *);
int MPI_Comm_join(int, MPI_Comm *);
961
int MPI_Comm_spawn(const char *, char *[], int, MPI_Info, int, MPI_Comm, MPI_Comm *,
962
                   int []);
963
int MPI_Comm_spawn_multiple(int, char *[], char **[], const int [], const MPI_Info [], int,
964
			    MPI_Comm, MPI_Comm *, int []); 
965
int MPI_Lookup_name(const char *, MPI_Info, char *);
966
int MPI_Open_port(MPI_Info, char *);
967
968
int MPI_Publish_name(const char *, MPI_Info, const char *);
int MPI_Unpublish_name(const char *, MPI_Info, const char *);
969
970

/* One-Sided Communications */
971
int MPI_Accumulate(const void *, int, MPI_Datatype, int, MPI_Aint, int,
972
973
974
                   MPI_Datatype,  MPI_Op, MPI_Win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
int MPI_Get(void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
            MPI_Win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
975
int MPI_Put(const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
976
            MPI_Win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3);
977
978
979
980
981
982
983
984
985
986
987
int MPI_Win_complete(MPI_Win);
int MPI_Win_create(void *, MPI_Aint, int, MPI_Info, MPI_Comm, MPI_Win *);
int MPI_Win_fence(int, MPI_Win);
int MPI_Win_free(MPI_Win *);
int MPI_Win_get_group(MPI_Win, MPI_Group *);
int MPI_Win_lock(int, int, int, MPI_Win);
int MPI_Win_post(MPI_Group, int, MPI_Win);
int MPI_Win_start(MPI_Group, int, MPI_Win);
int MPI_Win_test(MPI_Win, int *);
int MPI_Win_unlock(int, MPI_Win);
int MPI_Win_wait(MPI_Win);
988
989

/* MPI-3 One-Sided Communication Routines */
990
int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
991
                      MPI_Comm comm, void *baseptr, MPI_Win *win);
992
int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm,
993
                             void *baseptr, MPI_Win *win);
994
995
996
997
int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr);
int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win);
int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size);
int MPI_Win_detach(MPI_Win win, const void *base);
998

999
int MPI_Get_accumulate(const void *origin_addr, int origin_count,
1000
                        MPI_Datatype origin_datatype, void *result_addr, int result_count,
For faster browsing, not all history is shown. View entire blame