rminnichmerge57758a716 years agoHistory
1187 lines · 50.9 KB · C
RawDownload
/* -*- Mode: C; c-basic-offset:4 ; -*- *//*   *  (C) 2001 by Argonne National Laboratory. *      See COPYRIGHT in top-level directory. *//* src/include/mpi.h.  Generated from mpi.h.in by configure. */#ifndef MPI_INCLUDED#define MPI_INCLUDED /* user include file for MPI programs */ /* Keep C++ compilers from getting confused */#ifdef __cplusplusSUCKSextern "C" {#endif /* Results of the compare operations. */#define MPI_IDENT     0#define MPI_CONGRUENT 1#define MPI_SIMILAR   2#define MPI_UNEQUAL   3 typedef int MPI_Datatype;#define MPI_CHAR           ((MPI_Datatype)0x4c000101)#define MPI_SIGNED_CHAR    ((MPI_Datatype)0x4c000118)#define MPI_UNSIGNED_CHAR  ((MPI_Datatype)0x4c000102)#define MPI_BYTE           ((MPI_Datatype)0x4c00010d)#define MPI_WCHAR          ((MPI_Datatype)0x4c00040e)#define MPI_SHORT          ((MPI_Datatype)0x4c000203)#define MPI_UNSIGNED_SHORT ((MPI_Datatype)0x4c000204)#define MPI_INT            ((MPI_Datatype)0x4c000405)#define MPI_UNSIGNED       ((MPI_Datatype)0x4c000406)#define MPI_LONG           ((MPI_Datatype)0x4c000407)#define MPI_UNSIGNED_LONG  ((MPI_Datatype)0x4c000408)#define MPI_FLOAT          ((MPI_Datatype)0x4c00040a)#define MPI_DOUBLE         ((MPI_Datatype)0x4c00080b)#define MPI_LONG_DOUBLE    ((MPI_Datatype)0x4c00100c)#define MPI_LONG_LONG_INT  ((MPI_Datatype)0x4c000809)#define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)0x4c000819)#define MPI_LONG_LONG      MPI_LONG_LONG_INT #define MPI_PACKED         ((MPI_Datatype)0x4c00010f)#define MPI_LB             ((MPI_Datatype)0x4c000010)#define MPI_UB             ((MPI_Datatype)0x4c000011) /*    The layouts for the types MPI_DOUBLE_INT etc are simply   struct {        double var;       int    loc;   }   This is documented in the man pages on the various datatypes.    */#define MPI_FLOAT_INT         ((MPI_Datatype)0x8c000000)#define MPI_DOUBLE_INT        ((MPI_Datatype)0x8c000001)#define MPI_LONG_INT          ((MPI_Datatype)0x8c000002)#define MPI_SHORT_INT         ((MPI_Datatype)0x8c000003)#define MPI_2INT              ((MPI_Datatype)0x4c000816)#define MPI_LONG_DOUBLE_INT   ((MPI_Datatype)0x8c000004) /* Fortran types */#define MPI_COMPLEX           ((MPI_Datatype)1275070494)#define MPI_DOUBLE_COMPLEX    ((MPI_Datatype)1275072546)#define MPI_LOGICAL           ((MPI_Datatype)1275069469)#define MPI_REAL              ((MPI_Datatype)1275069468)#define MPI_DOUBLE_PRECISION  ((MPI_Datatype)1275070495)#define MPI_INTEGER           ((MPI_Datatype)1275069467)#define MPI_2INTEGER          ((MPI_Datatype)1275070496)#define MPI_2COMPLEX          ((MPI_Datatype)1275072548)#define MPI_2DOUBLE_COMPLEX   ((MPI_Datatype)1275076645)#define MPI_2REAL             ((MPI_Datatype)1275070497)#define MPI_2DOUBLE_PRECISION ((MPI_Datatype)1275072547)#define MPI_CHARACTER         ((MPI_Datatype)1275068698) /* Size-specific types (see MPI-2, 10.2.5) */#define MPI_REAL4             ((MPI_Datatype)0x4c000427)#define MPI_REAL8             ((MPI_Datatype)0x4c000829)#define MPI_REAL16            ((MPI_Datatype)0x4c00102b)#define MPI_COMPLEX8          ((MPI_Datatype)0x4c000828)#define MPI_COMPLEX16         ((MPI_Datatype)0x4c00102a)#define MPI_COMPLEX32         ((MPI_Datatype)0x4c00202c)#define MPI_INTEGER1          ((MPI_Datatype)0x4c00012d)#define MPI_INTEGER2          ((MPI_Datatype)0x4c00022f)#define MPI_INTEGER4          ((MPI_Datatype)0x4c000430)#define MPI_INTEGER8          ((MPI_Datatype)0x4c000831)#define MPI_INTEGER16         ((MPI_Datatype)MPI_DATATYPE_NULL) /* typeclasses */#define MPI_TYPECLASS_REAL 1#define MPI_TYPECLASS_INTEGER 2#define MPI_TYPECLASS_COMPLEX 3 /* Communicators */typedef int MPI_Comm;#define MPI_COMM_WORLD ((MPI_Comm)0x44000000)#define MPI_COMM_SELF  ((MPI_Comm)0x44000001) /* Groups */typedef int MPI_Group;#define MPI_GROUP_EMPTY ((MPI_Group)0x48000000) /* RMA and Windows */typedef int MPI_Win;#define MPI_WIN_NULL ((MPI_Win)0x20000000) /* File and IO *//* This define lets ROMIO know that MPI_File has been defined */#define MPI_FILE_DEFINED/* ROMIO uses a pointer for MPI_File objects.  This must be the same definition   as in src/mpi/romio/include/mpio.h.in  */typedef struct ADIOI_FileD *MPI_File;#define MPI_FILE_NULL ((MPI_File)0) /* Collective operations */typedef int MPI_Op; #define MPI_MAX     (MPI_Op)(0x58000001)#define MPI_MIN     (MPI_Op)(0x58000002)#define MPI_SUM     (MPI_Op)(0x58000003)#define MPI_PROD    (MPI_Op)(0x58000004)#define MPI_LAND    (MPI_Op)(0x58000005)#define MPI_BAND    (MPI_Op)(0x58000006)#define MPI_LOR     (MPI_Op)(0x58000007)#define MPI_BOR     (MPI_Op)(0x58000008)#define MPI_LXOR    (MPI_Op)(0x58000009)#define MPI_BXOR    (MPI_Op)(0x5800000a)#define MPI_MINLOC  (MPI_Op)(0x5800000b)#define MPI_MAXLOC  (MPI_Op)(0x5800000c)#define MPI_REPLACE (MPI_Op)(0x5800000d) /* Permanent key values *//* C Versions (return pointer to value),   Fortran Versions (return integer value).   Handled directly by the attribute value routine      DO NOT CHANGE THESE.  The values encode:   builtin kind (0x1 in bit 30-31)   Keyval object (0x9 in bits 26-29)   for communicator (0x1 in bits 22-25)      Fortran versions of the attributes are formed by adding one to   the C version. */#define MPI_TAG_UB           0x64400001#define MPI_HOST             0x64400003#define MPI_IO               0x64400005#define MPI_WTIME_IS_GLOBAL  0x64400007#define MPI_UNIVERSE_SIZE    0x64400009#define MPI_LASTUSEDCODE     0x6440000b#define MPI_APPNUM           0x6440000d /* In addition, there are 3 predefined window attributes that are   defined for every window */#define MPI_WIN_BASE         0x66000001#define MPI_WIN_SIZE         0x66000003#define MPI_WIN_DISP_UNIT    0x66000005 /* Define some null objects */#define MPI_COMM_NULL      ((MPI_Comm)0x04000000)#define MPI_OP_NULL        ((MPI_Op)0x18000000)#define MPI_GROUP_NULL     ((MPI_Group)0x08000000)#define MPI_DATATYPE_NULL  ((MPI_Datatype)0x0c000000)#define MPI_REQUEST_NULL   ((MPI_Request)0x2c000000)#define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0x14000000) /* These are only guesses; make sure you change them in mpif.h as well */#define MPI_MAX_PROCESSOR_NAME 128#define MPI_MAX_ERROR_STRING  1024 #define MPI_MAX_NAME_STRING     63#define MPI_MAX_PORT_NAME      256#define MPI_MAX_OBJECT_NAME    128 /* Pre-defined constants */#define MPI_UNDEFINED      (-32766)#define MPI_UNDEFINED_RANK MPI_UNDEFINED#define MPI_KEYVAL_INVALID 0x24000000 /* Upper bound on the overhead in bsend for each message buffer */#define MPI_BSEND_OVERHEAD 62 /* Topology types */typedef enum MPIR_Topo_type { MPI_GRAPH=1, MPI_CART=2 } MPIR_Topo_type; #define MPI_BOTTOM      (void *)0 #define MPI_PROC_NULL   (-1)#define MPI_ANY_SOURCE 	(-2)#define MPI_ROOT        (-3)#define MPI_ANY_TAG     (-1) #define MPI_LOCK_EXCLUSIVE  234#define MPI_LOCK_SHARED     235 /* C functions */typedef void (MPI_Handler_function) ( MPI_Comm *, int *, ... );typedef int (MPI_Comm_copy_attr_function)(MPI_Comm, int, void *, void *, 					  void *, int *);typedef int (MPI_Comm_delete_attr_function)(MPI_Comm, int, void *, void *);typedef int (MPI_Type_copy_attr_function)(MPI_Datatype, int, void *, void *, 					  void *, int *);typedef int (MPI_Type_delete_attr_function)(MPI_Datatype, int, void *, void *);typedef int (MPI_Win_copy_attr_function)(MPI_Win, int, void *, void *, void *,					 int *);typedef int (MPI_Win_delete_attr_function)(MPI_Win, int, void *, void *);typedef void (MPI_Comm_errhandler_fn)(MPI_Comm *, int *, ...);typedef void (MPI_File_errhandler_fn)(MPI_File *, int *, ...);typedef void (MPI_Win_errhandler_fn)(MPI_Win *, int *, ...); /* Built in (0x1 in 30-31), errhandler (0x5 in bits 26-29, allkind (0   in 22-25), index in the low bits */#define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)0x54000000)#define MPI_ERRORS_RETURN    ((MPI_Errhandler)0x54000001)      /* #define MPIR_ERRORS_WARN     ((MPI_Errhandler)0x54000002) */typedef int MPI_Errhandler; /* Make the C names for the dup function mixed case.   This is required for systems that use all uppercase names for Fortran    externals.  *//* MPI 1 names */#define MPI_NULL_COPY_FN   ((MPI_Copy_function *)0)#define MPI_NULL_DELETE_FN ((MPI_Delete_function *)0)#define MPI_DUP_FN         MPIR_Dup_fn/* MPI 2 names */#define MPI_COMM_NULL_COPY_FN ((MPI_Comm_copy_attr_function*)0)#define MPI_COMM_NULL_DELETE_FN ((MPI_Comm_delete_attr_function*)0)#define MPI_COMM_DUP_FN  ((MPI_Comm_copy_attr_function *)MPI_DUP_FN)#define MPI_WIN_NULL_COPY_FN ((MPI_Win_copy_attr_function*)0)#define MPI_WIN_NULL_DELETE_FN ((MPI_Win_delete_attr_function*)0)#define MPI_WIN_DUP_FN   ((MPI_Win_copy_attr_function*)MPI_DUP_FN)#define MPI_TYPE_NULL_COPY_FN ((MPI_Type_copy_attr_function*)0)#define MPI_TYPE_NULL_DELETE_FN ((MPI_Type_delete_attr_function*)0)#define MPI_TYPE_DUP_FN ((MPI_Type_copy_attr_function*)MPI_DUP_FN) /* MPI request opjects */typedef int MPI_Request; /* User combination function */typedef void (MPI_User_function) ( void *, void *, int *, MPI_Datatype * );  /* MPI Attribute copy and delete functions */typedef int (MPI_Copy_function) ( MPI_Comm, int, void *, void *, void *, int * );typedef int (MPI_Delete_function) ( MPI_Comm, int, void *, void * ); #define MPI_VERSION    2#define MPI_SUBVERSION 0#define MPICH_NAME     2#define MPICH2         1#define MPICH_HAS_C2F  1  /* MPICH2_VERSION is the version string. MPICH2_NUMVERSION is the * numeric version that can be used in numeric comparisons. * * MPICH2_VERSION uses the following format: * Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER] * Example: 1.0.7rc1 has *          MAJ = 1 *          MIN = 0 *          REV = 7 *          EXT = rc *          EXT_NUMBER = 1 * * MPICH2_NUMVERSION will convert EXT to a format number: *          ALPHA (a) = 0 *          BETA (b)  = 1 *          RC (rc)   = 2 *          PATCH (p) = 3 * Regular releases are treated as patch 0 * * Numeric version will have 1 digit for MAJ, 2 digits for MIN, 2 * digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER. So, * 1.0.7rc1 will have the numeric version 10007201. */#define MPICH2_VERSION "1.0.7"#define MPICH2_NUMVERSION 10007300 #define MPICH2_RELEASE_TYPE_ALPHA  0#define MPICH2_RELEASE_TYPE_BETA   1#define MPICH2_RELEASE_TYPE_RC     2#define MPICH2_RELEASE_TYPE_PATCH  3 #define MPICH2_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \  ((MAJOR * 10000000) + (MINOR * 100000) + (REVISION * 1000) + (TYPE * 100) + (PATCH)) /* for the datatype decoders */enum MPI_COMBINER_ENUM {    MPI_COMBINER_NAMED            = 1,    MPI_COMBINER_DUP              = 2,    MPI_COMBINER_CONTIGUOUS       = 3,     MPI_COMBINER_VECTOR           = 4,    MPI_COMBINER_HVECTOR_INTEGER  = 5,    MPI_COMBINER_HVECTOR          = 6,    MPI_COMBINER_INDEXED          = 7,    MPI_COMBINER_HINDEXED_INTEGER = 8,     MPI_COMBINER_HINDEXED         = 9,     MPI_COMBINER_INDEXED_BLOCK    = 10,     MPI_COMBINER_STRUCT_INTEGER   = 11,    MPI_COMBINER_STRUCT           = 12,     MPI_COMBINER_SUBARRAY         = 13,    MPI_COMBINER_DARRAY           = 14,    MPI_COMBINER_F90_REAL         = 15,     MPI_COMBINER_F90_COMPLEX      = 16,     MPI_COMBINER_F90_INTEGER      = 17,     MPI_COMBINER_RESIZED          = 18 }; /* for info */typedef int MPI_Info;#define MPI_INFO_NULL         ((MPI_Info)0x1c000000)#define MPI_MAX_INFO_KEY       255#define MPI_MAX_INFO_VAL      1024 /* for subarray and darray constructors */#define MPI_ORDER_C              56#define MPI_ORDER_FORTRAN        57#define MPI_DISTRIBUTE_BLOCK    121#define MPI_DISTRIBUTE_CYCLIC   122#define MPI_DISTRIBUTE_NONE     123#define MPI_DISTRIBUTE_DFLT_DARG -49767 #define MPI_IN_PLACE  (void *) -1 /* asserts for one-sided communication */#define MPI_MODE_NOCHECK      1024#define MPI_MODE_NOSTORE      2048#define MPI_MODE_NOPUT        4096#define MPI_MODE_NOPRECEDE    8192#define MPI_MODE_NOSUCCEED   16384  /* Definitions that are determined by configure. */typedef long long MPI_Aint;typedef int MPI_Fint;#define MPI_AINT_FMT_DEC_SPEC "%lld"#define MPI_AINT_FMT_HEX_SPEC "%#llx" /* Let ROMIO know that MPI_Offset is already defined */#define HAVE_MPI_OFFSET/* MPI_OFFSET_TYPEDEF is set in configure and is       typedef $MPI_OFFSET MPI_Offset;   where $MPI_OFFSET is the correct C type */typedef long long MPI_Offset; /* The order of these elements must match that in mpif.h */typedef struct MPI_Status {    int count;    int cancelled;    int MPI_SOURCE;    int MPI_TAG;    int MPI_ERROR;    } MPI_Status; /* Handle conversion types/functions */ /* Programs that need to convert types used in MPICH should use these */#define MPI_Comm_c2f(comm) (MPI_Fint)(comm)#define MPI_Comm_f2c(comm) (MPI_Comm)(comm)#define MPI_Type_c2f(datatype) (MPI_Fint)(datatype)#define MPI_Type_f2c(datatype) (MPI_Datatype)(datatype)#define MPI_Group_c2f(group) (MPI_Fint)(group)#define MPI_Group_f2c(group) (MPI_Group)(group)#define MPI_Info_c2f(info) (MPI_Fint)(info)#define MPI_Info_f2c(info) (MPI_Info)(info)#define MPI_Request_f2c(request) (MPI_Request)(request)#define MPI_Request_c2f(request) (MPI_Fint)(request)#define MPI_Op_c2f(op) (MPI_Fint)(op)#define MPI_Op_f2c(op) (MPI_Op)(op)#define MPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler)#define MPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler)#define MPI_Win_c2f(win)   (MPI_Fint)(win)#define MPI_Win_f2c(win)   (MPI_Win)(win) /* PMPI versions of the handle transfer functions.  See section 4.17 */#define PMPI_Comm_c2f(comm) (MPI_Fint)(comm)#define PMPI_Comm_f2c(comm) (MPI_Comm)(comm)#define PMPI_Type_c2f(datatype) (MPI_Fint)(datatype)#define PMPI_Type_f2c(datatype) (MPI_Datatype)(datatype)#define PMPI_Group_c2f(group) (MPI_Fint)(group)#define PMPI_Group_f2c(group) (MPI_Group)(group)#define PMPI_Info_c2f(info) (MPI_Fint)(info)#define PMPI_Info_f2c(info) (MPI_Info)(info)#define PMPI_Request_f2c(request) (MPI_Request)(request)#define PMPI_Request_c2f(request) (MPI_Fint)(request)#define PMPI_Op_c2f(op) (MPI_Fint)(op)#define PMPI_Op_f2c(op) (MPI_Op)(op)#define PMPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler)#define PMPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler)#define PMPI_Win_c2f(win)   (MPI_Fint)(win)#define PMPI_Win_f2c(win)   (MPI_Win)(win) #define MPI_STATUS_IGNORE (MPI_Status *)1#define MPI_STATUSES_IGNORE (MPI_Status *)1#define MPI_ERRCODES_IGNORE (int *)0 /* See 4.12.5 for MPI_F_STATUS(ES)_IGNORE */#define MPIU_DLL_SPECextern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUS_IGNORE;extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUSES_IGNORE;/* The annotation MPIU_DLL_SPEC to the extern statements is used    as a hook for systems that require C extensions to correctly construct   DLLs, and is defined as an empty string otherwise */ /* The MPI standard requires that the ARGV_NULL values be the same as   NULL (see 5.3.2) */#define MPI_ARGV_NULL (char **)0#define MPI_ARGVS_NULL (char ***)0 /* For supported thread levels */#define MPI_THREAD_SINGLE 0#define MPI_THREAD_FUNNELED 1#define MPI_THREAD_SERIALIZED 2#define MPI_THREAD_MULTIPLE 3 /* Typedefs for generalized requests */typedef int (MPI_Grequest_cancel_function)(void *, int); typedef int (MPI_Grequest_free_function)(void *); typedef int (MPI_Grequest_query_function)(void *, MPI_Status *);  /* MPI's error classes */#define MPI_SUCCESS          0      /* Successful return code *//* Communication argument parameters */#define MPI_ERR_BUFFER       1      /* Invalid buffer pointer */#define MPI_ERR_COUNT        2      /* Invalid count argument */#define MPI_ERR_TYPE         3      /* Invalid datatype argument */#define MPI_ERR_TAG          4      /* Invalid tag argument */#define MPI_ERR_COMM         5      /* Invalid communicator */#define MPI_ERR_RANK         6      /* Invalid rank */#define MPI_ERR_ROOT         7      /* Invalid root */#define MPI_ERR_TRUNCATE    14      /* Message truncated on receive */ /* MPI Objects (other than COMM) */#define MPI_ERR_GROUP        8      /* Invalid group */#define MPI_ERR_OP           9      /* Invalid operation */#define MPI_ERR_REQUEST     19      /* Invalid mpi_request handle */ /* Special topology argument parameters */#define MPI_ERR_TOPOLOGY    10      /* Invalid topology */#define MPI_ERR_DIMS        11      /* Invalid dimension argument */ /* All other arguments.  This is a class with many kinds */#define MPI_ERR_ARG         12      /* Invalid argument */ /* Other errors that are not simply an invalid argument */#define MPI_ERR_OTHER       15      /* Other error; use Error_string */ #define MPI_ERR_UNKNOWN     13      /* Unknown error */#define MPI_ERR_INTERN      16      /* Internal error code    */ /* Multiple completion has two special error classes */#define MPI_ERR_IN_STATUS   17      /* Look in status for error value */#define MPI_ERR_PENDING     18      /* Pending request */ /* New MPI-2 Error classes */#define MPI_ERR_FILE        27      /* */#define MPI_ERR_ACCESS      20      /* */#define MPI_ERR_AMODE       21      /* */#define MPI_ERR_BAD_FILE    22      /* */#define MPI_ERR_FILE_EXISTS 25      /* */#define MPI_ERR_FILE_IN_USE 26      /* */#define MPI_ERR_NO_SPACE    36      /* */#define MPI_ERR_NO_SUCH_FILE 37     /* */#define MPI_ERR_IO          32      /* */#define MPI_ERR_READ_ONLY   40      /* */#define MPI_ERR_CONVERSION  23      /* */#define MPI_ERR_DUP_DATAREP 24      /* */#define MPI_ERR_UNSUPPORTED_DATAREP   43  /* */ /* MPI_ERR_INFO is NOT defined in the MPI-2 standard.  I believe that   this is an oversight */#define MPI_ERR_INFO        28      /* */#define MPI_ERR_INFO_KEY    29      /* */#define MPI_ERR_INFO_VALUE  30      /* */#define MPI_ERR_INFO_NOKEY  31      /* */ #define MPI_ERR_NAME        33      /* */#define MPI_ERR_NO_MEM      34      /* Alloc_mem could not allocate memory */#define MPI_ERR_NOT_SAME    35      /* */#define MPI_ERR_PORT        38      /* */#define MPI_ERR_QUOTA       39      /* */#define MPI_ERR_SERVICE     41      /* */#define MPI_ERR_SPAWN       42      /* */#define MPI_ERR_UNSUPPORTED_OPERATION 44 /* */#define MPI_ERR_WIN         45      /* */ #define MPI_ERR_BASE        46      /* */#define MPI_ERR_LOCKTYPE    47      /* */#define MPI_ERR_KEYVAL      48      /* Erroneous attribute key */#define MPI_ERR_RMA_CONFLICT 49     /* */#define MPI_ERR_RMA_SYNC    50      /* */ #define MPI_ERR_SIZE        51      /* */#define MPI_ERR_DISP        52      /* */#define MPI_ERR_ASSERT      53      /* */ #define MPI_ERR_LASTCODE    0x3fffffff  /* Last valid error code for a predefined error class */#define MPICH_ERR_LAST_CLASS 53     /* It is also helpful to know the  last valid class *//* End of MPI's error classes */ /* Function type defs */typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, 

Lines 1–500 of 1187.