FreeNOS
mpi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __LIB_LIBMPI_MPI_H
19 #define __LIB_LIBMPI_MPI_H
20 
21 #include <Types.h>
22 #include <Macros.h>
23 
38 typedef uint MPI_Comm;
39 
41 typedef uint MPI_Status;
42 
46 typedef enum
47 {
48  MPI_CHAR = 0,
56 }
58 
62 enum
63 {
66 };
67 
71 enum
72 {
148 };
149 
159 extern C int MPI_Init(int *argc, char ***argv);
160 
161 extern C int MPI_Finalize(void);
162 
172 extern C int MPI_Comm_rank(MPI_Comm comm,
173  int *rank);
174 
175 extern C int MPI_Comm_size(MPI_Comm comm,
176  int *size);
177 
190 extern C int MPI_Send(const void *buf,
191  int count,
192  MPI_Datatype datatype,
193  int dest,
194  int tag,
195  MPI_Comm comm);
196 
197 extern C int MPI_Recv(void *buf,
198  int count,
199  MPI_Datatype datatype,
200  int source,
201  int tag,
202  MPI_Comm comm,
203  MPI_Status *status);
204 
214 #endif /* __LIB_LIBMPI_MPI_H */
MPI_UNSIGNED_SHORT
@ MPI_UNSIGNED_SHORT
Definition: mpi.h:53
MPI_ERR_REQUEST
@ MPI_ERR_REQUEST
Definition: mpi.h:80
MPI_Finalize
C int MPI_Finalize(void)
Definition: mpi.cpp:30
MPI_ERR_BUFFER
@ MPI_ERR_BUFFER
Definition: mpi.h:74
MPI_ERR_UNSUPPORTED_OPERATION
@ MPI_ERR_UNSUPPORTED_OPERATION
Definition: mpi.h:129
MPI_INT
@ MPI_INT
Definition: mpi.h:51
MPI_T_ERR_INVALID_NAME
@ MPI_T_ERR_INVALID_NAME
Definition: mpi.h:139
Macros.h
MPI_ERR_TYPE
@ MPI_ERR_TYPE
Definition: mpi.h:76
MPI_ERR_RMA_SYNC
@ MPI_ERR_RMA_SYNC
Definition: mpi.h:123
Types.h
MPI_ERR_RANK
@ MPI_ERR_RANK
Definition: mpi.h:79
MPI_ERR_RMA_SHARED
@ MPI_ERR_RMA_SHARED
Definition: mpi.h:122
MPI_T_ERR_CVAR_SET_NOT_NOW
@ MPI_T_ERR_CVAR_SET_NOT_NOW
Definition: mpi.h:142
MPI_ERR_NO_MEM
@ MPI_ERR_NO_MEM
Definition: mpi.h:112
MPI_ERR_RMA_CONFLICT
@ MPI_ERR_RMA_CONFLICT
Definition: mpi.h:120
MPI_T_ERR_INVALID_HANDLE
@ MPI_T_ERR_INVALID_HANDLE
Definition: mpi.h:138
MPI_SUCCESS
@ MPI_SUCCESS
Definition: mpi.h:73
MPI_Comm
uint MPI_Comm
Communicator identifier.
Definition: mpi.h:38
MPI_ERR_LASTCODE
@ MPI_ERR_LASTCODE
Definition: mpi.h:147
MPI_T_ERR_OUT_OF_HANDLES
@ MPI_T_ERR_OUT_OF_HANDLES
Definition: mpi.h:140
MPI_ERR_SIZE
@ MPI_ERR_SIZE
Definition: mpi.h:126
MPI_ERR_SERVICE
@ MPI_ERR_SERVICE
Definition: mpi.h:125
MPI_ERR_INFO
@ MPI_ERR_INFO
Definition: mpi.h:107
MPI_UNSIGNED
@ MPI_UNSIGNED
Definition: mpi.h:54
MPI_T_ERR_OUT_OF_SESSIONS
@ MPI_T_ERR_OUT_OF_SESSIONS
Definition: mpi.h:141
MPI_Comm_size
C int MPI_Comm_size(MPI_Comm comm, int *size)
Definition: mpi.cpp:66
MPI_T_ERR_PVAR_NO_STARTSTOP
@ MPI_T_ERR_PVAR_NO_STARTSTOP
Definition: mpi.h:145
MPI_ERR_PORT
@ MPI_ERR_PORT
Definition: mpi.h:116
MPI_ERR_IO
@ MPI_ERR_IO
Definition: mpi.h:108
MPI_ERR_FILE
@ MPI_ERR_FILE
Definition: mpi.h:103
MPI_ERR_RMA_RANGE
@ MPI_ERR_RMA_RANGE
Definition: mpi.h:121
MPI_ERR_IN_STATUS
@ MPI_ERR_IN_STATUS
Definition: mpi.h:92
MPI_SHORT
@ MPI_SHORT
Definition: mpi.h:49
MPI_COMM_SELF
@ MPI_COMM_SELF
Definition: mpi.h:65
MPI_T_ERR_INVALID
@ MPI_T_ERR_INVALID
Definition: mpi.h:134
MPI_ERR_INTERN
@ MPI_ERR_INTERN
Definition: mpi.h:90
MPI_ERR_SPAWN
@ MPI_ERR_SPAWN
Definition: mpi.h:127
MPI_ERR_CONVERSION
@ MPI_ERR_CONVERSION
Definition: mpi.h:98
MPI_Status
uint MPI_Status
Status holder.
Definition: mpi.h:41
MPI_ERR_BASE
@ MPI_ERR_BASE
Definition: mpi.h:97
MPI_ERR_WIN
@ MPI_ERR_WIN
Definition: mpi.h:130
uint
unsigned int uint
Unsigned integer number.
Definition: Types.h:44
MPI_ERR_ARG
@ MPI_ERR_ARG
Definition: mpi.h:86
C
#define C
Used to define external C functions.
Definition: Macros.h:134
MPI_T_ERR_PVAR_NO_ATOMIC
@ MPI_T_ERR_PVAR_NO_ATOMIC
Definition: mpi.h:146
MPI_ERR_DISP
@ MPI_ERR_DISP
Definition: mpi.h:99
MPI_LONG
@ MPI_LONG
Definition: mpi.h:50
MPI_T_ERR_CANNOT_INIT
@ MPI_T_ERR_CANNOT_INIT
Definition: mpi.h:131
MPI_ERR_ROOT
@ MPI_ERR_ROOT
Definition: mpi.h:81
MPI_T_ERR_MEMORY
@ MPI_T_ERR_MEMORY
Definition: mpi.h:133
MPI_ERR_COUNT
@ MPI_ERR_COUNT
Definition: mpi.h:75
MPI_ERR_NO_SPACE
@ MPI_ERR_NO_SPACE
Definition: mpi.h:114
MPI_T_ERR_PVAR_NO_WRITE
@ MPI_T_ERR_PVAR_NO_WRITE
Definition: mpi.h:144
MPI_Init
C int MPI_Init(int *argc, char ***argv)
Definition: mpi.cpp:24
MPI_T_ERR_INVALID_ITEM
@ MPI_T_ERR_INVALID_ITEM
Definition: mpi.h:136
MPI_ERR_RMA_ATTACH
@ MPI_ERR_RMA_ATTACH
Definition: mpi.h:119
MPI_T_ERR_CVAR_SET_NEVER
@ MPI_T_ERR_CVAR_SET_NEVER
Definition: mpi.h:143
MPI_ERR_GROUP
@ MPI_ERR_GROUP
Definition: mpi.h:82
MPI_ERR_PENDING
@ MPI_ERR_PENDING
Definition: mpi.h:91
MPI_ERR_LOCKTYPE
@ MPI_ERR_LOCKTYPE
Definition: mpi.h:110
MPI_ERR_TRUNCATE
@ MPI_ERR_TRUNCATE
Definition: mpi.h:88
MPI_Comm_rank
C int MPI_Comm_rank(MPI_Comm comm, int *rank)
Definition: mpi.cpp:59
MPI_ERR_RMA_FLAVOR
@ MPI_ERR_RMA_FLAVOR
Definition: mpi.h:124
MPI_ERR_NAME
@ MPI_ERR_NAME
Definition: mpi.h:111
MPI_Datatype
MPI_Datatype
Named Predefined Datatypes.
Definition: mpi.h:46
MPI_ERR_AMODE
@ MPI_ERR_AMODE
Definition: mpi.h:94
MPI_ERR_ASSERT
@ MPI_ERR_ASSERT
Definition: mpi.h:95
MPI_UNSIGNED_CHAR
@ MPI_UNSIGNED_CHAR
Definition: mpi.h:52
MPI_ERR_INFO_NOKEY
@ MPI_ERR_INFO_NOKEY
Definition: mpi.h:105
MPI_COMM_WORLD
@ MPI_COMM_WORLD
Definition: mpi.h:64
MPI_ERR_READ_ONLY
@ MPI_ERR_READ_ONLY
Definition: mpi.h:118
MPI_ERR_FILE_IN_USE
@ MPI_ERR_FILE_IN_USE
Definition: mpi.h:102
MPI_ERR_ACCESS
@ MPI_ERR_ACCESS
Definition: mpi.h:93
MPI_T_ERR_NOT_INITIALIZED
@ MPI_T_ERR_NOT_INITIALIZED
Definition: mpi.h:132
MPI_Send
C int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
Definition: mpi.cpp:36
MPI_ERR_QUOTA
@ MPI_ERR_QUOTA
Definition: mpi.h:117
MPI_ERR_UNKNOWN
@ MPI_ERR_UNKNOWN
Definition: mpi.h:87
MPI_Recv
C int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)
Definition: mpi.cpp:47
MPI_ERR_INFO_VALUE
@ MPI_ERR_INFO_VALUE
Definition: mpi.h:106
MPI_ERR_NOT_SAME
@ MPI_ERR_NOT_SAME
Definition: mpi.h:113
MPI_ERR_BAD_FILE
@ MPI_ERR_BAD_FILE
Definition: mpi.h:96
MPI_ERR_DIMS
@ MPI_ERR_DIMS
Definition: mpi.h:85
MPI_ERR_INFO_KEY
@ MPI_ERR_INFO_KEY
Definition: mpi.h:104
MPI_ERR_COMM
@ MPI_ERR_COMM
Definition: mpi.h:78
MPI_ERR_NO_SUCH_FILE
@ MPI_ERR_NO_SUCH_FILE
Definition: mpi.h:115
MPI_UNSIGNED_LONG
@ MPI_UNSIGNED_LONG
Definition: mpi.h:55
MPI_ERR_OTHER
@ MPI_ERR_OTHER
Definition: mpi.h:89
MPI_ERR_DUP_DATAREP
@ MPI_ERR_DUP_DATAREP
Definition: mpi.h:100
MPI_ERR_UNSUPPORTED_DATAREP
@ MPI_ERR_UNSUPPORTED_DATAREP
Definition: mpi.h:128
MPI_T_ERR_INVALID_INDEX
@ MPI_T_ERR_INVALID_INDEX
Definition: mpi.h:135
MPI_ERR_TAG
@ MPI_ERR_TAG
Definition: mpi.h:77
MPI_ERR_OP
@ MPI_ERR_OP
Definition: mpi.h:83
MPI_T_ERR_INVALID_SESSION
@ MPI_T_ERR_INVALID_SESSION
Definition: mpi.h:137
MPI_ERR_TOPOLOGY
@ MPI_ERR_TOPOLOGY
Definition: mpi.h:84
MPI_CHAR
@ MPI_CHAR
Definition: mpi.h:48
MPI_ERR_KEYVAL
@ MPI_ERR_KEYVAL
Definition: mpi.h:109
MPI_ERR_FILE_EXISTS
@ MPI_ERR_FILE_EXISTS
Definition: mpi.h:101