Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please dist check
[simgrid.git] / examples / smpi / NAS / MPI_dummy / mpi.h
1 #define MPI_DOUBLE          1
2 #define MPI_INT             2
3 #define MPI_BYTE            3
4 #define MPI_FLOAT           4
5 #define MPI_LONG            5
6
7 #define MPI_COMM_WORLD      0
8
9 #define MPI_MAX             1
10 #define MPI_SUM             2
11 #define MPI_MIN             3
12
13 #define MPI_SUCCESS         0
14 #define MPI_ANY_SOURCE     -1
15 #define MPI_ERR_OTHER      -1
16 #define MPI_STATUS_SIZE     3
17
18
19 /* 
20    Status object.  It is the only user-visible MPI data-structure 
21    The "count" field is PRIVATE; use MPI_Get_count to access it. 
22  */
23 typedef struct { 
24     int count;
25     int MPI_SOURCE;
26     int MPI_TAG;
27     int MPI_ERROR;
28 } MPI_Status;
29
30
31 /* MPI request objects */
32 typedef int MPI_Request;
33
34 /* MPI datatype */
35 typedef int MPI_Datatype;
36
37 /* MPI comm */
38 typedef int MPI_Comm;
39
40 /* MPI operation */
41 typedef int MPI_Op;
42
43
44
45 /* Prototypes: */
46 void  mpi_error( void );
47
48 int   MPI_Irecv( void         *buf,
49                  int          count,
50                  MPI_Datatype datatype,
51                  int          source,
52                  int          tag,
53                  MPI_Comm     comm,
54                  MPI_Request  *request );
55
56 int   MPI_Send( void         *buf,
57                 int          count,
58                 MPI_Datatype datatype,
59                 int          dest,
60                 int          tag,
61                 MPI_Comm     comm );
62
63 int   MPI_Wait( MPI_Request *request,
64                 MPI_Status  *status );
65
66 int   MPI_Init( int  *argc,
67                 char ***argv );
68
69 int   MPI_Comm_rank( MPI_Comm comm, 
70                      int      *rank );
71
72 int   MPI_Comm_size( MPI_Comm comm, 
73                      int      *size );
74
75 double MPI_Wtime( void );
76
77 int  MPI_Barrier( MPI_Comm comm );
78
79 int  MPI_Finalize( void );
80
81 int  MPI_Allreduce( void         *sendbuf,
82                     void         *recvbuf,
83                     int          nitems,
84                     MPI_Datatype type,
85                     MPI_Op       op,
86                     MPI_Comm     comm );
87
88 int  MPI_Reduce( void         *sendbuf,
89                  void         *recvbuf,
90                  int          nitems,
91                  MPI_Datatype type,
92                  MPI_Op       op,
93                  int          root,
94                  MPI_Comm     comm );
95
96 int  MPI_Alltoall( void         *sendbuf,
97                    int          sendcount,
98                    MPI_Datatype sendtype,
99                    void         *recvbuf,
100                    int          recvcount,
101                    MPI_Datatype recvtype,
102                    MPI_Comm     comm );
103
104 int  MPI_Alltoallv( void         *sendbuf,
105                     int          *sendcounts,
106                     int          *senddispl,
107                     MPI_Datatype sendtype,
108                     void         *recvbuf,
109                     int          *recvcounts,
110                     int          *recvdispl,
111                     MPI_Datatype recvtype,
112                     MPI_Comm     comm );