| [aad342c] | 1 | #ifndef _MPI_
|
|---|
| 2 | #define _MPI_
|
|---|
| 3 | #include <op.h>
|
|---|
| 4 | #ifndef NULL
|
|---|
| 5 | #define NULL ((void*)0)
|
|---|
| 6 | #endif
|
|---|
| 7 | #define MPIX_NO_OP _NO_OP
|
|---|
| 8 | #define MPI_MAX _MAX
|
|---|
| 9 | #define MPI_MIN _MIN
|
|---|
| 10 | #define MPI_SUM _SUM
|
|---|
| 11 | #define MPI_PROD _PROD
|
|---|
| 12 | #define MPI_LAND _LAND
|
|---|
| 13 | #define MPI_BAND _BAND
|
|---|
| 14 | #define MPI_LOR _LOR
|
|---|
| 15 | #define MPI_BOR _BOR
|
|---|
| 16 | #define MPI_LXOR _LXOR
|
|---|
| 17 | #define MPI_BXOR _BXOR
|
|---|
| 18 | #define MPI_MINLOC _MINLOC
|
|---|
| 19 | #define MPI_MAXLOC _MAXLOC
|
|---|
| 20 | #define MPI_REPLACE _REPLACE
|
|---|
| 21 |
|
|---|
| 22 | typedef enum Operation MPI_Op;
|
|---|
| 23 | #define MPI_OP_NULL (-1)
|
|---|
| 24 |
|
|---|
| 25 | /* MPI definition */
|
|---|
| 26 | /* -*- Mode: C; c-basic-offset:4 ; -*- */
|
|---|
| 27 | /*
|
|---|
| 28 | * (C) 2001 by Argonne National Laboratory.
|
|---|
| 29 | * See COPYRIGHT in top-level directory.
|
|---|
| 30 | */
|
|---|
| 31 | /* src/include/mpi.h. Generated from mpi.h.in by configure. */
|
|---|
| 32 | /* Results of the compare operations. */
|
|---|
| 33 | #define MPI_IDENT 0
|
|---|
| 34 | #define MPI_CONGRUENT 1
|
|---|
| 35 | #define MPI_SIMILAR 2
|
|---|
| 36 | #define MPI_UNEQUAL 3
|
|---|
| 37 |
|
|---|
| 38 | #ifdef __MPI_DATATYPE__
|
|---|
| 39 | #else
|
|---|
| 40 | #define __MPI_DATATYPE__
|
|---|
| 41 | typedef enum MPI_Datatype{
|
|---|
| 42 | MPI_CHAR = 0,
|
|---|
| 43 | MPI_CHARACTER = 1,
|
|---|
| 44 | MPI_SIGNED_CHAR,
|
|---|
| 45 | MPI_UNSIGNED_CHAR,
|
|---|
| 46 | MPI_BYTE = 2,
|
|---|
| 47 | MPI_WCHAR,
|
|---|
| 48 | MPI_SHORT = 3,
|
|---|
| 49 | MPI_UNSIGNED_SHORT,
|
|---|
| 50 | MPI_INT = 4,
|
|---|
| 51 | MPI_INT16_T,
|
|---|
| 52 | MPI_INT32_T,
|
|---|
| 53 | MPI_INT64_T,
|
|---|
| 54 | MPI_INT8_T,
|
|---|
| 55 | MPI_INTEGER,
|
|---|
| 56 | MPI_INTEGER1,
|
|---|
| 57 | MPI_INTEGER16,
|
|---|
| 58 | MPI_INTEGER2,
|
|---|
| 59 | MPI_INTEGER4,
|
|---|
| 60 | MPI_INTEGER8,
|
|---|
| 61 | MPI_UNSIGNED,
|
|---|
| 62 | MPI_LONG = 5,
|
|---|
| 63 | MPI_UNSIGNED_LONG,
|
|---|
| 64 | MPI_FLOAT = 9,
|
|---|
| 65 | MPI_DOUBLE = 10,
|
|---|
| 66 | MPI_LONG_DOUBLE = 11,
|
|---|
| 67 | MPI_LONG_LONG_INT = 6,
|
|---|
| 68 | MPI_UNSIGNED_LONG_LONG = 7,
|
|---|
| 69 | MPI_LONG_LONG = 8,
|
|---|
| 70 | MPI_PACKED,
|
|---|
| 71 | MPI_LB,
|
|---|
| 72 | MPI_UB,
|
|---|
| 73 | MPI_UINT16_T,
|
|---|
| 74 | MPI_UINT32_T,
|
|---|
| 75 | MPI_UINT64_T,
|
|---|
| 76 | MPI_UINT8_T,
|
|---|
| 77 | MPI_FLOAT_INT,
|
|---|
| 78 | MPI_DOUBLE_INT,
|
|---|
| 79 | MPI_LONG_INT,
|
|---|
| 80 | MPI_SHORT_INT,
|
|---|
| 81 | MPI_2INT = 12,
|
|---|
| 82 | MPI_LONG_DOUBLE_INT,
|
|---|
| 83 | MPI_AINT,
|
|---|
| 84 | MPI_OFFSET,
|
|---|
| 85 | MPI_2DOUBLE_PRECISION,
|
|---|
| 86 | MPI_2INTEGER,
|
|---|
| 87 | MPI_2REAL,
|
|---|
| 88 | MPI_C_BOOL,
|
|---|
| 89 | MPI_C_COMPLEX,
|
|---|
| 90 | MPI_C_DOUBLE_COMPLEX,
|
|---|
| 91 | MPI_C_FLOAT_COMPLEX,
|
|---|
| 92 | MPI_C_LONG_DOUBLE_COMPLEX,
|
|---|
| 93 | MPI_COMPLEX,
|
|---|
| 94 | MPI_COMPLEX16,
|
|---|
| 95 | MPI_COMPLEX32,
|
|---|
| 96 | MPI_COMPLEX4,
|
|---|
| 97 | MPI_COMPLEX8,
|
|---|
| 98 | MPI_REAL,
|
|---|
| 99 | MPI_REAL16,
|
|---|
| 100 | MPI_REAL2,
|
|---|
| 101 | MPI_REAL4,
|
|---|
| 102 | MPI_REAL8
|
|---|
| 103 | } MPI_Datatype;
|
|---|
| 104 | #define MPI_DATATYPE_NULL (-1)
|
|---|
| 105 | #endif
|
|---|
| 106 |
|
|---|
| 107 | typedef long MPI_Aint;
|
|---|
| 108 | typedef int MPI_Fint;
|
|---|
| 109 | typedef struct CIVL_MPI_Comm * MPI_Comm;
|
|---|
| 110 | typedef struct MPI_Group MPI_Group;
|
|---|
| 111 | typedef struct MPI_Request * MPI_Request;
|
|---|
| 112 | typedef struct MPIX_Message MPIX_Message;
|
|---|
| 113 | typedef struct MPI_File MPI_File;
|
|---|
| 114 | typedef struct MPI_Errhandler MPI_Errhandler;
|
|---|
| 115 | typedef struct MPI_User_function MPI_User_function;
|
|---|
| 116 | typedef struct MPI_Copy_function MPI_Copy_function;
|
|---|
| 117 | typedef struct MPI_Delete_function MPI_Delete_function;
|
|---|
| 118 | typedef int MPI_Win;
|
|---|
| 119 | typedef int MPI_Info;
|
|---|
| 120 | typedef long long MPI_Offset;
|
|---|
| 121 |
|
|---|
| 122 | /* for subarray and darray constructors */
|
|---|
| 123 | #define MPI_ORDER_C 56
|
|---|
| 124 | #define MPI_ORDER_FORTRAN 57
|
|---|
| 125 | #define MPI_DISTRIBUTE_BLOCK 121
|
|---|
| 126 | #define MPI_DISTRIBUTE_CYCLIC 122
|
|---|
| 127 | #define MPI_DISTRIBUTE_NONE 123
|
|---|
| 128 | #define MPI_DISTRIBUTE_DFLT_DARG -49767
|
|---|
| 129 |
|
|---|
| 130 | /* Topology types */
|
|---|
| 131 | typedef enum MPIR_Topo_type { MPI_GRAPH=1, MPI_CART=2, MPI_DIST_GRAPH=3 } MPIR_Topo_type;
|
|---|
| 132 |
|
|---|
| 133 | /* for the datatype decoders */
|
|---|
| 134 | typedef enum MPIR_Combiner_enum {
|
|---|
| 135 | MPI_COMBINER_NAMED = 1,
|
|---|
| 136 | MPI_COMBINER_DUP = 2,
|
|---|
| 137 | MPI_COMBINER_CONTIGUOUS = 3,
|
|---|
| 138 | MPI_COMBINER_VECTOR = 4,
|
|---|
| 139 | MPI_COMBINER_HVECTOR_INTEGER = 5,
|
|---|
| 140 | MPI_COMBINER_HVECTOR = 6,
|
|---|
| 141 | MPI_COMBINER_INDEXED = 7,
|
|---|
| 142 | MPI_COMBINER_HINDEXED_INTEGER = 8,
|
|---|
| 143 | MPI_COMBINER_HINDEXED = 9,
|
|---|
| 144 | MPI_COMBINER_INDEXED_BLOCK = 10,
|
|---|
| 145 | MPIX_COMBINER_HINDEXED_BLOCK = 11,
|
|---|
| 146 | MPI_COMBINER_STRUCT_INTEGER = 12,
|
|---|
| 147 | MPI_COMBINER_STRUCT = 13,
|
|---|
| 148 | MPI_COMBINER_SUBARRAY = 14,
|
|---|
| 149 | MPI_COMBINER_DARRAY = 15,
|
|---|
| 150 | MPI_COMBINER_F90_REAL = 16,
|
|---|
| 151 | MPI_COMBINER_F90_COMPLEX = 17,
|
|---|
| 152 | MPI_COMBINER_F90_INTEGER = 18,
|
|---|
| 153 | MPI_COMBINER_RESIZED = 19
|
|---|
| 154 | }MPIR_Combiner_enum;
|
|---|
| 155 |
|
|---|
| 156 | /* C functions */
|
|---|
| 157 | typedef void (MPI_Handler_function) ( MPI_Comm *, int *, ... );
|
|---|
| 158 | typedef int (MPI_Comm_copy_attr_function)(MPI_Comm, int, void *, void *,
|
|---|
| 159 | void *, int *);
|
|---|
| 160 | typedef int (MPI_Comm_delete_attr_function)(MPI_Comm, int, void *, void *);
|
|---|
| 161 | typedef int (MPI_Type_copy_attr_function)(MPI_Datatype, int, void *, void *,
|
|---|
| 162 | void *, int *);
|
|---|
| 163 | typedef int (MPI_Type_delete_attr_function)(MPI_Datatype, int, void *, void *);
|
|---|
| 164 | typedef int (MPI_Win_copy_attr_function)(MPI_Win, int, void *, void *, void *,
|
|---|
| 165 | int *);
|
|---|
| 166 | typedef int (MPI_Win_delete_attr_function)(MPI_Win, int, void *, void *);
|
|---|
| 167 | /* added in MPI-2.2 */
|
|---|
| 168 | typedef void (MPI_Comm_errhandler_function)(MPI_Comm *, int *, ...);
|
|---|
| 169 | typedef void (MPI_File_errhandler_function)(MPI_File *, int *, ...);
|
|---|
| 170 | typedef void (MPI_Win_errhandler_function)(MPI_Win *, int *, ...);
|
|---|
| 171 | /* names that were added in MPI-2.0 and deprecated in MPI-2.2 */
|
|---|
| 172 | typedef MPI_Comm_errhandler_function MPI_Comm_errhandler_fn;
|
|---|
| 173 | typedef MPI_File_errhandler_function MPI_File_errhandler_fn;
|
|---|
| 174 | typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn;
|
|---|
| 175 | /* Function type defs */
|
|---|
| 176 | typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int,
|
|---|
| 177 | void *, MPI_Offset, void *);
|
|---|
| 178 | typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *,
|
|---|
| 179 | void *);
|
|---|
| 180 | #define MPI_CONVERSION_FN_NULL ((MPI_Datarep_conversion_function *)0)
|
|---|
| 181 |
|
|---|
| 182 | #define MPI_NULL_COPY_FN ((MPI_Copy_function *)0)
|
|---|
| 183 | #define MPI_NULL_DELETE_FN ((MPI_Delete_function *)0)
|
|---|
| 184 | #define MPI_COMM_NULL_COPY_FN ((MPI_Comm_copy_attr_function*)0)
|
|---|
| 185 | #define MPI_COMM_NULL_DELETE_FN ((MPI_Comm_delete_attr_function*)0)
|
|---|
| 186 | #define MPI_COMM_DUP_FN ((MPI_Comm_copy_attr_function *)0)
|
|---|
| 187 | #define MPI_WIN_NULL_COPY_FN ((MPI_Win_copy_attr_function*)0)
|
|---|
| 188 | #define MPI_WIN_NULL_DELETE_FN ((MPI_Win_delete_attr_function*)0)
|
|---|
| 189 | #define MPI_WIN_DUP_FN ((MPI_Win_copy_attr_function*)0)
|
|---|
| 190 | #define MPI_TYPE_NULL_COPY_FN ((MPI_Type_copy_attr_function*)0)
|
|---|
| 191 | #define MPI_TYPE_NULL_DELETE_FN ((MPI_Type_delete_attr_function*)0)
|
|---|
| 192 | #define MPI_TYPE_DUP_FN ((MPI_Type_copy_attr_function*)0)
|
|---|
| 193 |
|
|---|
| 194 | #define MPI_WIN_NULL ((MPI_Win)0)
|
|---|
| 195 | /* In addition, there are 5 predefined window attributes that are
|
|---|
| 196 | defined for every window */
|
|---|
| 197 | #define MPI_WIN_BASE 1
|
|---|
| 198 | #define MPI_WIN_SIZE 3
|
|---|
| 199 | #define MPI_WIN_DISP_UNIT 5
|
|---|
| 200 | #define MPIX_WIN_CREATE_FLAVOR 7
|
|---|
| 201 | #define MPIX_WIN_MODEL 9
|
|---|
| 202 |
|
|---|
| 203 | /* typeclasses */
|
|---|
| 204 | #define MPI_TYPECLASS_REAL 1
|
|---|
| 205 | #define MPI_TYPECLASS_INTEGER 2
|
|---|
| 206 | #define MPI_TYPECLASS_COMPLEX 3
|
|---|
| 207 |
|
|---|
| 208 | typedef struct MPI_Status{
|
|---|
| 209 | int MPI_SOURCE;
|
|---|
| 210 | int MPI_TAG;
|
|---|
| 211 | int MPI_ERROR;
|
|---|
| 212 | int size;
|
|---|
| 213 | } MPI_Status;
|
|---|
| 214 |
|
|---|
| 215 | // Implementation should define their own MPI_COMM_NULL:
|
|---|
| 216 | #define MPI_COMM_NULL NULL
|
|---|
| 217 | #ifndef MPI_IN_PLACE
|
|---|
| 218 | extern const int MPI_IN_PLACE_SPOT ;
|
|---|
| 219 | /* MPI_IN_PLACE was defined as (void *)-1 in MPICH but that can be
|
|---|
| 220 | wrong. Let it refer to a fixed constant in the library probably is
|
|---|
| 221 | a better idea.*/
|
|---|
| 222 | #define MPI_IN_PLACE ((void *) &MPI_IN_PLACE_SPOT)
|
|---|
| 223 | #endif
|
|---|
| 224 |
|
|---|
| 225 | #define MPI_ANY_SOURCE (-1)
|
|---|
| 226 | #define MPI_ANY_TAG (-2)
|
|---|
| 227 | #define MPI_PROC_NULL (-3)
|
|---|
| 228 | #define MPI_ROOT (-4)
|
|---|
| 229 | #define MPI_REQUEST_NULL NULL
|
|---|
| 230 | #define MPI_STATUS_IGNORE NULL
|
|---|
| 231 | #define MPI_STATUSES_IGNORE NULL
|
|---|
| 232 | #define MPI_LOCK_EXCLUSIVE 234
|
|---|
| 233 | #define MPI_LOCK_SHARED 235
|
|---|
| 234 |
|
|---|
| 235 | /* Typedefs for generalized requests */
|
|---|
| 236 | typedef int (MPI_Grequest_cancel_function)(void *, int);
|
|---|
| 237 | typedef int (MPI_Grequest_free_function)(void *);
|
|---|
| 238 | typedef int (MPI_Grequest_query_function)(void *, MPI_Status *);
|
|---|
| 239 |
|
|---|
| 240 | /**************************** Communicators ************************************/
|
|---|
| 241 | #ifdef _CIVLMPI_
|
|---|
| 242 | CIVL_MPI_Comm CIVL_MPI_COMM_WORLD;
|
|---|
| 243 | MPI_Comm MPI_COMM_WORLD = &(CIVL_MPI_COMM_WORLD);
|
|---|
| 244 | #else
|
|---|
| 245 | MPI_Comm MPI_COMM_WORLD;
|
|---|
| 246 | #endif
|
|---|
| 247 |
|
|---|
| 248 | extern MPI_Comm MPI_COMM_SELF;
|
|---|
| 249 | extern MPI_Comm MPI_COMM_PARENT;
|
|---|
| 250 | extern MPI_Comm MPI_COMM_TYPE_SHARED;
|
|---|
| 251 |
|
|---|
| 252 | /* We require that the C compiler support prototypes */
|
|---|
| 253 | /* Begin Prototypes */
|
|---|
| 254 | int MPI_Send(const void*, int, MPI_Datatype, int, int, MPI_Comm);
|
|---|
| 255 | int MPI_Recv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *);
|
|---|
| 256 | int MPI_Get_count( MPI_Status *, MPI_Datatype, int *);
|
|---|
| 257 | int MPI_Bsend(void*, int, MPI_Datatype, int, int, MPI_Comm);
|
|---|
| 258 | int MPI_Ssend(void*, int, MPI_Datatype, int, int, MPI_Comm);
|
|---|
| 259 | int MPI_Rsend(void*, int, MPI_Datatype, int, int, MPI_Comm);
|
|---|
| 260 | int MPI_Buffer_attach( void*, int);
|
|---|
| 261 | int MPI_Buffer_detach( void*, int *);
|
|---|
| 262 | int MPI_Isend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *);
|
|---|
| 263 | int MPI_Ibsend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *);
|
|---|
| 264 | int MPI_Issend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *);
|
|---|
| 265 | int MPI_Irsend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *);
|
|---|
| 266 | int MPI_Irecv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *);
|
|---|
| 267 | int MPI_Wait(MPI_Request *, MPI_Status *);
|
|---|
| 268 | int MPI_Test(MPI_Request *, int *, MPI_Status *);
|
|---|
| 269 | int MPI_Request_free(MPI_Request *);
|
|---|
| 270 | int MPI_Waitany(int, MPI_Request *, int *, MPI_Status *);
|
|---|
| 271 | int MPI_Testany(int, MPI_Request *, int *, int *, MPI_Status *);
|
|---|
| 272 | int MPI_Waitall(int, MPI_Request *, MPI_Status *);
|
|---|
| 273 | int MPI_Testall(int, MPI_Request *, int *, MPI_Status *);
|
|---|
| 274 | int MPI_Waitsome(int, MPI_Request *, int *, int *, MPI_Status *);
|
|---|
| 275 | int MPI_Testsome(int, MPI_Request *, int *, int *, MPI_Status *);
|
|---|
| 276 | int MPI_Iprobe(int, int, MPI_Comm, int *, MPI_Status *);
|
|---|
| 277 | int MPI_Probe(int, int, MPI_Comm, MPI_Status *);
|
|---|
| 278 | int MPI_Cancel(MPI_Request *);
|
|---|
| 279 | int MPI_Test_cancelled(MPI_Status *, int *);
|
|---|
| 280 | int MPI_Send_init(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *);
|
|---|
| 281 | int MPI_Bsend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *);
|
|---|
| 282 | int MPI_Ssend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *);
|
|---|
| 283 | int MPI_Rsend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *);
|
|---|
| 284 | int MPI_Recv_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *);
|
|---|
| 285 | int MPI_Start(MPI_Request *);
|
|---|
| 286 | int MPI_Startall(int, MPI_Request *);
|
|---|
| 287 | int MPI_Sendrecv(void *, int, MPI_Datatype,int, int, void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *);
|
|---|
| 288 | int MPI_Sendrecv_replace(void*, int, MPI_Datatype, int, int, int, int, MPI_Comm, MPI_Status *);
|
|---|
| 289 | int MPI_Type_contiguous(int, MPI_Datatype, MPI_Datatype *);
|
|---|
| 290 | int MPI_Type_vector(int, int, int, MPI_Datatype, MPI_Datatype *);
|
|---|
| 291 | int MPI_Type_hvector(int, int, MPI_Aint, MPI_Datatype, MPI_Datatype *);
|
|---|
| 292 | int MPI_Type_indexed(int, int *, int *, MPI_Datatype, MPI_Datatype *);
|
|---|
| 293 | int MPI_Type_hindexed(int, int *, MPI_Aint *, MPI_Datatype, MPI_Datatype *);
|
|---|
| 294 | int MPI_Type_struct(int, int *, MPI_Aint *, MPI_Datatype *, MPI_Datatype *);
|
|---|
| 295 | int MPI_Address(void*, MPI_Aint *);
|
|---|
| 296 | int MPI_Type_extent(MPI_Datatype, MPI_Aint *);
|
|---|
| 297 | int MPI_Type_size(MPI_Datatype, int *);
|
|---|
| 298 | int MPI_Type_lb(MPI_Datatype, MPI_Aint *);
|
|---|
| 299 | int MPI_Type_ub(MPI_Datatype, MPI_Aint *);
|
|---|
| 300 | int MPI_Type_commit(MPI_Datatype *);
|
|---|
| 301 | int MPI_Type_free(MPI_Datatype *);
|
|---|
| 302 | int MPI_Get_elements(MPI_Status *, MPI_Datatype, int *);
|
|---|
| 303 | int MPI_Pack(void*, int, MPI_Datatype, void *, int, int *, MPI_Comm);
|
|---|
| 304 | int MPI_Unpack(void*, int, int *, void *, int, MPI_Datatype, MPI_Comm);
|
|---|
| 305 | int MPI_Pack_size(int, MPI_Datatype, MPI_Comm, int *);
|
|---|
| 306 | int MPI_Barrier(MPI_Comm );
|
|---|
| 307 | int MPI_Bcast(void*, int, MPI_Datatype, int, MPI_Comm);
|
|---|
| 308 | int MPI_Gather(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm);
|
|---|
| 309 | int MPI_Gatherv(const void* , int, MPI_Datatype, void*, const int *,
|
|---|
| 310 | const int *, MPI_Datatype, int, MPI_Comm);
|
|---|
| 311 | int MPI_Scatter(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm);
|
|---|
| 312 | int MPI_Scatterv(const void* , const int *, const int *, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm);
|
|---|
| 313 | int MPI_Allgather(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm);
|
|---|
| 314 | int MPI_Allgatherv(void* , int, MPI_Datatype, void*, int *,
|
|---|
| 315 | int *, MPI_Datatype, MPI_Comm);
|
|---|
| 316 | int MPI_Alltoall(const void* , int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm);
|
|---|
| 317 | int MPI_Alltoallv(const void* ,const int *, const int *, MPI_Datatype,
|
|---|
| 318 | void*, const int *, const int *, MPI_Datatype, MPI_Comm);
|
|---|
| 319 | int MPI_Reduce(const void* , void*, int, MPI_Datatype, MPI_Op, int, MPI_Comm);
|
|---|
| 320 | int MPI_Op_create(MPI_User_function *, int, MPI_Op *);
|
|---|
| 321 | int MPI_Op_free( MPI_Op *);
|
|---|
| 322 | int MPI_Allreduce(const void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm);
|
|---|
| 323 | int MPI_Reduce_scatter(const void* , void*, const int *, MPI_Datatype, MPI_Op, MPI_Comm);
|
|---|
| 324 | int MPI_Scan(const void* , void*, int, MPI_Datatype, MPI_Op, MPI_Comm);
|
|---|
| 325 | int MPI_Group_size(MPI_Group, int *);
|
|---|
| 326 | int MPI_Group_rank(MPI_Group, int *);
|
|---|
| 327 | int MPI_Group_translate_ranks (MPI_Group, int, int *, MPI_Group, int *);
|
|---|
| 328 | int MPI_Group_compare(MPI_Group, MPI_Group, int *);
|
|---|
| 329 | int MPI_Comm_group(MPI_Comm, MPI_Group *);
|
|---|
| 330 | int MPI_Group_union(MPI_Group, MPI_Group, MPI_Group *);
|
|---|
| 331 | int MPI_Group_intersection(MPI_Group, MPI_Group, MPI_Group *);
|
|---|
| 332 | int MPI_Group_difference(MPI_Group, MPI_Group, MPI_Group *);
|
|---|
| 333 | int MPI_Group_incl(MPI_Group, int, int *, MPI_Group *);
|
|---|
| 334 | int MPI_Group_excl(MPI_Group, int, int *, MPI_Group *);
|
|---|
| 335 | int MPI_Group_range_incl(MPI_Group, int, int [][3], MPI_Group *);
|
|---|
| 336 | int MPI_Group_range_excl(MPI_Group, int, int [][3], MPI_Group *);
|
|---|
| 337 | int MPI_Group_free(MPI_Group *);
|
|---|
| 338 | int MPI_Comm_size(MPI_Comm, int *);
|
|---|
| 339 | int MPI_Comm_rank(MPI_Comm, int *);
|
|---|
| 340 | int MPI_Comm_compare(MPI_Comm, MPI_Comm, int *);
|
|---|
| 341 | int MPI_Comm_dup(MPI_Comm, MPI_Comm *);
|
|---|
| 342 | int MPI_Comm_create(MPI_Comm, MPI_Group, MPI_Comm *);
|
|---|
| 343 | int MPI_Comm_split(MPI_Comm, int, int, MPI_Comm *);
|
|---|
| 344 | int MPI_Comm_free(MPI_Comm *);
|
|---|
| 345 | int MPI_Comm_test_inter(MPI_Comm, int *);
|
|---|
| 346 | int MPI_Comm_remote_size(MPI_Comm, int *);
|
|---|
| 347 | int MPI_Comm_remote_group(MPI_Comm, MPI_Group *);
|
|---|
| 348 | int MPI_Intercomm_create(MPI_Comm, int, MPI_Comm, int, int, MPI_Comm * );
|
|---|
| 349 | int MPI_Intercomm_merge(MPI_Comm, int, MPI_Comm *);
|
|---|
| 350 | int MPI_Keyval_create(MPI_Copy_function *, MPI_Delete_function *, int *, void*);
|
|---|
| 351 | int MPI_Keyval_free(int *);
|
|---|
| 352 | int MPI_Attr_put(MPI_Comm, int, void*);
|
|---|
| 353 | int MPI_Attr_get(MPI_Comm, int, void *, int *);
|
|---|
| 354 | int MPI_Attr_delete(MPI_Comm, int);
|
|---|
| 355 | int MPI_Topo_test(MPI_Comm, int *);
|
|---|
| 356 | int MPI_Cart_create(MPI_Comm, int, int *, int *, int, MPI_Comm *);
|
|---|
| 357 | int MPI_Dims_create(int, int, int *);
|
|---|
| 358 | int MPI_Graph_create(MPI_Comm, int, int *, int *, int, MPI_Comm *);
|
|---|
| 359 | int MPI_Graphdims_get(MPI_Comm, int *, int *);
|
|---|
| 360 | int MPI_Graph_get(MPI_Comm, int, int, int *, int *);
|
|---|
| 361 | int MPI_Cartdim_get(MPI_Comm, int *);
|
|---|
| 362 | int MPI_Cart_get(MPI_Comm, int, int *, int *, int *);
|
|---|
| 363 | int MPI_Cart_rank(MPI_Comm, int *, int *);
|
|---|
| 364 | int MPI_Cart_coords(MPI_Comm, int, int, int *);
|
|---|
| 365 | int MPI_Graph_neighbors_count(MPI_Comm, int, int *);
|
|---|
| 366 | int MPI_Graph_neighbors(MPI_Comm, int, int, int *);
|
|---|
| 367 | int MPI_Cart_shift(MPI_Comm, int, int, int *, int *);
|
|---|
| 368 | int MPI_Cart_sub(MPI_Comm, int *, MPI_Comm *);
|
|---|
| 369 | int MPI_Cart_map(MPI_Comm, int, int *, int *, int *);
|
|---|
| 370 | int MPI_Graph_map(MPI_Comm, int, int *, int *, int *);
|
|---|
| 371 | int MPI_Get_processor_name(char *, int *);
|
|---|
| 372 | int MPI_Get_version(int *, int *);
|
|---|
| 373 | int MPI_Errhandler_create(MPI_Handler_function *, MPI_Errhandler *);
|
|---|
| 374 | int MPI_Errhandler_set(MPI_Comm, MPI_Errhandler);
|
|---|
| 375 | int MPI_Errhandler_get(MPI_Comm, MPI_Errhandler *);
|
|---|
| 376 | int MPI_Errhandler_free(MPI_Errhandler *);
|
|---|
| 377 | int MPI_Error_string(int, char *, int *);
|
|---|
| 378 | int MPI_Error_class(int, int *);
|
|---|
| 379 | double MPI_Wtime(void);
|
|---|
| 380 | double MPI_Wtick(void);
|
|---|
| 381 | int MPI_Init(int *, char ***);
|
|---|
| 382 | int MPI_Finalize(void);
|
|---|
| 383 | int MPI_Initialized(int *);
|
|---|
| 384 | $system int MPI_Abort(MPI_Comm, int);
|
|---|
| 385 |
|
|---|
| 386 |
|
|---|
| 387 | /* Note that we may need to define a @PCONTROL_LIST@ depending on whether
|
|---|
| 388 | stdargs are supported */
|
|---|
| 389 | int MPI_Pcontrol(const int, ...);
|
|---|
| 390 |
|
|---|
| 391 | int MPI_DUP_FN ( MPI_Comm, int, void *, void *, void *, int * );
|
|---|
| 392 |
|
|---|
| 393 |
|
|---|
| 394 | /* MPI-2 functions */
|
|---|
| 395 |
|
|---|
| 396 | /* Process Creation and Management */
|
|---|
| 397 | int MPI_Close_port( char *);
|
|---|
| 398 | int MPI_Comm_accept( char *, MPI_Info, int, MPI_Comm, MPI_Comm *);
|
|---|
| 399 | int MPI_Comm_connect( char *, MPI_Info, int, MPI_Comm, MPI_Comm *);
|
|---|
| 400 | int MPI_Comm_disconnect(MPI_Comm *);
|
|---|
| 401 | int MPI_Comm_get_parent(MPI_Comm *);
|
|---|
| 402 | int MPI_Comm_join(int, MPI_Comm *);
|
|---|
| 403 | int MPI_Comm_spawn( char *, char *[], int, MPI_Info, int, MPI_Comm, MPI_Comm *,
|
|---|
| 404 | int []);
|
|---|
| 405 | int MPI_Comm_spawn_multiple(int, char *[], char **[], int [], MPI_Info [], int,
|
|---|
| 406 | MPI_Comm, MPI_Comm *, int []);
|
|---|
| 407 | int MPI_Lookup_name( char *, MPI_Info, char *);
|
|---|
| 408 | int MPI_Open_port(MPI_Info, char *);
|
|---|
| 409 | int MPI_Publish_name( char *, MPI_Info, char *);
|
|---|
| 410 | int MPI_Unpublish_name( char *, MPI_Info, char *);
|
|---|
| 411 |
|
|---|
| 412 | /* One-Sided Communications */
|
|---|
| 413 | int MPI_Accumulate( void *, int, MPI_Datatype, int, MPI_Aint, int,
|
|---|
| 414 | MPI_Datatype, MPI_Op, MPI_Win) ;
|
|---|
| 415 | int MPI_Get(void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
|
|---|
| 416 | MPI_Win) ;
|
|---|
| 417 | int MPI_Put( void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
|
|---|
| 418 | MPI_Win) ;
|
|---|
| 419 | int MPI_Win_complete(MPI_Win);
|
|---|
| 420 | int MPI_Win_create(void *, MPI_Aint, int, MPI_Info, MPI_Comm, MPI_Win *);
|
|---|
| 421 | int MPI_Win_fence(int, MPI_Win);
|
|---|
| 422 | int MPI_Win_free(MPI_Win *);
|
|---|
| 423 | int MPI_Win_get_group(MPI_Win, MPI_Group *);
|
|---|
| 424 | int MPI_Win_lock(int, int, int, MPI_Win);
|
|---|
| 425 | int MPI_Win_post(MPI_Group, int, MPI_Win);
|
|---|
| 426 | int MPI_Win_start(MPI_Group, int, MPI_Win);
|
|---|
| 427 | int MPI_Win_test(MPI_Win, int *);
|
|---|
| 428 | int MPI_Win_unlock(int, MPI_Win);
|
|---|
| 429 | int MPI_Win_wait(MPI_Win);
|
|---|
| 430 |
|
|---|
| 431 | /* Extended Collective Operations */
|
|---|
| 432 | int MPI_Alltoallw(const void *, const int [], const int [],
|
|---|
| 433 | const MPI_Datatype [], void *, const int [],
|
|---|
| 434 | const int [], const MPI_Datatype [], MPI_Comm);
|
|---|
| 435 | int MPI_Exscan(const void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm);
|
|---|
| 436 |
|
|---|
| 437 | /* External Interfaces */
|
|---|
| 438 | int MPI_Add_error_class(int *);
|
|---|
| 439 | int MPI_Add_error_code(int, int *);
|
|---|
| 440 | int MPI_Add_error_string(int, char *);
|
|---|
| 441 | int MPI_Comm_call_errhandler(MPI_Comm, int);
|
|---|
| 442 | int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *,
|
|---|
| 443 | MPI_Comm_delete_attr_function *, int *, void *);
|
|---|
| 444 | int MPI_Comm_delete_attr(MPI_Comm, int);
|
|---|
| 445 | int MPI_Comm_free_keyval(int *);
|
|---|
| 446 | int MPI_Comm_get_attr(MPI_Comm, int, void *, int *);
|
|---|
| 447 | int MPI_Comm_get_name(MPI_Comm, char *, int *);
|
|---|
| 448 | int MPI_Comm_set_attr(MPI_Comm, int, void *);
|
|---|
| 449 | int MPI_Comm_set_name(MPI_Comm, char *);
|
|---|
| 450 | int MPI_File_call_errhandler(MPI_File, int);
|
|---|
| 451 | int MPI_Grequest_complete(MPI_Request);
|
|---|
| 452 | int MPI_Grequest_start(MPI_Grequest_query_function *,
|
|---|
| 453 | MPI_Grequest_free_function *,
|
|---|
| 454 | MPI_Grequest_cancel_function *, void *, MPI_Request *);
|
|---|
| 455 | int MPI_Init_thread(int *, char ***, int, int *);
|
|---|
| 456 | int MPI_Is_thread_main(int *);
|
|---|
| 457 | int MPI_Query_thread(int *);
|
|---|
| 458 | int MPI_Status_set_cancelled(MPI_Status *, int);
|
|---|
| 459 | int MPI_Status_set_elements(MPI_Status *, MPI_Datatype, int);
|
|---|
| 460 | int MPI_Type_create_keyval(MPI_Type_copy_attr_function *,
|
|---|
| 461 | MPI_Type_delete_attr_function *, int *, void *);
|
|---|
| 462 | int MPI_Type_delete_attr(MPI_Datatype, int);
|
|---|
| 463 | int MPI_Type_dup(MPI_Datatype, MPI_Datatype *);
|
|---|
| 464 | int MPI_Type_free_keyval(int *);
|
|---|
| 465 | int MPI_Type_get_attr(MPI_Datatype, int, void *, int *);
|
|---|
| 466 | int MPI_Type_get_contents(MPI_Datatype, int, int, int, int [], MPI_Aint [],
|
|---|
| 467 | MPI_Datatype []);
|
|---|
| 468 | int MPI_Type_get_envelope(MPI_Datatype, int *, int *, int *, int *);
|
|---|
| 469 | int MPI_Type_get_name(MPI_Datatype, char *, int *);
|
|---|
| 470 | int MPI_Type_set_attr(MPI_Datatype, int, void *);
|
|---|
| 471 | int MPI_Type_set_name(MPI_Datatype, char *);
|
|---|
| 472 | int MPI_Type_match_size( int, int, MPI_Datatype *);
|
|---|
| 473 | int MPI_Win_call_errhandler(MPI_Win, int);
|
|---|
| 474 | int MPI_Win_create_keyval(MPI_Win_copy_attr_function *,
|
|---|
| 475 | MPI_Win_delete_attr_function *, int *, void *);
|
|---|
| 476 | int MPI_Win_delete_attr(MPI_Win, int);
|
|---|
| 477 | int MPI_Win_free_keyval(int *);
|
|---|
| 478 | int MPI_Win_get_attr(MPI_Win, int, void *, int *);
|
|---|
| 479 | int MPI_Win_get_name(MPI_Win, char *, int *);
|
|---|
| 480 | int MPI_Win_set_attr(MPI_Win, int, void *);
|
|---|
| 481 | int MPI_Win_set_name(MPI_Win, char *);
|
|---|
| 482 |
|
|---|
| 483 | /* Miscellany */
|
|---|
| 484 | MPI_Comm MPI_Comm_f2c(MPI_Fint);
|
|---|
| 485 | MPI_Datatype MPI_Type_f2c(MPI_Fint);
|
|---|
| 486 | MPI_File MPI_File_f2c(MPI_Fint);
|
|---|
| 487 | MPI_Fint MPI_Comm_c2f(MPI_Comm);
|
|---|
| 488 | MPI_Fint MPI_File_c2f(MPI_File);
|
|---|
| 489 | MPI_Fint MPI_Group_c2f(MPI_Group);
|
|---|
| 490 | MPI_Fint MPI_Info_c2f(MPI_Info);
|
|---|
| 491 | MPI_Fint MPI_Op_c2f(MPI_Op);
|
|---|
| 492 | MPI_Fint MPI_Request_c2f(MPI_Request);
|
|---|
| 493 | MPI_Fint MPI_Type_c2f(MPI_Datatype);
|
|---|
| 494 | MPI_Fint MPI_Win_c2f(MPI_Win);
|
|---|
| 495 | MPI_Group MPI_Group_f2c(MPI_Fint);
|
|---|
| 496 | MPI_Info MPI_Info_f2c(MPI_Fint);
|
|---|
| 497 | MPI_Op MPI_Op_f2c(MPI_Fint);
|
|---|
| 498 | MPI_Request MPI_Request_f2c(MPI_Fint);
|
|---|
| 499 | MPI_Win MPI_Win_f2c(MPI_Fint);
|
|---|
| 500 |
|
|---|
| 501 | int MPI_Alloc_mem(MPI_Aint, MPI_Info info, void *baseptr);
|
|---|
| 502 | int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *, MPI_Errhandler *);
|
|---|
| 503 | int MPI_Comm_get_errhandler(MPI_Comm, MPI_Errhandler *);
|
|---|
| 504 | int MPI_Comm_set_errhandler(MPI_Comm, MPI_Errhandler);
|
|---|
| 505 | int MPI_File_create_errhandler(MPI_File_errhandler_function *, MPI_Errhandler *);
|
|---|
| 506 | int MPI_File_get_errhandler(MPI_File, MPI_Errhandler *);
|
|---|
| 507 | int MPI_File_set_errhandler(MPI_File, MPI_Errhandler);
|
|---|
| 508 | int MPI_Finalized(int *);
|
|---|
| 509 | int MPI_Free_mem(void *);
|
|---|
| 510 | int MPI_Get_address( void *, MPI_Aint *);
|
|---|
| 511 | int MPI_Info_create(MPI_Info *);
|
|---|
| 512 | int MPI_Info_delete(MPI_Info, char *);
|
|---|
| 513 | int MPI_Info_dup(MPI_Info, MPI_Info *);
|
|---|
| 514 | int MPI_Info_free(MPI_Info *info);
|
|---|
| 515 | int MPI_Info_get(MPI_Info, char *, int, char *, int *);
|
|---|
| 516 | int MPI_Info_get_nkeys(MPI_Info, int *);
|
|---|
| 517 | int MPI_Info_get_nthkey(MPI_Info, int, char *);
|
|---|
| 518 | int MPI_Info_get_valuelen(MPI_Info, char *, int *, int *);
|
|---|
| 519 | int MPI_Info_set(MPI_Info, char *, char *);
|
|---|
| 520 | int MPI_Pack_external( char *, void *, int, MPI_Datatype, void *,
|
|---|
| 521 | MPI_Aint, MPI_Aint *);
|
|---|
| 522 | int MPI_Pack_external_size( char *, int, MPI_Datatype, MPI_Aint *);
|
|---|
| 523 | int MPI_Request_get_status(MPI_Request, int *, MPI_Status *);
|
|---|
| 524 | int MPI_Status_c2f( MPI_Status *, MPI_Fint *);
|
|---|
| 525 | int MPI_Status_f2c( MPI_Fint *, MPI_Status *);
|
|---|
| 526 | int MPI_Type_create_darray(int, int, int, int [], int [],
|
|---|
| 527 | int [], int [], int,
|
|---|
| 528 | MPI_Datatype, MPI_Datatype *);
|
|---|
| 529 | int MPI_Type_create_hindexed(int, int [], MPI_Aint [], MPI_Datatype,
|
|---|
| 530 | MPI_Datatype *);
|
|---|
| 531 | int MPI_Type_create_hvector(int, int, MPI_Aint, MPI_Datatype, MPI_Datatype *);
|
|---|
| 532 | int MPI_Type_create_indexed_block(int, int, int [], MPI_Datatype,
|
|---|
| 533 | MPI_Datatype *);
|
|---|
| 534 | int MPIX_Type_create_hindexed_block(int, int, const MPI_Aint [], MPI_Datatype, MPI_Datatype *);
|
|---|
| 535 | int MPI_Type_create_resized(MPI_Datatype, MPI_Aint, MPI_Aint, MPI_Datatype *);
|
|---|
| 536 | int MPI_Type_create_struct(int, int [], MPI_Aint [],
|
|---|
| 537 | MPI_Datatype [], MPI_Datatype *);
|
|---|
| 538 | int MPI_Type_create_subarray(int, int [], int [], int [],
|
|---|
| 539 | int, MPI_Datatype, MPI_Datatype *);
|
|---|
| 540 | int MPI_Type_get_extent(MPI_Datatype, MPI_Aint *, MPI_Aint *);
|
|---|
| 541 | int MPI_Type_get_true_extent(MPI_Datatype, MPI_Aint *, MPI_Aint *);
|
|---|
| 542 | int MPI_Unpack_external( char *, void *, MPI_Aint, MPI_Aint *, void *,
|
|---|
| 543 | int, MPI_Datatype);
|
|---|
| 544 | int MPI_Win_create_errhandler(MPI_Win_errhandler_function *, MPI_Errhandler *);
|
|---|
| 545 | int MPI_Win_get_errhandler(MPI_Win, MPI_Errhandler *);
|
|---|
| 546 | int MPI_Win_set_errhandler(MPI_Win, MPI_Errhandler);
|
|---|
| 547 |
|
|---|
| 548 | /* Fortran 90-related functions. These routines are available only if
|
|---|
| 549 | Fortran 90 support is enabled
|
|---|
| 550 | */
|
|---|
| 551 | int MPI_Type_create_f90_integer( int, MPI_Datatype * );
|
|---|
| 552 | int MPI_Type_create_f90_real( int, int, MPI_Datatype * );
|
|---|
| 553 | int MPI_Type_create_f90_complex( int, int, MPI_Datatype * );
|
|---|
| 554 |
|
|---|
| 555 | /* MPI-2.2 functions */
|
|---|
| 556 | int MPI_Reduce_local( void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op);
|
|---|
| 557 | int MPI_Op_commutative(MPI_Op op, int *commute);
|
|---|
| 558 | int MPI_Reduce_scatter_block( void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
|
|---|
| 559 | int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, int [], int [], int outdegree, int [], int [], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph);
|
|---|
| 560 | int MPI_Dist_graph_create(MPI_Comm comm_old, int n, int [], int [], int [], int [], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph);
|
|---|
| 561 | int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted);
|
|---|
| 562 | int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int [], int [], int maxoutdegree, int [], int []);
|
|---|
| 563 |
|
|---|
| 564 |
|
|---|
| 565 | /* Permanent key values */
|
|---|
| 566 | /* C Versions (return pointer to value),
|
|---|
| 567 | Fortran Versions (return integer value).
|
|---|
| 568 | Handled directly by the attribute value routine
|
|---|
| 569 |
|
|---|
| 570 | DO NOT CHANGE THESE. The values encode:
|
|---|
| 571 | builtin kind (0x1 in bit 30-31)
|
|---|
| 572 | Keyval object (0x9 in bits 26-29)
|
|---|
| 573 | for communicator (0x1 in bits 22-25)
|
|---|
| 574 |
|
|---|
| 575 | Fortran versions of the attributes are formed by adding one to
|
|---|
| 576 | the C version.
|
|---|
| 577 | */
|
|---|
| 578 | #define MPI_TAG_UB 0x64400001
|
|---|
| 579 | #define MPI_HOST 0x64400003
|
|---|
| 580 | #define MPI_IO 0x64400005
|
|---|
| 581 | #define MPI_WTIME_IS_GLOBAL 0x64400007
|
|---|
| 582 | #define MPI_UNIVERSE_SIZE 0x64400009
|
|---|
| 583 | #define MPI_LASTUSEDCODE 0x6440000b
|
|---|
| 584 | #define MPI_APPNUM 0x6440000d
|
|---|
| 585 |
|
|---|
| 586 | /* for info */
|
|---|
| 587 | #define MPI_INFO_NULL ((MPI_Info)-1)
|
|---|
| 588 | #define MPI_MAX_INFO_KEY 255
|
|---|
| 589 | #define MPI_MAX_INFO_VAL 1024
|
|---|
| 590 |
|
|---|
| 591 | /* MPI Handles and Constants */
|
|---|
| 592 | #define MPI_ARGV_NULL 0
|
|---|
| 593 | #define MPI_ARGVS_NULL 0
|
|---|
| 594 | #define MPI_BOTTOM (void *)0
|
|---|
| 595 | extern int * const MPI_UNWEIGHTED;
|
|---|
| 596 | #define MPI_BSEND_OVERHEAD 88
|
|---|
| 597 | #define MPI_FILE_NULL (MPI_File *)0
|
|---|
| 598 | #define MPI_GROUP_EMPTY (MPI_Group *)0
|
|---|
| 599 | #define MPI_GROUP_NULL (MPI_Group *)0
|
|---|
| 600 |
|
|---|
| 601 | /* Pre-defined constants */
|
|---|
| 602 | #define MPI_UNDEFINED (-32766)
|
|---|
| 603 | #define MPI_KEYVAL_INVALID 0
|
|---|
| 604 |
|
|---|
| 605 | /* MPI's error classes */
|
|---|
| 606 | #define MPI_SUCCESS 0 /* Successful return code */
|
|---|
| 607 | /* Communication argument parameters */
|
|---|
| 608 | #define MPI_ERR_BUFFER 1 /* Invalid buffer pointer */
|
|---|
| 609 | #define MPI_ERR_COUNT 2 /* Invalid count argument */
|
|---|
| 610 | #define MPI_ERR_TYPE 3 /* Invalid datatype argument */
|
|---|
| 611 | #define MPI_ERR_TAG 4 /* Invalid tag argument */
|
|---|
| 612 | #define MPI_ERR_COMM 5 /* Invalid communicator */
|
|---|
| 613 | #define MPI_ERR_RANK 6 /* Invalid rank */
|
|---|
| 614 | #define MPI_ERR_ROOT 7 /* Invalid root */
|
|---|
| 615 | #define MPI_ERR_TRUNCATE 14 /* Message truncated on receive */
|
|---|
| 616 |
|
|---|
| 617 | /* MPI Objects (other than COMM) */
|
|---|
| 618 | #define MPI_ERR_GROUP 8 /* Invalid group */
|
|---|
| 619 | #define MPI_ERR_OP 9 /* Invalid operation */
|
|---|
| 620 | #define MPI_ERR_REQUEST 19 /* Invalid mpi_request handle */
|
|---|
| 621 |
|
|---|
| 622 | /* Special topology argument parameters */
|
|---|
| 623 | #define MPI_ERR_TOPOLOGY 10 /* Invalid topology */
|
|---|
| 624 | #define MPI_ERR_DIMS 11 /* Invalid dimension argument */
|
|---|
| 625 |
|
|---|
| 626 | /* All other arguments. This is a class with many kinds */
|
|---|
| 627 | #define MPI_ERR_ARG 12 /* Invalid argument */
|
|---|
| 628 |
|
|---|
| 629 | /* Other errors that are not simply an invalid argument */
|
|---|
| 630 | #define MPI_ERR_OTHER 15 /* Other error; use Error_string */
|
|---|
| 631 |
|
|---|
| 632 | #define MPI_ERR_UNKNOWN 13 /* Unknown error */
|
|---|
| 633 | #define MPI_ERR_INTERN 16 /* Internal error code */
|
|---|
| 634 |
|
|---|
| 635 | /* Multiple completion has two special error classes */
|
|---|
| 636 | #define MPI_ERR_IN_STATUS 17 /* Look in status for error value */
|
|---|
| 637 | #define MPI_ERR_PENDING 18 /* Pending request */
|
|---|
| 638 |
|
|---|
| 639 | /* New MPI-2 Error classes */
|
|---|
| 640 | #define MPI_ERR_FILE 27 /* */
|
|---|
| 641 | #define MPI_ERR_ACCESS 20 /* */
|
|---|
| 642 | #define MPI_ERR_AMODE 21 /* */
|
|---|
| 643 | #define MPI_ERR_BAD_FILE 22 /* */
|
|---|
| 644 | #define MPI_ERR_FILE_EXISTS 25 /* */
|
|---|
| 645 | #define MPI_ERR_FILE_IN_USE 26 /* */
|
|---|
| 646 | #define MPI_ERR_NO_SPACE 36 /* */
|
|---|
| 647 | #define MPI_ERR_NO_SUCH_FILE 37 /* */
|
|---|
| 648 | #define MPI_ERR_IO 32 /* */
|
|---|
| 649 | #define MPI_ERR_READ_ONLY 40 /* */
|
|---|
| 650 | #define MPI_ERR_CONVERSION 23 /* */
|
|---|
| 651 | #define MPI_ERR_DUP_DATAREP 24 /* */
|
|---|
| 652 | #define MPI_ERR_UNSUPPORTED_DATAREP 43 /* */
|
|---|
| 653 |
|
|---|
| 654 | /* MPI_ERR_INFO is NOT defined in the MPI-2 standard. I believe that
|
|---|
| 655 | this is an oversight */
|
|---|
| 656 | #define MPI_ERR_INFO 28 /* */
|
|---|
| 657 | #define MPI_ERR_INFO_KEY 29 /* */
|
|---|
| 658 | #define MPI_ERR_INFO_VALUE 30 /* */
|
|---|
| 659 | #define MPI_ERR_INFO_NOKEY 31 /* */
|
|---|
| 660 |
|
|---|
| 661 | #define MPI_ERR_NAME 33 /* */
|
|---|
| 662 | #define MPI_ERR_NO_MEM 34 /* Alloc_mem could not allocate memory */
|
|---|
| 663 | #define MPI_ERR_NOT_SAME 35 /* */
|
|---|
| 664 | #define MPI_ERR_PORT 38 /* */
|
|---|
| 665 | #define MPI_ERR_QUOTA 39 /* */
|
|---|
| 666 | #define MPI_ERR_SERVICE 41 /* */
|
|---|
| 667 | #define MPI_ERR_SPAWN 42 /* */
|
|---|
| 668 | #define MPI_ERR_UNSUPPORTED_OPERATION 44 /* */
|
|---|
| 669 | #define MPI_ERR_WIN 45 /* */
|
|---|
| 670 |
|
|---|
| 671 | #define MPI_ERR_BASE 46 /* */
|
|---|
| 672 | #define MPI_ERR_LOCKTYPE 47 /* */
|
|---|
| 673 | #define MPI_ERR_KEYVAL 48 /* Erroneous attribute key */
|
|---|
| 674 | #define MPI_ERR_RMA_CONFLICT 49 /* */
|
|---|
| 675 | #define MPI_ERR_RMA_SYNC 50 /* */
|
|---|
| 676 | #define MPI_ERR_SIZE 51 /* */
|
|---|
| 677 | #define MPI_ERR_DISP 52 /* */
|
|---|
| 678 | #define MPI_ERR_ASSERT 53 /* */
|
|---|
| 679 |
|
|---|
| 680 | #define MPIX_ERR_PROC_FAIL_STOP 54 /* Process failure */
|
|---|
| 681 |
|
|---|
| 682 | #define MPIX_ERR_RMA_RANGE 55 /* */
|
|---|
| 683 | #define MPIX_ERR_RMA_ATTACH 56 /* */
|
|---|
| 684 | #define MPIX_ERR_RMA_SHARED 57 /* */
|
|---|
| 685 | #define MPIX_ERR_RMA_WRONG_FLAVOR 58 /* */
|
|---|
| 686 |
|
|---|
| 687 | #define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a
|
|---|
| 688 | predefined error class */
|
|---|
| 689 | /* WARNING: this is also defined in mpishared.h. Update both locations */
|
|---|
| 690 | #define MPICH_ERR_LAST_CLASS 58 /* It is also helpful to know the
|
|---|
| 691 | last valid class */
|
|---|
| 692 | /* End of MPI's error classes */
|
|---|
| 693 |
|
|---|
| 694 | /* See 4.12.5 for MPI_F_STATUS(ES)_IGNORE */
|
|---|
| 695 | #define MPIU_DLL_SPEC
|
|---|
| 696 | extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUS_IGNORE;
|
|---|
| 697 | extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUSES_IGNORE;
|
|---|
| 698 |
|
|---|
| 699 | /* asserts for one-sided communication */
|
|---|
| 700 | #define MPI_MODE_NOCHECK 1024
|
|---|
| 701 | #define MPI_MODE_NOSTORE 2048
|
|---|
| 702 | #define MPI_MODE_NOPUT 4096
|
|---|
| 703 | #define MPI_MODE_NOPRECEDE 8192
|
|---|
| 704 | #define MPI_MODE_NOSUCCEED 16384
|
|---|
| 705 |
|
|---|
| 706 | /* predefined types for MPIX_Comm_split_type */
|
|---|
| 707 | #define MPIX_COMM_TYPE_SHARED 1
|
|---|
| 708 |
|
|---|
| 709 | /* extra const at front would be safer, but is incompatible with MPIX_T_ prototypes */
|
|---|
| 710 | extern struct MPIR_T_pvar_handle * const MPI_T_PVAR_ALL_HANDLES;
|
|---|
| 711 |
|
|---|
| 712 | #define MPI_T_ENUM_NULL ((MPI_T_enum)NULL)
|
|---|
| 713 | #define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle)NULL)
|
|---|
| 714 | #define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle)NULL)
|
|---|
| 715 | #define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session)NULL)
|
|---|
| 716 |
|
|---|
| 717 | /* the MPI_T_ interface requires that these VERBOSITY constants occur in this
|
|---|
| 718 | * relative order with increasing values */
|
|---|
| 719 | typedef enum MPIR_T_verbosity_t {
|
|---|
| 720 | /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
|
|---|
| 721 | * extension */
|
|---|
| 722 | MPI_T_VERBOSITY_INVALID = 0,
|
|---|
| 723 |
|
|---|
| 724 | /* arbitrarily shift values to aid debugging and reduce accidental errors */
|
|---|
| 725 | MPI_T_VERBOSITY_USER_BASIC = 221,
|
|---|
| 726 | MPI_T_VERBOSITY_USER_DETAIL,
|
|---|
| 727 | MPI_T_VERBOSITY_USER_ALL,
|
|---|
| 728 |
|
|---|
| 729 | MPI_T_VERBOSITY_TUNER_BASIC,
|
|---|
| 730 | MPI_T_VERBOSITY_TUNER_DETAIL,
|
|---|
| 731 | MPI_T_VERBOSITY_TUNER_ALL,
|
|---|
| 732 |
|
|---|
| 733 | MPI_T_VERBOSITY_MPIDEV_BASIC,
|
|---|
| 734 | MPI_T_VERBOSITY_MPIDEV_DETAIL,
|
|---|
| 735 | MPI_T_VERBOSITY_MPIDEV_ALL
|
|---|
| 736 | }MPIR_T_verbosity_t;
|
|---|
| 737 |
|
|---|
| 738 | typedef enum MPIR_T_bind_t {
|
|---|
| 739 | /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
|
|---|
| 740 | * extension */
|
|---|
| 741 | MPI_T_BIND_INVALID = 0,
|
|---|
| 742 |
|
|---|
| 743 | /* arbitrarily shift values to aid debugging and reduce accidental errors */
|
|---|
| 744 | MPI_T_BIND_NO_OBJECT = 9700,
|
|---|
| 745 | MPI_T_BIND_MPI_COMM,
|
|---|
| 746 | MPI_T_BIND_MPI_DATATYPE,
|
|---|
| 747 | MPI_T_BIND_MPI_ERRHANDLER,
|
|---|
| 748 | MPI_T_BIND_MPI_FILE,
|
|---|
| 749 | MPI_T_BIND_MPI_GROUP,
|
|---|
| 750 | MPI_T_BIND_MPI_OP,
|
|---|
| 751 | MPI_T_BIND_MPI_REQUEST,
|
|---|
| 752 | MPI_T_BIND_MPI_WIN,
|
|---|
| 753 | MPI_T_BIND_MPI_MESSAGE,
|
|---|
| 754 | MPI_T_BIND_MPI_INFO
|
|---|
| 755 | }MPIR_T_bind_t;
|
|---|
| 756 |
|
|---|
| 757 | typedef enum MPIR_T_scope_t {
|
|---|
| 758 | /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
|
|---|
| 759 | * extension */
|
|---|
| 760 | MPI_T_SCOPE_INVALID = 0,
|
|---|
| 761 |
|
|---|
| 762 | /* arbitrarily shift values to aid debugging and reduce accidental errors */
|
|---|
| 763 | MPI_T_SCOPE_READONLY = 60439,
|
|---|
| 764 | MPI_T_SCOPE_LOCAL,
|
|---|
| 765 | MPI_T_SCOPE_GROUP,
|
|---|
| 766 | MPI_T_SCOPE_GROUP_EQ,
|
|---|
| 767 | MPI_T_SCOPE_ALL,
|
|---|
| 768 | MPI_T_SCOPE_ALL_EQ
|
|---|
| 769 | }MPIR_T_scope_t;
|
|---|
| 770 |
|
|---|
| 771 | typedef enum MPIR_T_pvar_class_t {
|
|---|
| 772 | /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH2-only
|
|---|
| 773 | * extension */
|
|---|
| 774 | MPI_T_PVAR_CLASS_INVALID = 0,
|
|---|
| 775 |
|
|---|
| 776 | /* arbitrarily shift values to aid debugging and reduce accidental errors */
|
|---|
| 777 | MPI_T_PVAR_CLASS_STATE = 240,
|
|---|
| 778 | MPI_T_PVAR_CLASS_LEVEL,
|
|---|
| 779 | MPI_T_PVAR_CLASS_SIZE,
|
|---|
| 780 | MPI_T_PVAR_CLASS_PERCENTAGE,
|
|---|
| 781 | MPI_T_PVAR_CLASS_HIGHWATERMARK,
|
|---|
| 782 | MPI_T_PVAR_CLASS_LOWWATERMARK,
|
|---|
| 783 | MPI_T_PVAR_CLASS_COUNTER,
|
|---|
| 784 | MPI_T_PVAR_CLASS_AGGREGATE,
|
|---|
| 785 | MPI_T_PVAR_CLASS_TIMER,
|
|---|
| 786 | MPI_T_PVAR_CLASS_GENERIC
|
|---|
| 787 | }MPIR_T_pvar_class_t;
|
|---|
| 788 |
|
|---|
| 789 | /* For supported thread levels */
|
|---|
| 790 | #define MPI_THREAD_SINGLE 0
|
|---|
| 791 | #define MPI_THREAD_FUNNELED 1
|
|---|
| 792 | #define MPI_THREAD_SERIALIZED 2
|
|---|
| 793 | #define MPI_THREAD_MULTIPLE 3
|
|---|
| 794 |
|
|---|
| 795 | #define MPI_VERSION "CIVL_MPI"
|
|---|
| 796 |
|
|---|
| 797 | #endif
|
|---|