forked from ESMCI/mpi-serial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpi.h
607 lines (491 loc) · 22.9 KB
/
mpi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
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
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
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
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
#ifndef _MPI_H_
#define _MPI_H_
#ifdef __cplusplus
extern "C" {
#endif
#define MPI_MAX_LIBRARY_VERSION_STRING (80)
typedef int MPI_Comm;
typedef int MPI_Request;
typedef int MPI_Message;
#define MPI_COMM_WORLD (1)
#define MPI_COMM_NULL (0) /* handle 0 maps to NULL */
typedef int MPI_Group;
/* MPI_GROUP_EMPTY and MPI_GROUP_NULL must not conflict with MPI_GROUP_ONE */
#define MPI_GROUP_EMPTY (-1)
#define MPI_GROUP_NULL (0)
/*
* Return codes
* On error, mpi-serial aborts so the values don't really matter
* as long as they are different than MPI_SUCCESS
*
*/
#define MPI_SUCCESS (0)
#define MPI_ERR_BUFFER (-1)
#define MPI_ERR_COUNT (-1)
#define MPI_ERR_TYPE (-1)
#define MPI_ERR_TAG (-1)
#define MPI_ERR_COMM (-1)
#define MPI_ERR_RANK (-1)
#define MPI_ERR_REQUEST (-1)
#define MPI_ERR_ROOT (-1)
#define MPI_ERR_GROUP (-1)
#define MPI_ERR_OP (-1)
#define MPI_ERR_TOPOLOGY (-1)
#define MPI_ERR_DIMS (-1)
#define MPI_ERR_ARG (-1)
#define MPI_ERR_UNKNOWN (-1)
#define MPI_ERR_TRUNCATE (-1)
#define MPI_ERR_OTHER (-1)
#define MPI_ERR_INTERN (-1)
#define MPI_PENDING (-1)
#define MPI_ERR_IN_STATUS (-1)
#define MPI_ERR_LASTCODE (-1)
#define MPI_ERR_NO_MEM (-1)
#define MPI_ERR_KEYVAL (-1)
#define MPI_ERR_PENDING (-1)
#define MPI_ERR_IO (-1)
/*
* MPI_UNDEFINED
*
* Uses:
* value for "color" in e.g. comm_split
* value for rank in Group_translate_ranks
*
*/
#define MPI_UNDEFINED (-1)
/*
* Data types etc.
*/
typedef unsigned long int MPI_Aint;
#define MPI_BOTTOM (0)
#define MPI_IN_PLACE (void *)(-1)
typedef int MPI_Datatype;
/*
* Topology
*/
#define MPI_CART (1)
#define MPI_GRAPH (2)
#define MPI_DIST_GRAPH (3)
#define MPI_HOST 0
#define MPI_IO 0
/* The type's value is now a handle */
#define MPI_DATATYPE_NULL (0)
//C types
#define MPI_CHAR (-1)
#define MPI_SIGNED_CHAR (-46)
#define MPI_WCHAR (-47)
#define MPI_SHORT (-2)
#define MPI_INT (-3)
#define MPI_LONG (-4)
#define MPI_UNSIGNED_CHAR (-5)
#define MPI_UNSIGNED_SHORT (-6)
#define MPI_UNSIGNED (-7)
#define MPI_UNSIGNED_LONG (-8)
#define MPI_FLOAT (-9)
#define MPI_DOUBLE (-10)
#define MPI_LONG_DOUBLE (-11)
//Cross-language
#define MPI_BYTE (-12)
#define MPI_PACKED (-13)
#define MPI_LB (-14)
#define MPI_UB (-15)
// Fortran types
#define MPI_INTEGER (-16) // RML: why not (MPI_INT)
#define MPI_REAL (-17) // RML: why not (MPI_FLOAT)
#define MPI_DOUBLE_PRECISION (-18) // RML: why not (MPI_DOUBLE)
#define MPI_COMPLEX (-19)
#define MPI_DOUBLE_COMPLEX (-20)
#define MPI_LOGICAL (-21)
#define MPI_CHARACTER (-22)
#define MPI_2REAL (-23)
#define MPI_2DOUBLE_PRECISION (-24)
#define MPI_2INTEGER (-25)
//Reduction function types
#define MPI_FLOAT_INT (-26)
#define MPI_DOUBLE_INT (-27)
#define MPI_LONG_INT (-28)
#define MPI_2INT (-29)
#define MPI_SHORT_INT (-30)
#define MPI_LONG_DOUBLE_INT (-31)
/* Fortran size-specific types */
#define MPI_INTEGER1 (-32)
#define MPI_INTEGER2 (-33)
#define MPI_INTEGER4 (-34)
#define MPI_INTEGER8 (-35)
#define MPI_INTEGER16 (-36)
#define MPI_REAL4 (-37)
#define MPI_REAL8 (-38)
#define MPI_REAL16 (-39)
#define MPI_COMPLEX8 (-40)
#define MPI_COMPLEX16 (-41)
#define MPI_COMPLEX32 (-42)
/* Some more types */
#define MPI_LONG_LONG_INT (-43)
#define MPI_LONG_LONG MPI_LONG_LONG_INT
#define MPI_UNSIGNED_LONG_LONG (-44)
#define MPI_OFFSET (-45)
/*
* Fortran int size
*
*/
typedef int MPI_Fint;
#define MPI_ANY_TAG (-1)
#define MPI_TAG_UB (INT_MAX)
#define MPI_ANY_SOURCE (-1)
#define MPI_PROC_NULL (-2)
#define MPI_ROOT (-3)
#define MPI_REQUEST_NULL (0)
#define MPI_MAX_ERROR_STRING (128)
#define MPI_MAX_PROCESSOR_NAME (128)
#define MPI_THREAD_SINGLE (0)
#define MPI_THREAD_FUNNELED (1)
#define MPI_THREAD_SERIALIZED (2)
#define MPI_THREAD_MULTIPLE (3)
/*
* MPI_Status
*
* definition must be compatible with the mpif.h values for
* MPI_STATUS_SIZE, MPI_SOURCE, MPI_TAG, and MPI_ERROR.
*
* Note: The type used for MPI_Status_int must be chosen to match
* Fortran INTEGER.
*
*/
typedef int MPI_Status_int;
typedef struct /* Fortran: INTEGER status(MPI_STATUS_SIZE) */
{
MPI_Status_int MPI_SOURCE; /* Fortran: status(MPI_SOURCE) */
MPI_Status_int MPI_TAG; /* Fortran: status(MPI_TAG) */
MPI_Status_int MPI_ERROR; /* Fortran: status(MPI_ERROR) */
int get_count; /* Number specified for send */
} MPI_Status;
#define MPI_STATUS_IGNORE ((MPI_Status *)0)
#define MPI_STATUSES_IGNORE ((MPI_Status *)0)
/*
* MPI Errhandling stubs (Not functional currently)
*/
typedef int MPI_Errhandler;
#define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)0)
#define MPI_ERRORS_RETURN ((MPI_Errhandler)-1)
/*
* Collective operations
*/
typedef int MPI_Op;
typedef void MPI_User_function( void *invec, void *inoutvec, int *len,
MPI_Datatype *datatype);
#define MPI_OP_NULL (0)
#define MPI_MAX (0)
#define MPI_MIN (0)
#define MPI_SUM (0)
#define MPI_PROD (0)
#define MPI_LAND (0)
#define MPI_BAND (0)
#define MPI_LOR (0)
#define MPI_BOR (0)
#define MPI_LXOR (0)
#define MPI_BXOR (0)
#define MPI_MAXLOC (0)
#define MPI_MINLOC (0)
#define MPI_STATUS_SIZE (sizeof(MPI_Status) / sizeof(int))
/* NOTE: the C type MPI_Offset is NOT the same as MPI datatype MPI_OFFSET */
typedef long long int MPI_Offset;
/* info
*/
typedef int MPI_Info; /* handle */
#define MPI_INFO_NULL (0)
/* communicator comparison
*/
#define MPI_IDENT 1
#define MPI_CONGRUENT 2
#define MPI_SIMILAR 3
#define MPI_UNEQUAL 0
/**********************************************************
*
* Note: if you need to regenerate the prototypes below,
* you can use 'protify.awk' and paste the output here.
*
*/
extern int MPI_Get_library_version(char *version, int *resultlen);
extern int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
MPI_Comm peer_comm, int remote_leader,
int tag, MPI_Comm *newintercomm);
extern int MPI_Intercomm_merge(MPI_Comm intercomm, int high,
MPI_Comm *newintercomm);
extern int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims,
int *periods, int reorder, MPI_Comm *comm_cart);
extern int MPI_Cart_get(MPI_Comm comm, int maxdims, int *dims,
int *periods, int *coords);
extern int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims,
int *coords);
extern int MPI_Dims_create(int nnodes, int ndims, int *dims);
extern int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int index[],
const int edges[], int reorder, MPI_Comm *comm_graph);
extern int MPI_Barrier(MPI_Comm comm );
extern int MPI_Ibarrier(MPI_Comm comm, MPI_Request * request);
extern int MPI_Bcast(void* buffer, int count, MPI_Datatype datatype,
int root, MPI_Comm comm );
extern int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype,
int root, MPI_Comm comm, MPI_Request *request);
extern int MPI_Gather(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm);
extern int MPI_Gatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, const int *recvcounts, const int *displs,
MPI_Datatype recvtype, int root, MPI_Comm comm);
extern int MPI_Allgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm);
extern int MPI_Allgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, const int *recvcounts, const int *displs,
MPI_Datatype recvtype, MPI_Comm comm);
extern int MPI_Scatter(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm);
extern int MPI_Scatterv(const void* sendbuf, int *sendcounts, int *displs,
MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, int root, MPI_Comm comm);
extern int MPI_Reduce(const void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
extern int MPI_Reduce_scatter(const void* sendbuf, void* recvbuf, int *recvcounts,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
extern int MPI_Allreduce(const void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
extern int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
MPI_Request *request);
extern int MPI_Scan(const void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
extern int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm);
extern int MPI_Alltoallv(const void *sendbuf, int *sendcounts,
int *sdispls, MPI_Datatype sendtype,
void *recvbuf, int *recvcounts,
int *rdispls, MPI_Datatype recvtype,
MPI_Comm comm) ;
extern int MPI_Alltoallw(const void *sendbuf, int *sendcounts,
int *sdispls, MPI_Datatype *sendtypes,
void *recvbuf, int *recvcounts,
int *rdispls, MPI_Datatype *recvtypes,
MPI_Comm comm) ;
extern int MPI_Op_create(MPI_User_function *function, int commute,
MPI_Op *op);
extern MPI_Op MPI_Op_f2c(MPI_Fint op);
extern MPI_Fint MPI_Op_c2f(MPI_Op op);
extern MPI_Comm mpi_comm_new(void);
extern int MPI_Op_free(MPI_Op *op);
extern int MPI_Comm_free(MPI_Comm *comm);
extern int MPI_Comm_size(MPI_Comm comm, int *size);
extern int MPI_Comm_rank(MPI_Comm comm, int *rank);
extern int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm);
extern int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm);
extern int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm);
extern int MPI_Comm_group(MPI_Comm comm, MPI_Group *group);
extern int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result);
extern int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag);
extern int MPI_Comm_test_inter(MPI_Comm comm, int *flag);
extern int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler);
extern int MPI_Topo_test(MPI_Comm comm, int *status);
extern int MPI_Attr_get(MPI_Comm comm, int keyval,void *attribute_val, int *flag );
extern MPI_Comm MPI_Comm_f2c(MPI_Fint comm);
extern MPI_Fint MPI_Comm_c2f(MPI_Comm comm);
extern int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup);
extern int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup);
extern int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
MPI_Group *newgroup);
extern int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup);
extern int MPI_Group_intersection(MPI_Group group1, MPI_Group group2,
MPI_Group *newgroup);
extern int MPI_Group_difference(MPI_Group group1, MPI_Group group2,
MPI_Group *newgroup);
extern int MPI_Group_free(MPI_Group *group);
extern int MPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1,
MPI_Group group2, int *ranks2);
extern int MPI_Group_compare(MPI_Comm group1, MPI_Comm group2, int *result);
extern int MPI_Group_rank(MPI_Group group, int *rank);
extern int MPI_Group_size(MPI_Group group, int *size);
extern MPI_Group MPI_Group_f2c(MPI_Fint group);
extern MPI_Fint MPI_Group_c2f(MPI_Group group);
extern int MPI_Init(int *argc, char **argv[]) ;
extern int MPI_Init_thread( int *argc, char **argv[], int required, int *provided );
extern int MPI_Query_thread(int *provided);
extern int MPI_Finalize(void);
extern int MPI_Finalized(int *flag);
extern int MPI_Abort(MPI_Comm comm, int errorcode);
extern int MPI_Error_string(int errorcode, char *string, int *resultlen);
extern int MPI_Get_processor_name(char *name, int *resultlen);
extern int MPI_Get_version(int *mpi_vers, int *mpi_subvers);
extern int MPI_Get_library_version(char *version, int *resultlen);
extern int MPI_Initialized(int *flag);
extern int MPI_Is_thread_main(int *flag);
extern int MPI_Info_create(MPI_Info *info);
extern int MPI_Info_set(MPI_Info info, char *key, char *value);
extern int MPI_Pack( void *inbuf, int incount, MPI_Datatype datatype,
void *outbuf, int outsize, int *position, MPI_Comm comm);
extern int MPI_Unpack( void *inbuf, int insize, int *position,
void *outbuf, int outcount, MPI_Datatype datatype,
MPI_Comm comm );
extern int MPI_Irecv(void *buf, int count, MPI_Datatype datatype,
int source, int tag, MPI_Comm comm, MPI_Request *request);
extern int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source,
int tag, MPI_Comm comm, MPI_Status *status);
extern int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status);
extern int MPI_Wait(MPI_Request *request, MPI_Status *status);
extern int MPI_Testany(int count, MPI_Request *array_of_requests,
int *index, int *flag, MPI_Status *status);
extern int MPI_Waitany(int count, MPI_Request *array_of_requests,
int *index, MPI_Status *status);
extern int MPI_Testall(int count, MPI_Request *array_of_requests,
int *flag, MPI_Status *array_of_statuses);
extern int MPI_Waitall(int count, MPI_Request *array_of_requests,
MPI_Status *array_of_statuses);
extern MPI_Request MPI_Request_f2c(MPI_Fint request);
extern MPI_Fint MPI_Request_c2f(MPI_Request request);
extern int MPI_Testsome(int incount, MPI_Request *array_of_requests,
int *outcount, int *array_of_indices,
MPI_Status *array_of_statuses);
extern int MPI_Waitsome(int incount, MPI_Request *array_of_requests,
int *outcount, int *array_of_indices,
MPI_Status *array_of_statuses);
extern int MPI_Request_free(MPI_Request * req);
extern int MPI_Cancel(MPI_Request * req);
extern int MPI_Test_cancelled(const MPI_Status *status, int *flag);
extern int MPI_Isend(const void *buf, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm, MPI_Request *request) ;
extern int MPI_Send(const void* buf, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm);
extern int MPI_Ssend(const void* buf, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm);
extern int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest,
int tag, MPI_Comm comm, MPI_Request *request);
extern int MPI_Rsend(const void* buf, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm);
extern int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm, MPI_Request *request) ;
extern int MPI_Sendrecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
int dest, int sendtag,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int source, int recvtag,
MPI_Comm comm, MPI_Status *status);
extern int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
extern int MPI_Iprobe(int source, int tag, MPI_Comm comm,
int *flag, MPI_Status *status);
//extern int MPI_Pack_size(int incount, MPI_Datatype type, MPI_Comm comm, MPI_Aint * size);
extern int MPI_Pack_size(int incount, MPI_Datatype type, MPI_Comm comm, int * size);
/* Error handling stub, not currently functional */
extern int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler handle);
extern int MPI_Error_class(int errorcode, int *errorclass);
/* new type functions */
extern int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count);
extern int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count);
extern int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_vector(int count, int blocklen, int stride, MPI_Datatype oldtype,
MPI_Datatype *newtype);
extern int MPI_Type_hvector(int count, int blocklen, MPI_Aint stride,
MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_create_hvector(int count, int blocklen, MPI_Aint stride,
MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_indexed(int count, int *blocklens, int *displacements,
MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], const
int array_of_subsizes[], const int array_of_starts[], int order, MPI_Datatype
oldtype, MPI_Datatype *newtype);
extern int MPI_Type_create_indexed_block(int count, int blocklen, int *displacements,
MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_hindexed(int count, int *blocklens, MPI_Aint *displacements,
MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_size(MPI_Datatype type, int * size);
extern int MPI_Type_struct(int count, int *blocklens, MPI_Aint *displacements,
MPI_Datatype *oldtypes, MPI_Datatype *newtype);
extern int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype);
extern int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint * extent);
extern int MPI_Type_commit(MPI_Datatype * datatype);
extern int MPI_Type_free(MPI_Datatype * datatype);
extern int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint * lb);
extern int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint * ub);
extern int MPI_Type_create_struct(int count, int array_of_blocklengths[],
const MPI_Aint array_of_displacements[], const MPI_Datatype array_of_types[],
MPI_Datatype *newtype);
#define MPI_WTIME_IS_GLOBAL 1
extern double MPI_Wtime(void);
extern double MPI_Wtick(void);
extern int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr);
extern int MPI_Free_mem(void *baseptr);
extern int MPI_Get_address(const void *location, MPI_Aint *address);
extern int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status);
extern int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status);
extern int MPI_Mrecv(void *buf, int count, MPI_Datatype type, MPI_Message *message, MPI_Status *status);
#define MPI_ORDER_C 89
#define MPI_ORDER_FORTRAN 90
typedef int MPI_Win;
#define MPI_WIN_NULL 0
#define MPI_MODE_NOCHECK 99
#define MPI_NO_OP 222
#define MPI_REPLACE 223
extern int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info,
MPI_Comm comm, MPI_Win *win);
extern int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
MPI_Comm comm, void *baseptr, MPI_Win * win);
extern int MPI_Win_fence(int assert, MPI_Win win);
extern int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win);
extern int MPI_Win_lock_all(int assert, MPI_Win win);
extern int MPI_Win_unlock(int rank, MPI_Win win);
extern int MPI_Win_unlock_all(MPI_Win win);
extern int MPI_Win_sync(MPI_Win win) ;
extern int MPI_Win_flush(int rank, MPI_Win win);
extern int MPI_Win_flush_all(MPI_Win win);
extern int MPI_Win_flush_local(int rank, MPI_Win win);
extern int MPI_Win_flush_local_all(MPI_Win win);
extern int MPI_Win_free(MPI_Win *win);
extern int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
origin_datatype, int target_rank, MPI_Aint target_disp,
int target_count, MPI_Datatype target_datatype, MPI_Win
win);
extern int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
origin_datatype, int target_rank, MPI_Aint target_disp,
int target_count, MPI_Datatype target_datatype, MPI_Win win);
extern int MPI_Fetch_and_op(const void *origin_addr, void *result_addr,
MPI_Datatype datatype, int target_rank, MPI_Aint target_disp,
MPI_Op op, MPI_Win win);
typedef int MPI_File;
#define MPI_FILE_NULL 0
#define MPI_MODE_RDONLY 100
#define MPI_MODE_RDWR 101
#define MPI_MODE_WRONLY 102
#define MPI_MODE_CREATE 103
#define MPI_MODE_EXCL 104
#define MPI_MODE_DELETE_ON_CLOSE 105
#define MPI_MODE_UNIQUE_OPEN 106
#define MPI_MODE_SEQUENTIAL 107
#define MPI_MODE_APPEND 108
extern int MPI_File_open(MPI_Comm comm, const char *filename,
int amode, MPI_Info info,
MPI_File *fh);
extern int MPI_File_get_size(MPI_File fh, MPI_Offset *size);
extern int MPI_File_write(MPI_File fh, const void *buf, int count,
MPI_Datatype datatype, MPI_Status *status);
extern int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status);
extern int MPI_File_write_all(MPI_File fh, const void *buf, int count,
MPI_Datatype datatype, MPI_Status * status);
extern int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status);
extern int MPI_File_set_size(MPI_File fh, MPI_Offset size);
extern int MPI_File_read(MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status);
extern int MPI_File_read_all(MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status);
extern int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status * status);
extern int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status);
extern int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status * status);
extern int MPI_File_close(MPI_File * fh);
extern int MPI_File_set_view(MPI_File fh, MPI_Offset disp,
MPI_Datatype etype, MPI_Datatype filetype,
const char *datarep, MPI_Info info);
#ifdef __cplusplus
}
#endif
#endif