00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef _MINI_MPI_H_
00037 #define _MINI_MPI_H_
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00043
00044 #define MPI_INIT_PORT 6851
00045 #define MPI_PORT 6853
00046
00047 #define MPI_MSG_LEN 2048
00048
00049 #define MPI_Comm int
00050 #define MPI_COMM_WORLD 0x001
00051
00052 #define MPI_Datatype int
00053 #define MPI_CHAR 0x010
00054 #define MPI_SHORT 0x011
00055 #define MPI_INT 0x012
00056 #define MPI_LONG 0x013
00057 #define MPI_UNSIGNED_CHAR 0x014
00058 #define MPI_UNSIGNED_SHORT 0x015
00059 #define MPI_UNSIGNED_INT 0x016
00060 #define MPI_UNSIGNED_LONG 0x017
00061 #define MPI_FLOAT 0x018
00062 #define MPI_DOUBLE 0x019
00063 #define MPI_LONG_DOUBLE 0x020
00064 #define MPI_BYTE 0x021
00065 #define MPI_PACKED 0x022
00066
00067 #define MPI_Status int
00068 #define MPI_SUCCESS 0x100
00069
00070 #define MPI_Request int
00071
00072
00073 int MPI_Init(int *argc, char ***argv);
00074 int MPI_Initialized(int *flag);
00075 int MPI_Comm_size(MPI_Comm comm, int *size);
00076 int MPI_Comm_rank(MPI_Comm comm, int *rank);
00077 int MPI_Abort(MPI_Comm, int errorcode);
00078 int MPI_Finalize(void);
00079
00080
00081 int MPI_Send(void *buf, int count, MPI_Datatype type, int dest,
00082 int tag, MPI_Comm comm);
00083 int MPI_Recv(void *buf, int count, MPI_Datatype type, int source,
00084 int tag, MPI_Comm comm, MPI_Status *status);
00085
00086
00087 int MPI_Isend(void *buf, int count, MPI_Datatype type, int dest,
00088 int tag, MPI_Comm comm, MPI_Request *request);
00089 int MPI_Irecv(void *buf, int count, MPI_Datatype type, int source,
00090 int tag, MPI_Comm comm, MPI_Request *request);
00091 int MPI_Wait(MPI_Request *request, MPI_Status *status);
00092 int MPI_Waitall(int count, MPI_Request *request[], MPI_Status *status[]);
00093
00094
00095 int MPI_Barrier(MPI_Comm comm);
00096 int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype,
00097 int root, MPI_Comm comm);
00098 int MPI_Scatter(void *sendbuffer, int sendcount, MPI_Datatype sendtype,
00099 void *recvbuffer, int recvcount, MPI_Datatype recvtype,
00100 int root, MPI_Comm comm);
00101 int MPI_Gather(void *sendbuffer, int sendcount, MPI_Datatype sendtype,
00102 void *recvbuffer, int recvcount, MPI_Datatype recvtype,
00103 int root, MPI_Comm comm);
00104
00105
00106 int MPI_Comm_socket(MPI_Comm comm, int *sock);
00107
00108
00109
00110 #define MINI_MPI_INIT 0x200
00111 #define MINI_MPI_HEAD 0x201
00112 #define MINI_MPI_ABORT 0x204
00113 #define MINI_MPI_FINAL 0x205
00114 #define MINI_MPI_BARRIER 0x207
00115 #define MINI_MPI_RESUME 0x208
00116 #define MINI_MPI_SEND 0x210
00117 #define MINI_MPI_RECV 0x211
00118 #define MINI_MPI_SCATTER 0x215
00119 #define MINI_MPI_GATHER 0x216
00120
00121
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125
00126 #endif // _MINI_MPI_H_