1 | /* These are the definitions to use our fake version of MPI in mpi_stub.c |
---|
2 | * Guaranteed only to make PGAPack compile and link without MPI, but should |
---|
3 | * work from user C and fortran programs. |
---|
4 | * |
---|
5 | * Some of these are from mpich's mpi.h, others are custom. |
---|
6 | * |
---|
7 | * Author: Brian P. Walenz |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef MPI_FAKE_H |
---|
11 | #define MPI_FAKE_H 1 |
---|
12 | |
---|
13 | typedef void * MPI_Comm; |
---|
14 | typedef void * MPI_Datatype; |
---|
15 | typedef long MPI_Aint; |
---|
16 | |
---|
17 | typedef struct { |
---|
18 | int MPI_SOURCE; |
---|
19 | int MPI_TAG; |
---|
20 | int MPI_ERROR; |
---|
21 | } MPI_Status; |
---|
22 | |
---|
23 | #define MPI_BYTE (void *)NULL |
---|
24 | #define MPI_CHAR (void *)NULL |
---|
25 | #define MPI_DOUBLE (void *)NULL |
---|
26 | #define MPI_FLOAT (void *)NULL |
---|
27 | #define MPI_INT (void *)NULL |
---|
28 | #define MPI_LONG (void *)NULL |
---|
29 | #define MPI_LONG_DOUBLE (void *)NULL |
---|
30 | #define MPI_PACKED (void *)NULL |
---|
31 | #define MPI_SHORT (void *)NULL |
---|
32 | #define MPI_UNSIGNED_CHAR (void *)NULL |
---|
33 | #define MPI_UNSIGNED (void *)NULL |
---|
34 | #define MPI_UNSIGNED_LONG (void *)NULL |
---|
35 | #define MPI_UNSIGNED_SHORT (void *)NULL |
---|
36 | |
---|
37 | #define MPI_COMM_WORLD (void *)NULL |
---|
38 | #define MPI_COMM_SELF (void *)NULL |
---|
39 | |
---|
40 | #define MPI_BOTTOM (void *)0 |
---|
41 | |
---|
42 | #define MPI_PROC_NULL (-1) |
---|
43 | #define MPI_ANY_SOURCE (-2) |
---|
44 | #define MPI_ANY_TAG (-1) |
---|
45 | |
---|
46 | /* Declare prototypes for the MPI functions. */ |
---|
47 | int MPI_Address(void *, MPI_Aint *); |
---|
48 | int MPI_Bcast(void *, int, MPI_Datatype, int, MPI_Comm); |
---|
49 | int MPI_Comm_dup(MPI_Comm, MPI_Comm *); |
---|
50 | int MPI_Comm_free(MPI_Comm *); |
---|
51 | int MPI_Comm_rank(MPI_Comm, int *); |
---|
52 | int MPI_Comm_size(MPI_Comm, int *); |
---|
53 | int MPI_Finalize(void); |
---|
54 | int MPI_Init(int *, char ***); |
---|
55 | int MPI_Initialized(int *); |
---|
56 | int MPI_Probe(int, int, MPI_Comm, MPI_Status *); |
---|
57 | int MPI_Send(void *, int, MPI_Datatype, int, int, MPI_Comm); |
---|
58 | int MPI_Recv(void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *); |
---|
59 | int MPI_Sendrecv(void *, int, MPI_Datatype, int, int, void *, int, |
---|
60 | MPI_Datatype, int, int, MPI_Comm, MPI_Status *); |
---|
61 | int MPI_Type_commit(MPI_Datatype *); |
---|
62 | int MPI_Type_free(MPI_Datatype *); |
---|
63 | int MPI_Type_struct(int, int *, MPI_Aint *, MPI_Datatype *, MPI_Datatype *); |
---|
64 | |
---|
65 | |
---|
66 | #endif |
---|
67 | |
---|